Repository navigation
Conversation
The Hydra schema factory rewrote every input schema to json. Because it wraps the JSON:API factory, a jsonapi request body was documented as a plain object without the data/attributes/relationships envelope whenever jsonld was enabled. Only jsonapi is now excluded from the rewrite, so other formats are unchanged. JSON:API input definitions get an .input postfix, e.g. Dummy.jsonapi.input, so they no longer share a name with the output definition, which requires data.id and lists included. The input definition requires only type on POST and drops included.
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.
Since #7397 the Hydra schema factory rewrites every input schema to
json. It wraps the JSON:API factory, so with jsonld enabled (the default) JSON:API request bodies were documented as plain objects, without thedata/attributes/relationshipsenvelope the denormalizer reads.jsonapiis excluded from the rewrite, every other format is byte-identical in the exported document (measured on the fixture app: only the 734application/vnd.api+jsonrequest bodies change, 0 existing components change).inputpostfix (Dummy.jsonapi.input), otherwise they share the name of the output definition, which requiresdata.idand documentsincluded(wrong for POST, see fix(jsonapi): do not require id in input schema for post operations #8252)includedKnown leftovers: 20 unreferenced
*.jsonMergePatch/*.partialcomponents appear in the export, built by the JSON:API factory to derive its envelope for PATCH/PUT. The relationship loop touched here also changes on 4.4 in #8734, expect a small conflict on the merge-up.