Skip to content

Conversation

pquentin
Copy link
Member

As a first step towards generating the rest-api-spec from the Elasticsearch specification, I'm replacing the documentation URL and description with data from the Elasticsearch specification, when available. The description is just the title instead of the full description, which would have been too long, since it's a full-blown Markdown text.

@elasticsearchmachine elasticsearchmachine added v9.2.0 needs:triage Requires assignment of a team area label labels Aug 22, 2025
@pquentin pquentin added >docs General docs changes Team:Docs Meta label for docs team Team:Clients Meta label for clients team v8.19.3 v9.1.4 v9.0.7 and removed needs:triage Requires assignment of a team area label labels Aug 22, 2025
@elasticsearchmachine elasticsearchmachine removed the Team:Clients Meta label for clients team label Aug 22, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@pquentin pquentin requested review from lcawl and removed request for lcawl August 26, 2025 13:50
"stability":"stable",
"stability":"experimental",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is intentional. All other internal APIs are experimental, which allows them to have a null URL. This is enforced in the JSON Schema.

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Hopefully in the long term those URLs can be generated (e.g. from https://github.com/elastic/elasticsearch-specification/blob/main/specification/_doc_ids/table.csv like we do in elasticsearch-specification) and/or contain only an id instead of a url so it's simpler to maintain.

@pquentin
Copy link
Member Author

Thank you @lcawl! Yes, this PR is part of the work to generate rest-api-spec from the Elasticsearch specification. All those URLs do come from table.csv.

@pquentin pquentin added the auto-backport Automatically create backport pull requests when merged label Aug 28, 2025
@pquentin pquentin merged commit 8697379 into elastic:main Aug 28, 2025
33 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1 Commit could not be cherrypicked due to conflicts
9.0 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 133386

pquentin added a commit to pquentin/elasticsearch that referenced this pull request Aug 29, 2025
elastic#133386)

* rest-api-spec: use url and description from Elasticsarch specification

* Remove doc URLs for internal APIs

* Fix more URLs

They had a whitespace that the regex did not account for.

* Fix more URLs

* Fix JSON Schema validation

(cherry picked from commit 8697379)

# Conflicts:
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
pquentin added a commit to pquentin/elasticsearch that referenced this pull request Aug 29, 2025
elastic#133386)

* rest-api-spec: use url and description from Elasticsarch specification

* Remove doc URLs for internal APIs

* Fix more URLs

They had a whitespace that the regex did not account for.

* Fix more URLs

* Fix JSON Schema validation

(cherry picked from commit 8697379)

# Conflicts:
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.get_query.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.list_queries.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_data_stream_options.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_options.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_settings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_options.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_settings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.remove_block.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_amazonsagemaker.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_deepseek.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
@pquentin
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.19

Questions ?

Please refer to the Backport tool documentation

pquentin added a commit to pquentin/elasticsearch that referenced this pull request Aug 29, 2025
elastic#133386)

* rest-api-spec: use url and description from Elasticsarch specification

* Remove doc URLs for internal APIs

* Fix more URLs

They had a whitespace that the regex did not account for.

* Fix more URLs

* Fix JSON Schema validation

(cherry picked from commit 8697379)

# Conflicts:
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.get_query.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.list_queries.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.remove_block.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
pquentin added a commit that referenced this pull request Aug 29, 2025
#133386) (#133783)

* rest-api-spec: use url and description from Elasticsarch specification

* Remove doc URLs for internal APIs

* Fix more URLs

They had a whitespace that the regex did not account for.

* Fix more URLs

* Fix JSON Schema validation

(cherry picked from commit 8697379)

# Conflicts:
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
pquentin added a commit that referenced this pull request Aug 29, 2025
#133386) (#133784)

* rest-api-spec: use url and description from Elasticsarch specification

* Remove doc URLs for internal APIs

* Fix more URLs

They had a whitespace that the regex did not account for.

* Fix more URLs

* Fix JSON Schema validation

(cherry picked from commit 8697379)

# Conflicts:
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.get_query.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.list_queries.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_data_stream_options.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_options.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_settings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_options.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_settings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.remove_block.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_amazonsagemaker.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_deepseek.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
pquentin added a commit that referenced this pull request Aug 29, 2025
#133386) (#133796)

* rest-api-spec: use url and description from Elasticsarch specification

* Remove doc URLs for internal APIs

* Fix more URLs

They had a whitespace that the regex did not account for.

* Fix more URLs

* Fix JSON Schema validation

(cherry picked from commit 8697379)

# Conflicts:
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.get_query.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/esql.list_queries.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_data_stream_mappings.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/indices.remove_block.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_ai21.json
#	rest-api-spec/src/main/resources/rest-api-spec/api/inference.put_llama.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged backport pending >docs General docs changes Team:Docs Meta label for docs team v8.19.4 v9.0.7 v9.1.4 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants