- Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Hi!
If I send a null or an empty array as a data member like:
PATCH /articles/1/relationships/author HTTP/1.1 Content-Type: application/vnd.api+json Accept: application/vnd.api+json { "data": null // or [] } - JsonParser::parseRelationships() will not process an empty relationship data.
- Action::linkRelations(), for obvious reasons, will not clear the relationship.
Is this normal behavior? Because in the JSON API specification I read that:
The PATCH request MUST include a top-level member named data containing one of:
- a resource identifier object corresponding to the new related resource.
- null, to remove the relationship.
....
For all request types, the body MUST contain a data member whose value is an empty array or an array of resource identifier objects.
....
Thanks for this extension!