Description
🚀 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:
urls: [
{
path: '/_nodes/stats'
methods: ['GET']
},
{
path: '/_nodes/{node_id}/stats'
methods: ['GET']
},
{
path: '/_nodes/stats/{metric}'
methods: ['GET']
},
{
path: '/_nodes/{node_id}/stats/{metric}'
methods: ['GET']
},
{
path: '/_nodes/stats/{metric}/{index_metric}'
methods: ['GET']
},
{
path: '/_nodes/{node_id}/stats/{metric}/{index_metric}'
methods: ['GET']
}
]
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.