-
Notifications
You must be signed in to change notification settings - Fork 19
Improve swagger documentation with operation annotations #183
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
|
|
||
| @Operation( | ||
| summary = "Process channels by query", | ||
| description = "Manually trigger processing on channels matching the given query.", |
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.
Should we add here what kind of keywords can be used in the query? Like:
You can use the following keywords as search parameters to filter on specific fields:
- ~name
- ~tag
- ~size
- ~from
You can use the '!' character at the end of keyword to negate the filtering expression
(for used keywords only tag can have negating). e.g.: ~tag!
You can use the following characters as dividers for searching for values: [|,;]
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 guess that should be done through @Parameter annotations, but here only a single one for all params (due to MultiValueMap<String, String>)?
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, Imre pointed out in the last pr that unfortunately changing the multivaluemap would break the API. So for now the best way is to add the information in the operation or the parameter description
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.
Yeah I see that too. Maybe we should have a backlog ticket to at least record this - I assume we will want to change it for a v2 API?
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 guess the param annotation really should be in the query methods in ChannelManager and ChannelScroll instead of on the processor, or?
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.
Yeah I see that too. Maybe we should have a backlog ticket to at least record this - I assume we will want to change it for a v2 API?
I think so yes, but v2 API I think we should try design from scratch
I guess the param annotation really should be in the query methods in ChannelManager and ChannelScroll instead of on the processor, or?
Also here on the processor I think
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.
Turns out it was relevant in even more places, so I extracted the message into a var. Harms readability a little bit, but at least the descriptions should not diverge now.
|



No description provided.