Skip to content

fix(jsonapi)!: drop non-spec type member from error objects - #8732

Merged
soyuka merged 2 commits into
api-platform:mainfrom
soyuka:fix/jsonapi-error-type-member-8704
Oct 19, 2026
Merged

soyuka merged 2 commits into
api-platform:mainfrom
soyuka:fix/jsonapi-error-type-member-8704

Conversation

@soyuka

@soyuka soyuka commented Oct 19, 2026

Copy link
Copy Markdown
Member
Q A
Branch? main
Tickets Part of #8704
License MIT
Doc PR todo

JSON:API error objects carry a top-level type next to links.type. JSON:API 1.1 (https://jsonapi.org/format/#document-structure): "Unless otherwise noted, objects defined by this specification or any applied extensions MUST NOT contain any additional members.", error objects only define links.type (https://jsonapi.org/format/#error-objects), which we already fill with the same value.

Context: json-api/json-api#1787 (aligning with Problem Details), where the RFC type maps to links.type.

Impact: clients reading errors[].type must read errors[].links.type. Draft to see the impact, needs an UPGRADE note before merge. The Error.jsonapi OpenAPI schema still advertises type through the shared Error definition, left for a follow-up.

JSON:API 1.1 forbids additional members on objects it defines, error
objects only define links.type. The problem type URI was already
exposed there, the top-level copy is removed.

Refs api-platform#8704
@soyuka
soyuka marked this pull request as ready for review October 19, 2026 12:13
@soyuka
soyuka merged commit eb915e2 into api-platform:main Oct 19, 2026
111 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