How to complete the challenge PUT /todos/{id} (422)
Issue a PUT request to /todos/{id} using an id that does not exist.
This API does not allow creating todos with a caller-selected auto-generated id, so the valid JSON reaches the write use case but is rejected as unprocessable.
If you do not know which todo ids already exist, first send:
GET /todos?_sortBy=-id
This lists the todos from highest id to lowest id. If you are using the public site, the URL is:
https://apichallenges.eviltester.com/todos?_sortBy=-id
GET /todos?_sortBy=-id to identify an id that does not exist
Choose an id higher than the highest returned id, then use that same missing id in the PUT URL and in the request body.
The response should be 422 Unprocessable Content with this message:
{
"errorMessages": [
"Cannot create todo with PUT due to Auto fields id"
]
}