Plan the printer choice in the JSON body
The printers plan named a request's printer with ?printer= on /print, /preview and the module routes. The owner's rule puts every API input in the JSON body, so the plan now takes printer in the body: beside elements and copies on /print and /preview, and in the module routes' body beside payload and copies, where it already sits. Decision 7 says so. The field belongs to the request, not the receipt, so receipt.Job gains none. An empty printer is the same as none, since JSON makes the two easy to confuse, and "default" names the default printer itself. Its Breaking item goes: every route already refuses a query string. route.by names a request's choice "request" in place of "query". Stage 1b, its tests, the compatibility notes and stage 2a follow. The templates plan's modules take the same body, and design.md's Planned next says printer goes in the body. The rule's list of plans that break it loses the printers plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6bfaee0bc8
commit
c60d7531b2
3 files changed
+53
-51
No files matched your search
+5
-8
@@ -510,12 +510,9 @@ client ─HTTPS─▶ Caddy ─▶ server ── validate ──▶ printqueue (
|
||||
`invalid_query`, after the token and its scope under `/api/v1`, so a
|
||||
caller that still sends one learns so instead of having it ignored. The
|
||||
module routes' body holds the module's payload, `copies` and `printer`.
|
||||
Some of the plans break the rule today, and a later change makes them
|
||||
follow:
|
||||
- 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).
|
||||
One plan breaks the rule today, and a later change makes it follow:
|
||||
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
|
||||
@@ -749,8 +746,8 @@ before anything is built. They come in this order.
|
||||
- One queue with a lane per printer: its own worker, renderer and
|
||||
connection, and `queue.size` per lane. History, references and the
|
||||
store stay shared.
|
||||
- `?printer=` on `/print`, `/preview` and the module routes is a direct
|
||||
unicast; any other query parameter is refused (**Breaking**). Every
|
||||
- A `printer` in the body of `/print`, `/preview` and the module
|
||||
routes is a direct unicast; an empty one is the same as none. Every
|
||||
job status gains `deliveries`. `/healthz` lists every printer, and
|
||||
its code follows the default printer alone.
|
||||
- Routing is done by rules written in Expr
|
||||
|
||||
Reference in new issue
Block a user