Skip to Content
Addition Docs
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.json

Do 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:

  1. Local Host.Api build exports or updates v1.json (skipped when CI=true).
  2. Apps verify / start:dev / build runs Orval into apps/shared/lib/api/generated/ and fails on drift.
  3. Commit both v1.json and generated clients when contracts change.

Drift story

SymptomFix
Docs API page missing a new endpointRebuild Host.Api locally so v1.json refreshes, commit it, restart docs
Apps Orval fails verifyExport OpenAPI, regenerate clients, commit both
Docs still shows old ops after pullRestart 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.

On this page