Skip to content
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

Common options docs includes docs for options that are not common to all APIs #117244

Open
DaveCTurner opened this issue Nov 21, 2024 · 5 comments
Labels
>bug :Core/Infra/REST API REST infrastructure and utilities >docs General docs changes Team:Core/Infra Meta label for core/infra team Team:Docs Meta label for docs team team-discuss

Comments

@DaveCTurner
Copy link
Contributor

The common options docs describes the truly common options:

  • ?pretty
  • ?human
  • ?filter_path
  • ?error_trace

However it also has some docs about date math which I think would more accurately be described as an API convention, some docs on fuzziness that only apply to search APIs so should be in those APIs docs alone, and the ?flat_settings option which only applies to a few specific APIs too (primarily the ones that reference org.elasticsearch.common.settings.Settings#FORMAT_PARAMS).

Could we rework this area so that the common options page only mentions the truly common options?

@DaveCTurner DaveCTurner added :Core/Infra/REST API REST infrastructure and utilities >bug >docs General docs changes labels Nov 21, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Nov 21, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Nov 21, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@lcawl
Copy link
Contributor

lcawl commented Nov 21, 2024

It's worth noting that this page will likely be retired as we migrate over to the new site (https://www.elastic.co/docs/api/doc/elasticsearch) so if this page is still required, it ought to be re-written as part of the introductory text in the OpenAPI document. In the Kibana API docs, we've added some new pages as x-topics, so the same could be accomplished in one of the overlays, e.g. https://github.com/elastic/elasticsearch-specification/blob/main/docs/overlays/elasticsearch-shared-overlays.yaml

@DaveCTurner
Copy link
Contributor Author

Thanks @lcawl, yes that makes sense. Since we're moving to docs generated from the specification, could we add these common options to every individual endpoint's docs too? Although it's useful to know that these options are automatically available on every endpoint, it's also quite hard to discover that if you're only thinking about a single endpoint.

@lcawl
Copy link
Contributor

lcawl commented Nov 22, 2024

... could we add these common options to every individual endpoint's docs too?

I believe that's the type of info discussed in https://github.com/elastic/elasticsearch-specification/blob/main/docs/behaviors.md#commonqueryparameters and if not it should be something the devtools folks know how to encode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/REST API REST infrastructure and utilities >docs General docs changes Team:Core/Infra Meta label for core/infra team Team:Docs Meta label for docs team team-discuss
Projects
None yet
Development

No branches or pull requests

4 participants