Skip to content

Client-generated IDs doc should mention 204 #1476

Closed
@verdie-g

Description

@verdie-g

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions