The API is described by a generated OpenAPI document #2028
Notifications
Due Date
No due date set.
Blocks
Reference: sam/archie#2028
Reference in new issue
Block a user
The binary's HTTP API is hand-registered per module, and the dashboard copies its JSON shapes by hand (
ui/src/archie/api.ts), so nothing catches drift between them and no other frontend can be built against a published contract.Describe the API with an OpenAPI 3.1 document generated from the handlers:
humago) is the candidate: each operation is registered with typed input and output, and the document follows from them. Before adopting it, confirm its JSON layer can sit onencoding/json/v2./api/openapi.json, versioned with the release. The committed copy is checked for staleness intask check, like proto and sqlc output.Done when: every
/apiroute appears in the served document with its request and response schemas, and a frontend built from the document alone can sign in and list runs.The API is described by a generated OpenAPI document, and the dashboard's client is generated from itto The API is described by a generated OpenAPI documentDone in
1026d5e3b. All 52/apioperations are registered with Huma behind one admin-token middleware. The document is served at/api/openapi.jsonand.yaml, with a docs page at/api/docs, and committed asapi/openapi.yaml.archie openapiprints it with no database, andtask checkrejects a stale copy. Webhook intake stays outside the API so each source verifies its token before the body is read.Changes on the wire: errors are RFC 9457 problem details (the Vue client reads
detail), and an invalid body answers 422 naming each bad field. Encoding with json/v2 is left to #2031. The docs page loads its viewer from a CDN, which the generated dashboard (#2029) should not copy.Verified against a local binary: no token gets 401; every list route answers 200; a settings read written back is accepted; people and triggers save with optional fields omitted. The admin-token test now runs against the real API and fails when the check is disabled.