Skip to content

Swagger should scan packages for @Api or @Path annotation #174

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

Closed
rage-shadowman opened this issue Apr 19, 2013 · 2 comments
Closed

Swagger should scan packages for @Api or @Path annotation #174

rage-shadowman opened this issue Apr 19, 2013 · 2 comments

Comments

@rage-shadowman
Copy link

To determine which resources exist, swagger should scan classes for @Api or @path annotations. If an @Api annotation does not exist, then it should be assumed that the api value is the value of @path.

@fehguy
Copy link
Contributor

fehguy commented Apr 24, 2013

this is part of a larger refactor coming in next major release

@fehguy
Copy link
Contributor

fehguy commented May 31, 2013

You can now configure your own scanner, or use a org.reflections approach here:

https://github.com/wordnik/swagger-core/blob/develop-1.3/modules/swagger-jaxrs/src/main/scala/com/wordnik/swagger/jaxrs/config/BeanConfig.scala#L20

Which scans a package for all classes with the appropriate annotations.

Note that just having @path will not trigger introspection by swagger, it needs to be contained in a class with @Api annotations.

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

No branches or pull requests

2 participants