-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Add OperationId and Tags to identify and group operations, respectively #1237
Conversation
This is IMHO too specific, and I cannot see why those should be in @alpmestan opinions? |
In the same way paths may have an optional short summary and a longer description for documentation purposes, they may also have an operation id and tags associated (see https://swagger.io/docs/specification/paths-and-operations/). Otherwise, some documentation tools don't display documentation nicely. Servant already has Description and Summary. |
I'd be tempted to say "why not". (it's a bit hard to draw a line that delimits things that we want in the core packages and things that should live in satellite packages. But in this case, description/summary seem close to operationid/tags in spirit.) |
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'm not against including these combinators. But if we decide to land this, we will need to include those in the comprehensive API that we use for our tests, and make sure to include a test or two to guarantee that this doesn't break in the future. A mention or two somewhere in our docs would be great as well. :-)
What are the consequences of being wrong? |
Yes is permanent, no is temporary. Removing (or redoing in non trivial way) things is very difficult.
That said, I don’t like Description combinator we have either. Writing longer pieces of text is not convinient in promoted Symbols.
One option is to change Summary and Docs into more extensible single Docs combinator, and use Fold* like approach with them. Then it should be possible for server, client interpretations, etc to just ignore it, and servant-swagger to add own subcombinators it cares about.
… On 19 Dec 2019, at 9.36, Alex Wied ***@***.***> wrote:
tempted to say "why not"
What are the consequences of being wrong?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There is a similar |
Documentation for endpoints in the type declaration:
OperationId
is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API.Tags
are used to group operations logically by resources or any other qualifier.Both
OperationId
andTags
are needed for differentHasSwagger
instances: