-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
| Q | A |
|---|---|
| Bug or feature request? | Bug |
| Which Swagger-Core version? | 1.5.17 |
| Which Java version? | 1.8.0_144 |
| Which JAX-RS framework & version? | Jackson 2.9.1 |
Subresource paths are not displayed correctly if the subresource has a path on it at the class level.
I ran into this because I wanted to override a Path on a Jersey resource from another project. I've worked around that, but this still seems worth reporting.
Expected Behavior:
When pointing to a specific subresource from a parent resource, giving it a Path, the Path on the subresource at the class level should be ignored by Swagger, e.g., /v1/parent.
Actual Behavior:
It is not ignored and is concatenated together with the parent path - also with no slash, .e.g.,
/v1/parentsubresource.
Jersey correctly registers the resource and accepts requests to the endpoint (/v1/parent), but the generated Swagger documentation is incorrect. There is no such resource at /v1/parentsubresource or /v1/parent/subresource, nor should there be.
Here is a simple runnable project created from a dropwizard archetpye where this can be seen:
https://github.com/ef-labs/swagger-subresource-issue