Skip to content
Discussion options

You must be logged in to vote

The support for sort description is done by now.
If you define the ordering_fields in your class based view for example, the sort parameter shout be injected like:

{
    "name": "sort",
    "required": false,
    "in": "query",
    "description": "[list of fields to sort by](https://jsonapi.org/format/#fetching-sorting)",
    "schema": {
        "type": "array",
        "items": {
            "type": "string",
            "enum": [
                "id",
                "-id",
                "username",
                "-username",
                "firstName",
                "-firstName",
                "lastName",
                "-lastName",
                "email",
                "-…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@n2ygk
Comment options

Answer selected by n2ygk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants