REST API Documentation
Our REST API docs are rendered by Scalar directly from a committed OpenAPI spec at docs/ensnode.io/ensapi-openapi.json. The Scalar component in the API Reference page imports the spec at build time, so any changes to the spec are reflected on the next docs build.
Updating the OpenAPI Spec
Section titled “Updating the OpenAPI Spec”If you modify any API route schemas in apps/ensapi, regenerate and commit the updated spec from the monorepo root:
# from the monorepo rootpnpm generate:openapiThen commit the updated docs/ensnode.io/ensapi-openapi.json.
OpenAPI Spec Sync Check
Section titled “OpenAPI Spec Sync Check”On every PR, our CI runs an openapi-sync-check job that:
- Regenerates the OpenAPI spec from the ENSApi route definitions by running
pnpm generate:openapi - Compares the freshly generated spec against the committed
docs/ensnode.io/ensapi-openapi.json, failing with a diff if they don’t match