Skip to content

Show the submit body answering the way it documents - #63

Merged
roncodes merged 1 commit into
mainfrom
work/inspection-submit-example
Sep 14, 2026
Merged

roncodes merged 1 commit into
mainfrom
work/inspection-submit-example

Conversation

@roncodes

Copy link
Copy Markdown
Member

Follow-up to #62, which renamed a submission's answers but left the request example showing the old shape.

Submit an Inspection documented "answers": [] — empty — directly above a fully populated item_results block in the first cut's flat naming. The only worked example a reader could copy was the old one, so the endpoint read as though it still wanted item_results.

answers now carries the example, naming the fields that Retrieve an Inspection Form chains.

The flat item_results body stays in the request on purpose: this request sends both so the contract exercises the server's precedence rule (answers win, duplicated results ignored), which is what the driver app does too. The description now says that explicitly instead of leaving two bodies unexplained, and params.yaml marks answers as the body to send with item_results described as the older shape.

No script or assertion changes — the pre-request script already built answers, so the request on the wire is unchanged.

node scripts/validate-collections.js passes: 5 collections, 3 environments.

The only worked example in Submit an Inspection was the first cut's flat
`item_results` block; `answers` sat above it empty. So the shape a reader
copies out of the reference was the old one, and the new name looked
like an afterthought — which is the opposite of what the rename was for.

`answers` carries the example now, naming the fields the form read
chains. The flat body stays, because the request deliberately sends both
to prove the server prefers the answers, and the description says so
rather than leaving a reader to guess why two bodies are there.
@roncodes
roncodes merged commit 822b867 into main Sep 14, 2026
1 check passed
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