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.
| App | Status |
|---|---|
| Project Tracker | Live — 107 endpoints |
| Directory | Not yet wired (INF-18 step 3) |
| Catalog | Not yet wired (INF-18 step 3) |
How it works
- Each app exports a route registry +
generateOpenApiDocument()function (e.g.apps/project-tracker/src/lib/openapi.ts). - A
generate-openapiworkspace script writes the spec to<app>/openapi.jsonat the app root. - CI (
Quality Gates→Check openapi.json freshness) rejects PRs where the committed spec drifts from the Zod source. - The Docusaurus build pulls each
<app>/openapi.json, generates one MDX page per endpoint, and wires them into theapisidebarthat 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.