You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@ApiOperation with value only breaks displaying documentation for Api (controller) #32
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.
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.
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.
Activity
seawatts commentedon Jan 13, 2014
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"
wkennedy commentedon Jan 13, 2014
@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.
Correctly default to the method in the RequestMapping if no httpMetho…
seawatts commentedon Jan 13, 2014
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?
wkennedy commentedon Jan 13, 2014
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.
seawatts commentedon Jan 13, 2014
Great Thanks again!