Skip to content

Add version index client for remote OpenAPI spec resolution - #3805

Open
reakaleek wants to merge 2 commits into
issue-718-api-schemafrom
issue-719-version-index-client
Open

Add version index client for remote OpenAPI spec resolution#3805
reakaleek wants to merge 2 commits into
issue-718-api-schemafrom
issue-719-version-index-client

Conversation

@reakaleek

Copy link
Copy Markdown
Member

Why

Docsets should not need to carry OpenAPI spec files locally when specs are already published to the shared bucket. The version-index Lambda (#711) ships a root index.json with { "version": "…" } entries under monikers main/9/8 — not the per-spec _index.json shape from the original RFC.

What

  • Adds VersionIndexClient to fetch https://d29hkgsdo66d1n.cloudfront.net/index.json once per build and reconstruct spec URLs as {org}/{repo}/{version}/{spec-basename}.
  • Wires OpenApiGenerator to resolve main remotely when no local spec: file exists; local override still wins when present.
  • Restores remote-only smoke api: entries in docs/_docset.yml and updates author docs for the shipped index contract.

Stack: merge after #718 (base: issue-718-api-schema).

Closes elastic/docs-eng-team#719

Test plan

  • dotnet test tests/Elastic.ApiExplorer.Tests/ (VersionIndexClient + resolution tests)
  • dotnet test tests/Elastic.Documentation.Configuration.Tests/ (PhysicalDocset)

Made with Cursor

Fetch the shipped root index.json from d29hkgsdo66d1n CloudFront, parse
version-only entries under monikers main/9/8, and reconstruct object
keys for spec fetches. Wire OpenApiGenerator to resolve main remotely
when no local spec exists. Stack on #718 api: schema branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@reakaleek
reakaleek requested review from a team as code owners August 6, 2026 20:15
@reakaleek
reakaleek requested a review from cotti August 6, 2026 20:15
Remote specs ship as YAML while Microsoft.OpenApi reads JSON only. Parse
all spec formats through YamlDotNet and convert to JSON before loading.
Isolate per-API generation errors so one failed remote entry does not
abort serve. Align dev smoke-test keys with the live version index.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant