Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptable packages not recursive anymore (version 1.5.1-M2) #1011

Closed
gedl opened this issue Apr 27, 2015 · 2 comments
Closed

Acceptable packages not recursive anymore (version 1.5.1-M2) #1011

gedl opened this issue Apr 27, 2015 · 2 comments
Labels
Milestone

Comments

@gedl
Copy link

gedl commented Apr 27, 2015

When configuring the resource package in the BeanConfig, for scanning, sub-packages are not scanned anymore.

Furthermore, requesting /swagger.json throws a NPE.

Context:
BeanConfig config = new BeanConfig();
config.setTitle(serviceName);
config.setResourcePackage("a.b.c");

(what I am trying to do is to setup swagger to generate a specs file for all classes annotated with Api.class below package a.b.c and all its sub-packages)

Expected (as per previous versions, for example 1.5.2-M1): class a.b.c.Clazz is found by the scanner
Reality: class a.b.c.Clazz is not found by the scanner

More info:
The class is actually found in BeanConfig.java, line 194 but then filtered out in line 197.

I believe the NPE is another problem (or maybe not even a problem depending on an empty spec being a valid spec or not), but here's the stacktrace:
https://gist.github.com/gedl/7904b77055f0aac54620

@webron webron added the P3 label Apr 29, 2015
@webron webron added this to the v1.5 milestone Apr 29, 2015
hellfur added a commit to hellfur/swagger-core that referenced this issue May 7, 2015
Use the acceptablePackages set with startsWith, rather than using .contains() in order to restore recursive package scanning.
@ctoestreich
Copy link

👍

@fehguy
Copy link
Contributor

fehguy commented Jun 6, 2015

confirmed bug, also, empty package specifier does not scan all packages, per #1098

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants