Skip to content

Name the release branch on released API landing pages - #5018

Merged
akira28 merged 3 commits into
mainfrom
feature/documentation-derived-main-branch
Nov 23, 2026
Merged

akira28 merged 3 commits into
mainfrom
feature/documentation-derived-main-branch

Conversation

@akira28

@akira28 akira28 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Released API landing pages now say their documentation is derived from the release branch instead of main. Elasticsearch v9 shows 9.6, Kibana v9 shows 9.6 and Logstash v9 shows 9.5. The v8 pages already name 8.19.

Affects: API reference

Prompt summary: The "This documentation is derived from the main branch" sentence on the current Elasticsearch, Kibana and Logstash API references should name the latest 9.x minor version, the way the v8 pages name 8.19. The unreleased main pages keep saying main.

Why

The sentence comes from each spec's own info.description, not from docs-builder. The Elasticsearch 9.6, Kibana 9.6 and Logstash 9.5 specs in the specs bucket still say main, so the pages for the released major claim they show unreleased content.

What

Released specs name the branch they were published from

When OpenApiGenerator loads a remote spec for a version other than main, it replaces "derived from the `main` branch" with the branch from the version index. The rewrite applies to every API product. The spec published under the main moniker keeps its wording, even when a repository publishes it from master. Local spec files stay as they are. It happens at load time, so the landing page, its meta description and the catalog entry all show the same branch.

Out of scope: the root cause sits in each upstream spec. elastic/elasticsearch-specification#7046 fixes the Elasticsearch 9.6 overlay. If upstream rewords the sentence, the rewrite stops matching and the page shows the spec's text unchanged.

Verify

dotnet test --project tests/Elastic.ApiExplorer.Tests --treenode-filter "/*/*/OpenApiGeneratorMultiVersionTests/*"
# ResolveDocumentsForProduct_ReleasedSpecSaysMainBranch_NamesTheIndexBranch

Check on the preview

🤖 Generated with Claude Code

The 9.6 spec description says it is derived from the `main` branch, so the v9 API landing page shows `main` while v8 shows `8.19`. `OpenApiGenerator` now rewrites that sentence to name the branch the version index published.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@akira28 akira28 added the bug label Nov 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@akira28 akira28 changed the title Name the release branch on released Elasticsearch API landing pages Name the release branch on released API landing pages Nov 23, 2026
@akira28
akira28 marked this pull request as ready for review November 23, 2026 18:57
@akira28
akira28 requested a review from a team as a code owner November 23, 2026 18:57
@akira28
akira28 requested a review from theletterf November 23, 2026 18:57
…ster

The rewrite now checks the `main` moniker instead of the branch name, because `elastic/cloud` publishes `main` from `master`. A test runs the rewrite through version resolution, so it fails if the resolver stops applying it or passes the major instead of the branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@akira28
akira28 merged commit 36f6e53 into main Nov 23, 2026
44 checks passed
@akira28
akira28 deleted the feature/documentation-derived-main-branch branch November 23, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant