Skip to content

fix(jsonapi): reject malformed request documents - #8736

Merged
soyuka merged 1 commit into
api-platform:5.0from
soyuka:fix/jsonapi-request-document-structure-8703
Oct 19, 2026
Merged

soyuka merged 1 commit into
api-platform:5.0from
soyuka:fix/jsonapi-request-document-structure-8703

Conversation

@soyuka

@soyuka soyuka commented Oct 19, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 5.0
Tickets Part of #8703
License MIT
Doc PR ∅

A JSON:API request body that is not a document, has no data object, or has non-object attributes/relationships (null included) was accepted with 201, or crashed with a 500 in array_merge(). It now returns a 400.

A missing or mismatching type is still accepted on purpose, enforcing it would break clients that work today. That part comes as a separate PR on main behind a flag.

A request body that is not a JSON:API document, has no data object,
or has non-object attributes/relationships was accepted with 201 or
crashed in array_merge() with a 500. Return 400 instead. A missing
type is still accepted.

Refs api-platform#8703
@soyuka
soyuka merged commit c1e21bb into api-platform:5.0 Oct 19, 2026
117 checks 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