Skip to main content

API Reference

Each Constellation app exposes a Zod-validated HTTP API. OpenAPI 3.1 specs are generated from the Zod schemas via zod-openapi, and docusaurus-plugin-openapi-docs renders them as interactive reference pages with "try it" panels and code samples.

AppStatus
Project TrackerLive — 107 endpoints
DirectoryNot yet wired (INF-18 step 3)
CatalogNot yet wired (INF-18 step 3)

How it works

  1. Each app exports a route registry + generateOpenApiDocument() function (e.g. apps/project-tracker/src/lib/openapi.ts).
  2. A generate-openapi workspace script writes the spec to <app>/openapi.json at the app root.
  3. CI (Quality GatesCheck openapi.json freshness) rejects PRs where the committed spec drifts from the Zod source.
  4. The Docusaurus build pulls each <app>/openapi.json, generates one MDX page per endpoint, and wires them into the apisidebar that renders when you land on any /api/* page.

To regenerate PT's spec after a schema change:

npm run generate-openapi --workspace=@constellation/project-tracker
git add apps/project-tracker/openapi.json

See INF-18 for the rollout that adds Directory and Catalog to this pipeline.