Closed
Description
The fact that
POST /authors
Content-Type: application/vnd.api+json
{
"data": {
"type": "authors",
"attributes": {
"name": "toto"
}
}
}
returns 201 with the created resource but
POST /authors
Content-Type: application/vnd.api+json
{
"data": {
"type": "authors",
"id": "1234",
"attributes": {
"name": "toto"
}
}
}
can return 204 with no body is confusing.
I understand that you are following the spec https://jsonapi.org/format/#crud-creating-responses-204 so I think it deserves a big warning in the doc (https://www.jsonapi.net/usage/options.html#client-generated-ids). I would do it but I'm not sure in which exact case it returns 204.