Record that API inputs go in the JSON body
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:
1 parent
cee528aa83
commit
2e291817d3
2 files changed
+16
-1
No files matched your search
@@ -151,7 +151,10 @@ main. A change is done when the gate passes and the docs under `docs/` (or
|
||||
entry in the table in `server/routes.go`, never a direct
|
||||
`app.Get`/`Post`; it also needs its case in `TestRoutesConform`, which
|
||||
fails for a route without one, and `TestRegisteredRoutesAreTheTable`
|
||||
fails for a route registered outside the table.
|
||||
fails for a route registered outside the table. API inputs go in the
|
||||
JSON body, never in query parameters: the path holds only a
|
||||
resource's ID or a fixed word naming the route, and a `GET` takes no
|
||||
inputs beyond its path (design.md, "Inputs go in the JSON body").
|
||||
- An enum value or a limit goes into the field's `jsonschema` tag. The
|
||||
tests in `receipt/schema_test.go`, `printqueue/schema_test.go` and
|
||||
`server/schema_test.go` hold the tags to validation, to the Go constants
|
||||
|
||||
Reference in new issue
Block a user