Skip to content

fix(jsonapi): check relation IRI type on denormalization - #8788

Merged
soyuka merged 1 commit into
api-platform:4.4from
soyuka:fix/jsonapi-relation-iri-type
Nov 3, 2026
Merged

soyuka merged 1 commit into
api-platform:4.4from
soyuka:fix/jsonapi-relation-iri-type

Conversation

@soyuka

@soyuka soyuka commented Nov 3, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 4.4
Tickets
License MIT
Doc PR

The JSON:API denormalizeRelation() called the IRI converter directly, so the relation type check done in AbstractItemNormalizer::getResourceFromIri() never ran for JSON:API payloads. It now goes through the same method (made protected). Not found relations now behave like JSON-LD (UnexpectedValueException, denormalize_throw_on_relation_not_found honored).

The JSON:API relation denormalizer resolved IRIs directly through the
IRI converter, bypassing the resource type check applied to other formats.
@soyuka
soyuka merged commit cf6bde4 into api-platform:4.4 Nov 3, 2026
114 of 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