swagger-api / swagger-api/swagger-ui
Given scan urls are empty, set urls in the configuration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
I have the following dependencies in my jax-rs app:
https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations/2.0.6
https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-core
public class RestApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<>();
classes.add(RandomImpl.class); //Interface Implementation without JaxRS annotation
classes.add(OpenApiResource.class);
classes.add(AcceptHeaderOpenApiResource.class);
return classes;
}
}
Now when I try to access the openapi.json I get the following warning:
given scan urls are empty. set urls in the configuration
I guess this is because I am registering the implementation of interface classes which hold the annotation but I can't obviously register the interfaces itself.
Just under this warning I get the following exception:
Exception Handling request to /openapi.json: org.jboss.resteasy.spi.UnhandlesException: java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;
Any help is appreciated! Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the RestApplication.getClasses() entry point and the registered OpenApiResource and AcceptHeaderOpenApiResource classes. Reproduce the /openapi.json request using the listed swagger-annotations and swagger-core dependencies, then trace the empty scan-URL warning and NoSuchMethodError to determine whether the configuration or dependency versions are responsible. Done means the cause and a reproducible fix are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100