Open rosacris opened 10 years ago
We had a similar problem, indeed with @Auth annotated parameters. I personally guess it's kind of a bug. One of the recent changes in our own doclet fork fixed the problem and may give you at least an idea of how to fix your problem. They both sound very similar.
https://github.com/kj-acrolinx/swagger-jaxrs-doclet/commit/a56b674800e69b7ae6e0104bde44a128582577da
Due to some code settings in Eclipse nearly all the code was changed, so you may want to search for this snippet: "allowedParameterMethodTypes.contains(httpMethod)" to get into the interesting zone.
Hi KJ,
Thanks a lot for the feed back, taking a look at the commit it indeed looks like there was a POST hardcoded in method "shouldIncludeParameter" :) I am considering using your fork as it looks you had merged some interesting pull requests. Do you have a maven repo that I could include in my pom.xml file?
Hey, sorry for the late answer. I relied on the GitHub email notification, but it did not work...
We have not deployed our fork to the maven central repository, but you can download it and run a maven install on it. If you would like to use it professionally you can also deploy it to the repository manager of your company, e.g. Artifactory (like we did). :)
I have a resource with the following method: @POST @Timed @Path("/details") @Deprecated public Response setObjectDetails(@Auth User user, @Valid MyObject o){...}
The generated swagger documentation is just fine and includes the description of all parameters, including MyObject o. However, if I change the annotation of the method to @PUT, then MyObject o parameter disappears from the documentation (only @Auth User user is shown). Is this a bug, or am I using the doclet in an incorrect way? I would appreciate your opinion on this matter.
Thanks! C