Repository navigation
Serve the current released minor in API docs, not an unreleased one - #5102
Merged
Merged
Conversation
The OpenAPI version index lists the highest published minor per major, so the `v9` tree showed `9.6` before 9.6 shipped. The resolved minor is now capped at the product's `current:` in `versions.yml`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reakaleek
approved these changes
Dec 2, 2026
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5102/ |
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.
The
v9API reference tree now renders the spec of the product's current release (9.5) instead of the highest published branch (9.6, not released yet).Affects: API reference
Prompt summary: The API docs show 9.6 while the 9.6 release is delayed. The ask is to point each API at its current released spec version, taken from
config/versions.yml. Showing every maintained minor is a later step.Why
The OpenAPI version index (
index.json) keeps only the highest published minor per major, so it maps9to9.6as soon as the9.6spec branch publishes. The docs then show APIs for a release that has not shipped. The9.5spec is already in the bucket.What
Cap the resolved minor at the current release
VersionIndexClient.CapAtCurrentReleasecompares each index version with the API product's versioning system. A minor above thecurrent:minor in the same major falls back to that minor, so with stack9.5.7thev9tree readselastic/elasticsearch-specification/9.5/elasticsearch.json. Older majors,main(served at/next), and versionless products such as serverless stay as the index lists them. ECE follows its owncurrent:.Test fixtures declare a realistic current release
TestHelpers.CreateStackVersionsConfigurationnow defaultscurrentMinorto4. The generator tests serve a9.4index entry, and with the old9.0default the cap asked for a spec the stubs do not serve.Risk: an API whose spec was never published at the current minor (first published in a later minor) loses its numeric tree until that release ships.
Out of scope: listing every maintained minor in the version switcher, and a
serverless-kibanaproduct.Closes https://github.com/elastic/docs-eng-team/issues/1296
Verify
🤖 Generated with Claude Code