Skip to content

OpenAPI: add Lambda that maintains the spec version index - #3777

Open
reakaleek wants to merge 2 commits into
mainfrom
openapi-version-index-lambda
Open

OpenAPI: add Lambda that maintains the spec version index#3777
reakaleek wants to merge 2 commits into
mainfrom
openapi-version-index-lambda

Conversation

@reakaleek

Copy link
Copy Markdown
Member

What

  • Add a Lambda that maintains index.json at the root of the elastic-docs-openapi-specs bucket. The index resolves each published major version of an OpenAPI spec to its highest minor, and keeps main as its own entry.
  • Add Elastic.Documentation.OpenApiIndex, a shared library that holds the index format, the build logic, and the S3 publish logic, with unit tests.

Why

Notes

  • Each event rebuilds the whole index from a full bucket listing instead of merging the triggering event. The rebuild self-heals after a missed event, and a deleted object simply cannot produce an entry.
  • The write uses an S3 ETag precondition. If a concurrent invocation wins, the message returns to the queue and SQS redelivery repeats the rebuild. There is no in-process retry.
  • The main or <major>.<minor> version contract is enforced upstream in elastic/docs-actions openapi/upload, which ships separately. The Lambda logs and skips any key that does not match that shape.

Made with Cursor

reakaleek and others added 2 commits August 5, 2026 13:48
Co-authored-by: Cursor <cursoragent@cursor.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.

2 participants