Skip to content

Sort the parameters and properties for each endpoint #4224

Open
@lcawl

Description

@lcawl

🚀 Feature Proposal

Since the API docs are published directly from the OpenAPI documents either the transform-to-openapi script needs to sort list of parameters and properties (alphabetically) or else we must rely on all contributors to ensure the properties and parameters are sorted in their specifications.

Motivation

We received the following feedback about the _search endpoint: "The order of the query parameters and objects listed after “Body” are confusing because they are mostly in alphabetical order, but not quite. Therefore, I first overlooked what I was looking for because I assumed they were all in alphabetical order only to realize later when I read through every single item on the page that they are not really in alphabetical order."

Example

For example, in https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-search the list of query parameters is as follows:

This matches the order they're listed in https://github.com/elastic/elasticsearch-specification/blob/main/specification/_global/search/SearchRequest.ts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions