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
PathParam in Class @Path Fails to Create Required Parameters for Resource Methods #1085
Comments
well that's not right. looking into it, it should be supported. |
can you please test this behavior with 1.5.2-M2-SNAPSHOT? From tests, it looks to work correctly. |
@fehguy you should add a non-default constructor into your
Its JSON on
|
The Swagger doesn't support some parameters.
JAX-RS documentation: https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2688 Test resource which implement all injection types: https://gist.github.com/iushankin/319883fd1409b6a7344c
Sub resource parameter is correct:
|
…ired Parameters for Resource Methods
Fixed in develop_2.0. |
0 |
Additional fix in #1191 |
We have quite a few REST Resources that utilize a PathParam value in the class's
@Path
definition.For example:
In that class, we have a get method:
Unfortunately, the swagger info generated does not recognize that
workspaceId
is required for the get method and doesn't create it in the UI:And the UI:
Thus, it's impossible to test the API, because there's no input box for
workspaceId
on the GET method AND the test URL will also be incorrectly formatted (doesn't replace workspaceId with a valid value), e.g.:Are Class-Level
@PathParam
required attributes supported with swagger? If so, how do I define them?If not, is there any clever workaround I can use?
The text was updated successfully, but these errors were encountered: