-
Notifications
You must be signed in to change notification settings - Fork 96
Unique summaries per path #4277
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
Comments
I encountered this issue too and can provide an example: the get snapshot status API has a summary which mentions the |
Also relevant for several of the ML APIs (not just datafeed preview). ![]()
With the added complication that is includes This was represented as a single page in old docs. https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-preview-datafeed.html |
@swallez If we have to continue publishing all variations of the paths from a single specification file and want to have some way of defining unique operation summaries at a minimum, could it perhaps be accomplished in the specifications like this?:
... or whatever text makes it easier for folks to skim and understand the differences |
IMO unless we get feedback from a lot of users otherwise, it's okay from a docs point of view to have those variations appear only in the description for a single operation. We'd just need to ensure the description includes advice about why you'd use one over the other and how/if their request and response bodies (if applicable) differ. Since OpenAPI currently insists that all path parameters are required, we'd also ideally mention in those parameter descriptions what happens if you omit them (e.g. if cc @szabosteve and @georgewallace in case you want to weigh in
Yes, from a docs point of view, having complete specifications (and in particular, unique summaries and descriptions) for each path is the most accurate. |
🚀 Feature Proposal
Have a maximum of one specification per unique path.
Alternatively, have a method for specifying a unique operation summary for each unique path so that this information can be used in the OpenAPI document output.
NOTE: This might eventually overlap with a desire for something like x-tagGroups, where we could group similar endpoints and affect the navigation such that tags have a hierarchy. That's not yet supported in our publishing system, however.
Motivation
Currently we can have multiple paths represented in a single specification, for example:
https://github.com/elastic/elasticsearch-specification/blob/main/specification/nodes/stats/NodesStatsRequest.ts
Since they're all covered in a single specification, they all share the same operation summary and description in the OpenAPI output, which makes it harder to tell which one to use:
Example
Since we only had a single page in the old docs for content like this (e.g. https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html) we don't have an example that shows how the description should vary, but the work required to explain those difference is worth the effort IMO.
The text was updated successfully, but these errors were encountered: