Skip to content

docs: a body naming a field the api does not have is a 400 - #69

Open
olavgg wants to merge 1 commit into
masterfrom
docs/unknown-request-fields
Open

docs: a body naming a field the api does not have is a 400#69
olavgg wants to merge 1 commit into
masterfrom
docs/unknown-request-fields

Conversation

@olavgg

@olavgg olavgg commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Platform PR #324 (feat(api): reject request bodies naming fields the api does not have) switches the request-body reader from dropping unknown properties to refusing them: a 400 problem document of type .../errors/unreadable-request-body with one errors entry per offender, each a JSON Pointer plus the names its position accepts. Malformed JSON answers with the same type, and a line and column.

Two pages here still described the old behaviour as a trap. events.md said a client sending the retired relatedResourceIds names got a 200 with its relations silently dropped; datasets.md said the api drops unknown keys, so a filter still carrying writeProtected looked like it was narrowing and was not. Both now say the request is refused and link to a new section on the client page that documents the response shape once, since it applies to every endpoint that reads a JSON body.

Verified: npm run build succeeds.

Platform PR #324 (feat(api): reject request bodies naming fields the api does
not have) switches the request-body reader from dropping unknown properties
to refusing them: a 400 problem document of type .../errors/unreadable-request-body
with one errors entry per offender, each a JSON Pointer plus the names its
position accepts. Malformed JSON answers with the same type, and a line and
column.

Two pages here still described the old behaviour as a trap. events.md said a
client sending the retired relatedResourceIds names got a 200 with its
relations silently dropped; datasets.md said the api drops unknown keys, so a
filter still carrying writeProtected looked like it was narrowing and was
not. Both now say the request is refused and link to a new section on the
client page that documents the response shape once, since it applies to every
endpoint that reads a JSON body.

Verified: npm run build succeeds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Olav Gjerde <olav@intellistream.ai>
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