Repository navigation
API Explorer: serve the newest major at the versionless URL and move main to /next - #4971
Merged
Merged
Conversation
The newest released major takes the versionless URL, `main` moves to `next`, and each major keeps `v{N}`. The type has no callers yet. A `children:` page named `next` is now rejected, because it would shadow the `main` tree.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
For versioned APIs, `/api/<key>` and `/api/<key>/v<N>` now render the newest released major, and `main` moves to `/api/<key>/next`. `ApiVersionRoutes` is the one place that maps a version to its URLs: the generator, the floating section, `links.json`, the version picker, the catalog and the search export all read it, and `ApiUrlBuilder.ProductSuffix` is gone. Versionless APIs and APIs without a numeric major keep `main` at `/api/<key>`. A version-index entry named `next` is reported as an error and left out. Supplemental files are validated once per version, so the `/v<N>` copy does not report them twice. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The newest major is served at both `/api/<key>` and `/api/<key>/v<N>`. A `FloatingLinkVersion` now carries an optional `mirror_root` for the second URL, and `ContainsSitePath` matches it, so a link to `/api/<key>/v<N>/...` no longer reads as a missing page. The field is omitted when empty, so older readers of `links.json` see no change. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Search scoping and the navigation swap now treat `/api/<key>/next/` as the unreleased tree. The index still names that tree `main`, so `parseApiTree` maps the segment back to it. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The catalog now opens `/docs/api/elasticsearch`, which serves the newest released major, and the first numbered link in the version picker is an older major. The steps already assert this; the comments now say so. Co-Authored-By: Claude Fable 5.2 <[email protected]>
The version table, the picker text, cross-link resolution and the supplemental overlay now describe the new routing. The pages also note that a local spec edit shows under `/next/` in `serve`, and that `next` is a reserved slug and version name. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Callers read the position of a suffix in a list to tell the numbered copy of the default major from its versionless root. ApiVersionRoutes now names that copy, each tree says if it is the copy, and the frontend reads the URL root of an API path from one function. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4971/ Sample changed pages: |
…ibra review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…fails (per Libra review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rsion (per Libra review) On a host that still serves bump.sh, a link that names the newest major keeps its numbered path, and a link that names main reaches the API root. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…or fails (per Libra review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…review) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…view) Leaving the version out of the export would delete its indexed documents. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ops (per Libra review) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…or (per Libra review) A link without a version is checked against the current version, so on a host that serves bump.sh it now resolves under that version's numbered path instead of the root, where bump.sh serves main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
/docs/api/<key>serves the unreleasedmainspec today, so readers and search engines get unreleased APIs as the default answer./v9), and nothing states which version the versionless URL serves after a major release.Closes elastic/docs-eng-team#1126
What
/api/<key>serves the newest released major. The same major stays at/api/<key>/v<N>, older majors stay at/api/<key>/v<N>, andmainmoves to/api/<key>/next.elasticsearch-serverless) do not change. A versioned API with no numbered major keepsmainat/api/<key>.links.jsonmarks the newest major ascurrentwith rootapi/<key>.mainis hidden with rootapi/<key>/next. A new optionalmirror_rootnames the numbered copy, so links to/api/<key>/v9/...still validate.nextis a reserved segment. A child page or a version namednextfails the build with an error./v<N>path, and a link that namesmainreaches/api/doc/<key>, where bump.sh serves it.maindocuments point at/next.Notes
/nextas the segment) on elastic/docs-eng-team#1210 are still open. The segment is one constant (ApiUrlBuilder.NextSegment). Please do not merge before D1 closes.main. Withdocs-builder serve, a local spec edit now shows under/api/<key>/next, not at the versionless URL.nextfrom the search index (elastic/docs-eng-team#1215, elastic/docs-eng-team#1216, elastic/docs-eng-team#1217).mise run integratedid not run for the search export change.🤖 Generated with Claude Code