Draft
Conversation
Adds a `/docs/rest-api` page powered by Scalar that renders the live OpenAPI spec from the engine. The spec is fetched at build time via a pre-build script and the docs rebuild daily (6am UTC cron) to stay in sync with API changes. Changes: - New `fetch-openapi.py` pre-build script (fetches from production, falls back to cached copy on failure) - Scalar API Reference React component at `/docs/rest-api` - "REST API" link added to the API Reference sidebar section - Sitemap updated with the new page - CI workflow gets daily cron trigger + explicit fetch step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.
Summary
/docs/rest-apipage powered by Scalar that renders the live OpenAPI spec from the engine as interactive API reference documentationeveryrow.io/api/v0/openapi.jsonvia a new pre-build script (fetch-openapi.py), with fallback to a cached copy if the fetch failsNew files
docs-site/scripts/fetch-openapi.pypublic/openapi.json(gitignored)docs-site/src/app/rest-api/page.tsxdocs-site/src/app/rest-api/layout.tsxModified files
docs-site/package.json@scalar/api-reference-react, addedprebuildscriptdocs-site/.gitignorepublic/openapi.jsondocs-site/src/utils/docs.tsdocs-site/src/app/sitemap.ts/docs/rest-apito sitemap.github/workflows/deploy-docs.yamlFuture upgrade path
Currently using Tier 1 automation (daily cron). If the lag between engine deploys and docs updates becomes a problem, can upgrade to Tier 2 (cross-repo
repository_dispatchvia fine-grained PAT) with minimal changes.Test plan
pnpm buildpasses (47 static pages including/rest-api)/docs/rest-apiin browser after deploy🤖 Generated with Claude Code