Problem/Motivation
Suggested by @larowlan in #3036285-55: Add a \JsonApiResource\Relationship object to carry relationship data, metadata and a link collection., JsonApiDocumentTopLevel::__construct
is complicated by the fact that it takes a different set of arguments depending on whether it's the response is an error response or not. We could clean this up by deprecating the constructor in favor of two new factory methods that take arguments specific to each document type.
User interface changes
None.
API changes
Deprecated value object constructor, additional factory methods.
Data model changes
None.
Release notes snippet
TBD.