-
Notifications
You must be signed in to change notification settings - Fork 19
Improve swagger documentation with response objects and status-codes #182
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
Conversation
|
Is it possible to replace all the MultiValueMap with more specific list of query params? Most of them I think are for the search and it should be possible to have query params like: ~size |
|
Well, yes and no. Another thing I just noticed that if the RequestBody is an Iterable type, it is not showing up on swagger. I think it can not decide what structure it should show/parse, since List, Map,... have different structure. |
anderslindho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Largely looks good to me, but some nitpicks here and there.
@jacomago I don't think we will want to create a release with annotating the operations... Should we create follow-up or handle here? It might 2x the PR and work.
| * @param allRequestParams query parameters | ||
| * @return list of all channels | ||
| */ | ||
| @ApiResponses( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add @Operation annotations here and elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can ignore this part @imretoth-ess - I will create a sub-task and I can take that myself so you don't have to modify the scope in the middle of the PR
| responseCode = "200", | ||
| description = "The number of matches for the query, and the first 10k channels", | ||
| content = @Content( | ||
| array = @ArraySchema(schema = @Schema(implementation = SearchResult.class)))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, doesn't this return a SearchResult object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it responds with a SearchResult object that contains only 2 fields: a count, and a List of Channels - but on the response List length there is a restriction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacomago thoughts?
| /** | ||
| * PUT method for creating multiple channels. | ||
| * | ||
| * @param channels - XmlChannels to be created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically out of scope for your PR but this isn't right - both XmlChannels and "to be created" (as it's PUT)
|
|
|
LGTM |



Extended swagger documentation for the REST interface with response objects and status-codes