Skip to content

docs(api-v1): every v1 route reads JSON only, to be revisited if a real client sends a form - #214

Merged
aRustyDev merged 1 commit into
mainfrom
docs/v1-reads-json-only
Nov 16, 2026
Merged

aRustyDev merged 1 commit into
mainfrom
docs/v1-reads-json-only

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

A follow-up to #58 (closed): it records the owner's decision of 2026-11-16 that every /api/v1 route reads JSON only. A body that is a form or multipart is a 415, on the projects, the states, the labels and the work items alike. It changes no behaviour and no document: it makes four records agree with what the oracle's gate already assumed.

Why

D-030 (5) said it for projects, and the owner confirmed it on 2026-11-07, for projects. When the schema diff found the same 415 on the states, the labels and the work items, I recorded each as a new item (D-031 (5), D-032 (6), D-033 (11)), marked proposed, because I did not take one resource's confirmation for another's. They were the same question, and one answer settles them. The scope in exceptions.yaml had said all along that the fuzzer sends JSON only because Thrust answers 415 to the others "on purpose", for all 32 operations.

What it says

  • D-030 (5) is the rule for the four resources, and carries the trigger to revisit it: a real client that sends a form (an integration, a script, a report from a user). Nothing says one does today: the gate sends JSON only and the corpus has no form exchange. Reading forms would be a feature of its own, because DRF reads HTML input by other rules than JSON (strings only, a list as repeated keys, an empty string for a null), so it is a second input path per field, which can be held to the pin only by form exchanges recorded on it. It also notes what the pin does: DRF's default parsers, with the same JSON example repeated under each media type in its schema, and on a project the form is read as lists, so every text field answers "Not a valid string.".
  • D-031 (5), D-032 (6) and D-033 (11) are marked confirmed, as D-030 (5), and the "proposed and not yet confirmed" is gone from their rows.
  • The register: the eight entries (SD-004, SD-005, SD-010, SD-011, SD-013 to SD-016) cite the decision with its dates.
  • Comments: the four a_form_or_a_multipart_body_is_a_415 tests, request::json_body (which said forms were "not read here yet"), the scope in exceptions.yaml, and G-25.

Checked

Nothing but comments, records and register text changed (9 files). The committed document is byte for byte what the code writes (103 findings, 0 unaccepted, 0 stale, 0 ambiguous), the crate's tests are 588 of 588, cargo fmt --check is clean, and all 15 steps of CI's deps job pass. The one claim about Thrust's own code, that the compat plane reads urlencoded bodies where a browser sends them, is thrust-compat-plane/src/reset.rs (serde_urlencoded).

🤖 Generated with Claude Code

…al client sends a form

The owner decided on 2026-11-16 that a body that is a form or multipart is a 415 on every `/api/v1` route that reads a body, which is what D-030 (5) said for the projects and what the oracle's gate already assumed (`json_bodies_only` in `exceptions.yaml`, for all 32 operations). D-031 (5) (states), D-032 (6) (labels) and D-033 (11) (work items) were proposed, one resource at a time, because the confirmation of 2026-11-07 was the projects' only. They are that same decision now, and the records say so.

- D-030 (5) states the rule for the four resources, notes what the pin does (DRF's default parsers, with the same JSON example repeated under each media type; on a project the form is read as lists, so every text field answers "Not a valid string."), and carries the trigger to revisit it: a real client that sends a form, such as an integration, a script or a report from a user. Nothing says one does today: the gate sends JSON only and the corpus has no form exchange. It also says why reading forms would be a feature of its own and not a change to the item: DRF reads HTML input by other rules than JSON (strings only, a list as repeated keys, an empty string for a null), so it is a second input path per field, which can be held to the pin only by form exchanges recorded on it. The compat plane does read urlencoded bodies where a browser sends them (the reset routes).
- D-031 (5), D-032 (6) and D-033 (11) are marked confirmed, as D-030 (5), and no longer "proposed and not yet confirmed" in the headers of their rows.
- The eight register entries SD-004, SD-005, SD-010, SD-011, SD-013, SD-014, SD-015 and SD-016 cite the decision with its dates, and `ref` no longer says "proposed".
- The comments of the four `a_form_or_a_multipart_body_is_a_415` tests, of `request::json_body` (which said forms were "not read here yet") and of the scope in `exceptions.yaml`, and G-25, say the same.

Nothing else changes: the document is byte for byte the committed one (103 findings, 0 unaccepted, 0 stale, 0 ambiguous), the crate's tests are 588 of 588, `cargo fmt --check` is clean, and the 15 steps of CI's `deps` job pass.

Refs: #58
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@aRustyDev
aRustyDev merged commit a7560b2 into main Nov 16, 2026
103 of 107 checks passed
@aRustyDev
aRustyDev deleted the docs/v1-reads-json-only branch November 16, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant