Open rmenkyna opened 7 years ago
What do you mean with the swagger documentation is mixed? As soon as you use distinct @Path
values in the subresource locators, even if they're in the same class the Swagger file should include the correct (full) paths. Can you please give an example?
Hello. The main paths in swagger documentation all all OK. But the content for all subresorces gets generated only from last subresource...
@Path("/user") @Produces(MediaType.APPLICATION_JSON) public class UserProfileResource { //MAIN RESOURCE ...
@Path("/accountStates") // SUBRESOURCE public UserAccountStateResource getAccountStates() { return resourceContext.getResource(UserAccountStateResource.class); }
@Path("/registerRequests")// SUBRESOURCE public UserRegisterRequestResource getRegisterRequests() { return resourceContext.getResource(UserRegisterRequestResource.class); }
@Path("/subjects")// SUBRESOURCE public UserSubjectResource getSubjects() { return resourceContext.getResource(UserSubjectResource.class); } ...
SWAGER DOCUMENTATION For subjects it is OK. /user/subjects":{
"get":{
"description":"Returns subjects for logged user. Optional
params iban, id", "consumes":[ "application/json" ], "produces":[ "application/json" ], "parameters":[ ...
NOT OK - regions have documentation from subjects subresource "/user/regions":{ "get":{ "description":"Returns subjects for logged user. Optional params iban, id", "consumes":[ "application/json" ], "produces":[ "application/json" ], ...
NOT OK - accountStates have documentation from subjects subresource "/user/accountStates":{ "get":{ "description":"Returns subjects for logged user. Optional params iban, id", "consumes":[ "application/json" ], "produces":[ "application/json" ],
First i thought i have some configuration issue, ore something cached in my workspace, but i couldn't solve this issue.
Rado.
2017-01-28 16:34 GMT+01:00 Sebastian Daschner notifications@github.com:
What do you mean with the swagger documentation is mixed? As soon as you use distinct @Path values in the subresource locators, even if they're in the same class the Swagger file should include the correct (full) paths. Can you please give an example?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sdaschner/jaxrs-analyzer/issues/102#issuecomment-275854833, or mute the thread https://github.com/notifications/unsubscribe-auth/AYK-aAbkzdDK1jifRH_9_v4szSfhFQgoks5rW2AJgaJpZM4Ltelh .
I tried to reproduce this error but it works as expected.. Can you please retry with the latest 0.13
version and maybe add a reproducer to https://github.com/sdaschner/jaxrs-analyzer-st if the problem persists?
When one subresource is present in resource, swagger documentation is generated nicely. When I use several subresources in one resource their swagger documentation is mixed. For. example documentation of subresource 2 overwrites documentation for subresource 3. Order of subresource appearance in main resource code has impact on which subresource documentation is OK and which is overwritten.