Canonical spec (product monorepo)#
- OpenAPI 3.0.3
- Base paths under
/api - Tags by domain (Users, Tasks, Finance, …)
- Security schemes: session bearer (+ cron bearer on internal routes)
Copy on the docs site#
Docs7 only packages the apps/docs directory. That is why there is a copy:
The sidebar includes the OpenAPI Reference group, generated automatically from that file (pages per operation + playground).
How to keep them in sync#
When you change routes or schemas in Go:
- Update
apps/api/docs/openapi.yaml(backend source of truth). - Copy to docs:
- Commit both files in the same PR.
- Merge to
main→ Docs7 redeploy.
Tip
Ideally a CI script docs:sync-openapi does the cp and fails if they differ. It can be added later.
Playground#
- Spec servers:
http://localhost:{port}/apiand a configurable server. - Do not use production secrets in public demos.
Partial specs#
| File | Use |
|---|---|
apps/api/openapi/finance.v1.yaml | Versioned finance / experiments |
You can link additional specs in docs.json when they are mature.
Validate locally#
Download#
If the page menu exposes a spec download, use that. The YAML also lives at
/openapi/agata-v1.yaml on the docs host (Docs7). Until that host serves the
file, the published mirror copy is
https://raw.githubusercontent.com/fanivi-dev/agata-docs/main/openapi/agata-v1.yaml
(byte-matched with apps/docs/openapi/agata-v1.yaml).