Skip to content

Assembler: generate API Explorer pages behind staging flag - #3819

Open
reakaleek wants to merge 7 commits into
mainfrom
cursor/ccbe8926
Open

Assembler: generate API Explorer pages behind staging flag#3819
reakaleek wants to merge 7 commits into
mainfrom
cursor/ccbe8926

Conversation

@reakaleek

@reakaleek reakaleek commented Aug 10, 2026

Copy link
Copy Markdown
Member

Why

  • The assembler build does not generate API Explorer HTML today, so staging cannot serve docs-builder API pages before the bump.sh cutover.
  • We need a safe rollout path that keeps production unchanged while we validate generated pages on staging.

What

  • Add an assembler-api-explorer feature flag, enabled only for the staging assembler environment.
  • Wire OpenApiGenerator into the assembler build when the flag is on, fetching multi-version specs from the version index.
  • Add unit and integration tests for the flag gate and generated output paths.
  • Add a synthetics journey for /docs/api that uses the API version switcher, gated on FEATURE_ASSEMBLER_API_EXPLORER.

Notes

  • Sitemap generation still excludes /docs/api/ until the bump.sh proxy cutover (elastic/docs-eng-team#725).
  • CI sets FEATURE_ASSEMBLER_API_EXPLORER=true so local synthetics can exercise generated API pages.

Made with Cursor

Wire OpenApiGenerator into assembler builds only when
assembler-api-explorer is enabled (staging), and add a gated
synthetics journey that exercises /docs/api and the version switcher.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Move API Explorer generation off the docs-builder docset: discover api:
blocks from any assembled set, aggregate one catalog, and validate
duplicate keys. Split OpenApiGenerator into product and catalog steps.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@reakaleek
reakaleek marked this pull request as ready for review August 11, 2026 08:35
@reakaleek
reakaleek requested review from a team as code owners August 11, 2026 08:35
@reakaleek
reakaleek requested a review from technige August 11, 2026 08:35
reakaleek added a commit to elastic/docs-content that referenced this pull request Aug 11, 2026
## Why

Assembler API Explorer generation now discovers `api:` blocks from
assembled docsets instead of docs-builder. The narrative docset must own
the site-wide API declarations so staging builds can render `/docs/api/`
after the docs-builder change lands.

## What

Adds the six remote `api:` keys to `docset.yml` and moves the Kibana
spaces child page to `api/kibana/kibana-api-overview.md`. Explicit
`repository:` values are kept so specs resolve from their owner repos
even though the declaring checkout is docs-content.

## Notes

Land this PR before or together with
[elastic/docs-builder#3819](elastic/docs-builder#3819).

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
reakaleek and others added 2 commits August 11, 2026 11:07
Select only visible operation links so collapsed navigation entries do not
cause the journey to time out.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The API Explorer synthetic looked for an operation link on a product
landing page, but every sidebar group renders collapsed there: the
subtree is hidden until its checkbox is checked, and the client script
only expands ancestors of the current page. The step now opens the first
collapsed branch until an operation link is clickable.

Assembler OpenAPI tests also created scratch directories in the
repository root and never removed them. They now use a disposable
temporary directory under the gitignored .artifacts folder, which stays
inside the working directory root that ScopedFileSystem requires.

Co-authored-by: Cursor <cursoragent@cursor.com>
The final step waited for #elastic-docs-v3, the content wrapper of the
markdown layout. Operation pages render #elastic-api-v3 instead, so the
assertion could never pass. Checking for a wrapper also proved nothing
about the page, so the step now asserts the HTTP method and route that
the operation renders under "Paths".

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants