-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Hi
We have a requirement to be able to clear (make null) an existing relationship on a resource. As far as I'm aware the JSON:API spec supports this (where prior to this example PATCH request, the author relationship was "data": { "type": "people", "id": "1" }):
PATCH /articles/1 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
"data": {
"type": "articles",
"id": "1",
"relationships": {
"author": {
"data": null
}
}
}
}
When I come to deserialise a request like this I am getting a InvalidJsonApiResourceException: Resource must contain at least one of 'data', 'error' or 'meta' nodes.
Assuming my interpretation of the JSON:API spec for this scenario isn't wrong, is there a way to clear resource relationships with jsonapi-converter?
Thanks for your help!
Ben
Metadata
Metadata
Assignees
Labels
No labels