We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My API generates a payload for a collection, where a single record looks like this:
{ "id": "16", "type": "contracts", "links": { "self": "/api/v1/contracts/16" }, "attributes": { "title": "Example Title", "current-cycle-id": 40, "created-at": "2015-05-22T09:38:26.418-04:00", "updated-at": "2015-05-22T09:38:26.418-04:00" }, "relationships": { "cycles": { "links": { "self": "/api/v1/contracts/16/relationships/cycles", "related": "/api/v1/contracts/16/cycles" } }, "supplier": { "links": { "self": "/api/v1/contracts/16/relationships/supplier", "related": "/api/v1/contracts/16/supplier" }, "data": null }, "tower": { "links": { "self": "/api/v1/contracts/16/relationships/tower", "related": "/api/v1/contracts/16/tower" }, "data": { "type": "towers", "id": "1" } }, "client": { "links": { "self": "/api/v1/contracts/16/relationships/client", "related": "/api/v1/contracts/16/client" }, "data": { "type": "clients", "id": "1" } } } }
Note that two of the has-one relationships (tower and client) include a value under the data key, but the supplier relationship is null.
The JSONAPIAdapter is chasing down all of the relationship links correctly. In the case of supplier, the resulting payload looks like:
{ "data": null }
When the JSONAPISerializer attempts to normalize this payload, it applies map to null, which causes a failure.
map
The text was updated successfully, but these errors were encountered:
That did the trick. Thanks!
Sorry, something went wrong.
No branches or pull requests
My API generates a payload for a collection, where a single record looks like this:
Note that two of the has-one relationships (tower and client) include a value under the data key, but the supplier relationship is null.
The JSONAPIAdapter is chasing down all of the relationship links correctly. In the case of supplier, the resulting payload looks like:
When the JSONAPISerializer attempts to normalize this payload, it applies
map
to null, which causes a failure.The text was updated successfully, but these errors were encountered: