Closed JaZo closed 2 years ago
This allows you to remove a to-one relationship by sending null in a PATCH request, as described in the spec.
null
PATCH {{baseUrl}}/model/:model/relationships/related
{ "data": null }
{ "jsonapi": { "version": "1.0" }, "errors": [ { "detail": "Expecting JSON API specification compliance to have been run.", "meta": { "exception": "LogicException", "file": "vendor/laravel-json-api/laravel/src/Http/Requests/ResourceRequest.php", "line": 209, "trace": [] }, "status": "500", "title": "Internal Server Error" } ] }
{ "jsonapi": { "version": "1.0" }, "links": { "related": "{{baseUrl}}/model/1/related", "self": "{{baseUrl}}/model/1/relationships/related" }, "data": null }
@JaZo thanks for submitting the PR, can't believe no one has encountered this error before now!
This allows you to remove a to-one relationship by sending
null
in a PATCH request, as described in the spec.Request
PATCH {{baseUrl}}/model/:model/relationships/related
Result
Before
After