Add version index client for remote OpenAPI spec resolution - #3805
Open
reakaleek wants to merge 2 commits into
Open
Add version index client for remote OpenAPI spec resolution#3805reakaleek wants to merge 2 commits into
reakaleek wants to merge 2 commits into
Conversation
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>
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>
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.
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.jsonwith{ "version": "…" }entries under monikersmain/9/8— not the per-spec_index.jsonshape from the original RFC.What
VersionIndexClientto fetchhttps://d29hkgsdo66d1n.cloudfront.net/index.jsononce per build and reconstruct spec URLs as{org}/{repo}/{version}/{spec-basename}.OpenApiGeneratorto resolvemainremotely when no localspec:file exists; local override still wins when present.api:entries indocs/_docset.ymland 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