API reference (auto-generated)
The hand-authored reference at /docs/api/atoms, /docs/api/chain,
/docs/api/marketplace, /docs/api/webhooks, and /docs/api/errors
documents every endpoint group in this run.
Auto-generation
Generating an OpenAPI spec from the route handlers via
zod-to-openapi is deferred to the next run. Most write routes
already use Zod (CI gate enforces this); a follow-up will:
- Tag each route with an OpenAPI operation builder
- Emit
public/openapi.jsonat build time - Render this page from the spec
Why deferred
The route handler shapes are stable enough to hand-author the
reference. Auto-generation is a quality-of-life improvement, not
a correctness requirement. Per the run rules in MEGA_BACKLOG.md
this is recorded in DEVIATION_NOTES.md rather than blocking.
Current shape
Until auto-generation lands, the per-group docs are authoritative
and updated by hand when routes change. Code review against route
handlers ensures the docs don't drift.