-
Notifications
You must be signed in to change notification settings - Fork 46
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
@ApiOperation with value only breaks displaying documentation for Api (controller) #32
Comments
I am having this exact same problem. There are quite a few bugs that have been introduced into this release that make this library not usable anymore. It looks like when you click the "Expand Operations" link next to the endpoint name it will show them all. The common theme I have seen for all the ones that you cannot open manually is they dont have a "Response Content Type" |
@szpak Thank you for posting this bug. I've created a fix for this issue. If there is no httpMethod specified in the ApiOperation annotation then it will look for the method in RequestMapping. As for your additional notes, I'll create a new issue for what you are describing. It sounds like you want to default to the method return type for the response in ApiOperation if no response is specified. This will be possible, unless you are using generics, in which case you will only see the collection class. @eibach I'm terribly sorry you are having so many issues with the newest release. Please post anything you find and I'll do my best to resolve these issues. To support the latest version of Swagger I needed to rewrite much of the code and I need some help sorting any issues that came out of the refactor. |
…d is specified in the ApiOperation (#32)
Thanks wkennedy! I wasnt trying to be rude about it, I know it was a pretty big update on the swagger core spec. I saw you made a new release 0.3.1-SNAPSHOT. Is that available in maven? |
Oh, no worries! I know you weren't trying to be rude. I haven't deployed the 0.3.1 to the Maven repo yet. I'll do some more testing and hopefully get that pushed out tonight. |
Great Thanks again! |
Description:
I would expect to define only required properties in @ApiOperation and allow swagger4spring to get default values for others. Currently @ApiOperation with value only causes an API for a class (controller) to be not expandable in GUI.
How to reproduce:
In swagge4springweb-example (tested on master) for person() method in PersonController change @ApiOperation to
@ApiOperation(value = "Find specific person")
.Additional notes:
Maybe related thing - it would be nice to have to define response field only for not trival classes (e.g. wrappers like ResponseEntity). Currently even for simple classes defined as @apimodel (like Person) response type is not shown in GUI if response is not explicit defined.
The text was updated successfully, but these errors were encountered: