Record that API inputs go in the JSON body
Security / Vulnerability check (push) Successful in 51s
Test / Lint and test (push) Successful in 4m9s

The owner decided that across the whole API an input goes in the
request's JSON body, never in a query parameter. The path holds only a
resource's ID, or a fixed word that names the route, as last, failed
and uncertain do for the reprint routes, and a GET takes no inputs
beyond its path.

design.md records the decision beside the error shape and lists what
breaks it today, for a later change to fix: the module routes' copies
and printer query parameters and the invalid_query code that refuses
them, the printers plan's ?printer=, and the filters and paging the
job-store plan's phase 2 puts in the job list's query. CLAUDE.md's
route rule says the same, on the owner's word. The code, the printers
plan, api.md and swagger.json are unchanged here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 5.5 committed 2026-12-01 21:28:38 -06:00
1 parent cee528aa83
commit 2e291817d3
2 files changed
+16 -1

No files matched your search

+12
View File
@@ -498,6 +498,18 @@ client ─HTTPS─▶ Caddy ─▶ server ── validate ──▶ printqueue (
`error` is for people. A refusal is answered and never logged as a failure.
An unexpected error or panic is logged once and reported to Sentry once,
without the body or the `Authorization` header.
- **Inputs go in the JSON body (owner, 2026-12-01).** An API input goes in
the request's JSON body, never in a query parameter. The path holds only
a resource's ID, or a fixed word that names the route, as `last`,
`failed` and `uncertain` do in `/jobs/.../reprint`. A `GET` takes no
inputs beyond its path. Some of the API breaks the rule today, and a
later change makes it follow:
- the module routes' `copies` and `printer` query parameters, and the
`invalid_query` error code that refuses them;
- the `?printer=` that docs/plans/printers.md puts on `/print`,
`/preview` and the module routes;
- the filters and paging that docs/plans/job-store.md's phase 2 puts in
the query of `GET /api/v1/jobs` (its decision 16).
- **The OpenAPI document is generated (owner, 2026-11-30).** One route
table drives both the server's routes and `docs/swagger.json`, so the
document cannot describe a route the server lacks. Schemas come from the