Show the submit body answering the way it documents - #63
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #62, which renamed a submission's answers but left the request example showing the old shape.
Submit an Inspectiondocumented"answers": []— empty — directly above a fully populateditem_resultsblock 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 wanteditem_results.answersnow carries the example, naming the fields thatRetrieve an Inspection Formchains.The flat
item_resultsbody 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, andparams.yamlmarksanswersas the body to send withitem_resultsdescribed 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.jspasses: 5 collections, 3 environments.