Repository navigation
Show the minor release in API docs, such as 9.6 and 8.19 - #5019
Merged
Merged
Conversation
The version index already maps each major to a minor branch, but only the spec's object key used it. The landing "Version" fact and the older-major badge now name the minor. Specs cannot supply it: `info.version` is empty for Elasticsearch and Kibana and a constant `1` for ECE. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`int.TryParse` also accepts a sign and surrounding white space, so a branch such as `8.-19` showed as a release instead of falling back to the major. `ApiVersions.ReleaseOf` now requires digits only. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The version notice snapshots never read the fact, so reverting it to `info.version` left every test green. The fact now has its own snapshot: the indexed minor on the versionless URL, `/v9/` and `/v8/`, and the spec version on `/next`. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The release rode on the version switcher, which is empty when a single spec loads, so a lone `3 → 3.8` tree fell back to `info.version` (`1` for ECE) and a lone older major lost its minor badge. `ApiRenderContext.Release` now carries it from the tree, like `Moniker`, and the switcher no longer knows about releases. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5019/ Sample changed pages: |
The guide still said an older major shows `Version 8`. It now says the label and the landing `Version` fact name the indexed minor, such as `8.19`, with or without a version picker, and fall back to the major when the index names none. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lorer guide The guide mixed two rules. The landing `Version` fact shows on every tree. The older-major label shows only on older majors, and the newest major and `main` at `/next/` have none. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The guide promised the fact on every tree, but a `/next/` or bare-major landing page omits it when the spec's `info.version` is empty. It now says only that the picker does not decide whether the fact appears. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The guide said the label shows only on older majors, but a non-default moniker such as `beta` renders `Version beta` at `/api/<key>/vbeta/`. It now names older majors as the usual case and the `beta` case as the other. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The guide's `Version beta` example was wrong for a `beta` entry that points to a `major.minor` branch such as `9.6`, which reads `Version 9.6`. The paragraph now states the rule once: the label names the minor when the entry points to a `major.minor` branch, and the moniker otherwise. Raised in review of #5019. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 API landing page now names the minor release it renders from, such as
9.6, and an older major's badge readsVersion 8.19instead ofVersion 8.Affects: API reference
Prompt summary: Show the actual minor version in the API docs, and find out whether our data has it. The version index has it. The specs do not.
Why
Readers see
v9andv8but not which minor release a page documents. The version index already maps each major to a minor branch (9to9.6,8to8.19, ECE3to3.8), but only the spec's object key used it. The specs cannot supply it:info.versionis empty for Elasticsearch and Kibana and a constant1for ECE, so the landing "Version" fact was hidden or wrong.What
Landing "Version" fact
The fact shows the minor release of the tree being viewed, and falls back to the spec's
info.versiononly when the index names no minor. Elasticsearch shows9.6, and ECE no longer shows1.Older-major badge and notice
The badge beside the title reads
Version 8.19. A major with no minor in the index keepsVersion 8.Where the minor comes from
ApiVersions.ReleaseOfaccepts amajor.minorbranch and returns null formain,master, a bare major, or a patch version.OpenApiGeneratorsetsApiRenderContext.Releasefrom each tree, next toMoniker, so the minor still shows when only one version renders and the switcher is empty. The branch must be digits on both sides of the dot. URLs and switcher labels stay on majors, so navigation does not change.The API Explorer guide
The guide in
docs/data/openapi/api-explorer.mdnames the minor release in the notice table and the badges row, and says what the label and the landing fact show when only one version renders or when the index names no minor.Verify
Out of scope: the version dropdown still lists majors only. A minor beside each option is a separate UX call.
Risk: the value is the spec branch the page renders from. A spec repo can cut a minor branch before that minor ships, so the label can name an unreleased minor for a few weeks.
Check on the preview
Version 8.19badge beside the title and8.19in the right rail.9.6in the right rail and no badge.3.8where the spec's own version reads1.9.5and nothing else changes.