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
Make a simple POST to create a data sample but don't include the attribute "type":
"data": { "attributes": { "userId": "1", "caseId": "1", "score": 1, "createdAt": "2016-04-04T13:43:52Z", "updatedAt": "2016-04-04T13:43:52Z" } }
The body of the request is not valid, but it will not be discarded and persisted anyway. As response I will get:
"errors": [ { "status": "500", "code": "EINVALIDITEM", "title": "Item in response does not validate", "detail": { "item": { "type": "userCourseHighscore", "id": "791e942b-9487-4887-8f20-456e1477a5ab", "userId": "1", "courseId": null, "score": "1", "createdAt": "2016-04-04T13:43:52.000Z", "updatedAt": "2016-04-04T13:43:52.000Z" }, "error": "child \"type\" fails because [\"type\" must be one of [userCaseHighscore]]" } } ]
If I request all items of the relation with a GET, I will get the same error.
"errors": [ { "status": "500", "code": "EINVALIDITEM", "title": "Item in response does not validate", "detail": { "item": { "type": "userCourseHighscore", "id": "05173fba-0574-418e-9edf-b0e284c0490c", "userId": "1", "courseId": null, "score": "1", "createdAt": "2016-04-04T13:43:52.000Z", "updatedAt": "2016-04-04T13:43:52.000Z" }, "error": "child \"type\" fails because [\"type\" must be one of [userCaseHighscore]]" } } ]
If the payload doesn't validate, the item should be disgarded and not persisted.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How to reproduce:
Make a simple POST to create a data sample but don't include the attribute "type":
The body of the request is not valid, but it will not be discarded and persisted anyway. As response I will get:
If I request all items of the relation with a GET, I will get the same error.
Expected Behavior
If the payload doesn't validate, the item should be disgarded and not persisted.
The text was updated successfully, but these errors were encountered: