Guides
OpenAPI contract
How Host.Api OpenAPI stays the single wire source of truth.
Source of truth
The committed OpenAPI snapshot is the HTTP contract for:
Path in the monorepo:
apps/shared/lib/api/openapi/v1.jsonDo not maintain a second API description for docs. Docs loads that file via fumadocs-openapi.
How the snapshot updates
See apps/shared/lib/api/openapi/README.md:
- Local Host.Api build exports or updates
v1.json(skipped whenCI=true). - Apps verify / start:dev / build runs Orval into
apps/shared/lib/api/generated/and fails on drift. - Commit both
v1.jsonand generated clients when contracts change.
Drift story
| Symptom | Fix |
|---|---|
| Docs API page missing a new endpoint | Rebuild Host.Api locally so v1.json refreshes, commit it, restart docs |
| Apps Orval fails verify | Export OpenAPI, regenerate clients, commit both |
| Docs still shows old ops after pull | Restart pnpm start:dev (schema is read on the server) |
Bruno collections and MCP tools are operator surfaces. They should match the same Host.Api behavior, but they are not a second OpenAPI SoT for this site.
Tags
Host.Api assigns capability tags from the route path (OpenApiDomainTagsTransformer): Tenancy, ClientMaster, Identity, Observability, FeatureFlags, Timeline, LoadTesting, Platform. The docs API sidebar groups by those tags.