Skip to content

Introduce sort capability #4

@niden

Description

@niden

Per the documentation

  • A server MAY choose to support requests to sort resource collections according to one or more criteria (“sort fields”).
  • An endpoint MAY support requests to sort the primary data with a sort query parameter. The value for sort MUST represent sort fields.
  • An endpoint MAY support multiple sort fields by allowing comma-separated (U+002C COMMA, “,”) sort fields. Sort fields SHOULD be applied in the order specified.
  • The sort order for each sort field MUST be ascending unless it is prefixed with a minus (U+002D HYPHEN-MINUS, “-“), in which case it MUST be descending.
  • If the server does not support sorting as specified in the query parameter sort, it MUST return 400 Bad Request.
  • If sorting is supported by the server and requested by the client via query parameter sort, the server MUST return elements of the top-level data array of the response ordered according to the criteria specified. The server MAY apply default sorting rules to top-level data if request parameter sort is not specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions