The purpose of this PR is to allow to have all the relationships of a resource object to be always present inside relationships node and have links if they exists for a relationship.
As per the json api spec ->
A “relationship object” MUST contain at least one of the following:
links: a links object containing at least one of the following:
self: a link for the relationship itself (a “relationship link”). This link allows the client to directly manipulate the relationship. For example, removing an author through an article’s relationship URL would disconnect the person from the article without deleting the people resource itself. When fetched successfully, this link returns the linkage for the related resources as its primary data. (See Fetching Relationships.)
related: a related resource link
data: resource linkage
meta: a meta object that contains non-standard meta-information about the relationship.
Since above we have allowed all the relationships node to be always present, hence one should also provide a way to have atleast one to be always present out of the (data, meta and links)
The sole need for the above change is to make the client be aware of all the relationships associated with the resource objects.
The purpose of this PR is to allow to have all the relationships of a resource object to be always present inside relationships node and have links if they exists for a relationship.
As per the json api spec ->
A “relationship object” MUST contain at least one of the following:
Since above we have allowed all the relationships node to be always present, hence one should also provide a way to have atleast one to be always present out of the (data, meta and links)
The sole need for the above change is to make the client be aware of all the relationships associated with the resource objects.