Skip to content

Rule 2 - How to handle empty collection needs to be changed #288

@larsolofsson

Description

@larsolofsson

Existing text

Rule 2 - How to handle empty collection

An empty collection MUST be communicated via the HTTP status code 204 No Content and the response MUST NOT contain a response's body. This rule will be enforced by not allowing empty array in the non-empty response's body using minItems: 1.

See issue #287 best practice for status codes

1 GET a list of items

  • When items found: 200 OK
  • When no items found: 200 OK with an empty collection (array)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions