MiravoMiravo

OpenAPI

Fetch Miravo's generated admin API contract from a running factory or from the repository, and reuse the schema in your tooling.

Miravo generates one OpenAPI document for the admin API. The same contract backs the live /api/openapi.json route, the checked-in docs/api/openapi.json file, and the Console's generated admin client.

Fetch the live document

curl -s http://127.0.0.1:8080/api/openapi.json | jq .
  • GET /api/openapi.json does not require authentication.
  • Standalone binaries serve an embedded copy of the document.
  • The default admin server listens on port 8080.

Regenerate from source

bun run gen:openapi
  • Route metadata lives in packages/shared/src/admin/endpoints.ts.
  • Schema registration lives in packages/shared/src/admin/openapi-registry.ts.
  • The command writes the document to docs/api/openapi.json.
  • It also refreshes packages/console/src/lib/admin-client.generated.ts.

Was this page useful?

Last updated on