Skip to main content

dashboard-be API documentation handoff

The api-docs branch applies source-backed public contract corrections after OpenAPI export. The items below should move upstream into dashboard-be so the generated contract is correct without an override.

Required backend changes

Tests to add in dashboard-be

  1. Export OpenAPI in CI and validate every request/response example against its schema.
  2. Snapshot public v1 operation IDs, methods, paths, auth, and response envelopes.
  3. Assert @ApiExcludeEndpoint() routes are absent from exported OpenAPI.
  4. Exercise Create Agent, Publish Agent, Create Call, list envelopes, and webhook registration in a non-production environment.
  5. Fail when a DTO example violates its type, enum, minimum, maximum, or required fields.

Repository and environment actions

  • Change the api-docs GitHub default branch from the two-file master stub to main, then archive or redirect master.
  • Provide a safe staging workspace, test phone destination, API key secret, and spending guard before enabling nightly billable golden-path checks.
  • Decide who owns the webhook event catalog and rate-limit contract so the docs have an authoritative reviewer.

Removing docs overrides

After backend fixes merge, export a fresh OpenAPI file, run scripts/improve_v1_openapi.py, and inspect the diff. Remove an override only when the raw backend export already contains the same correct schema or example and scripts/validate_v1_api_docs.py still passes.