Skip to content

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.

If you modify any API route schemas in apps/ensapi, regenerate and commit the updated spec from the monorepo root:

Terminal window
# from the monorepo root
pnpm generate:openapi

Then commit the updated docs/ensnode.io/ensapi-openapi.json.

On every PR, our CI runs an openapi-sync-check job that:

  1. Regenerates the OpenAPI spec from the ENSApi route definitions by running pnpm generate:openapi
  2. Compares the freshly generated spec against the committed docs/ensnode.io/ensapi-openapi.json, failing with a diff if they don’t match