docs: add a bunch of examples to /api/users/private/list
This commit is contained in:
parent
0bfdfc9b4e
commit
0595a73b67
|
@ -159,6 +159,67 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Filters'
|
||||
examples:
|
||||
'Full':
|
||||
description: |
|
||||
This demonstrates all possible values of `filters`.
|
||||
|
||||
Note that `filters.type` is an enum: `[ "like", "is", "not" ]`, and so is `orders.sort`: `[ "asc", "desc" ]`
|
||||
value: {
|
||||
"filters": [
|
||||
{
|
||||
"column": "name",
|
||||
"type": "like",
|
||||
"filter": "%ad%"
|
||||
},
|
||||
{
|
||||
"column": "name",
|
||||
"type": "is",
|
||||
"filter": "jade"
|
||||
},
|
||||
{
|
||||
"column": "name",
|
||||
"type": "not",
|
||||
"filter": "jake"
|
||||
}
|
||||
],
|
||||
"orders": [
|
||||
{
|
||||
"by": "id",
|
||||
"sort": "asc"
|
||||
},
|
||||
{
|
||||
"by": "id",
|
||||
"sort": "desc"
|
||||
}
|
||||
],
|
||||
"pagination": {
|
||||
"size": 100,
|
||||
"page": 1
|
||||
}
|
||||
}
|
||||
'Empty':
|
||||
description: |-
|
||||
Its important that all keys are passed with empty values. You can't omit a key in this one
|
||||
value: {
|
||||
"filters": [],
|
||||
"orders": [],
|
||||
"pagination": null
|
||||
}
|
||||
'List deleted users':
|
||||
description: |-
|
||||
This is the recommended way to list deleted users
|
||||
value: {
|
||||
"filters": [
|
||||
{
|
||||
"column": "deleted_at",
|
||||
"type": "not",
|
||||
"filter": null
|
||||
}
|
||||
],
|
||||
"orders": [],
|
||||
"pagination": null
|
||||
}
|
||||
responses:
|
||||
200:
|
||||
description: OK
|
||||
|
@ -465,6 +526,11 @@ components:
|
|||
"column": "name",
|
||||
"type": "is",
|
||||
"filter": "jade"
|
||||
},
|
||||
{
|
||||
"column": "name",
|
||||
"type": "not",
|
||||
"filter": "jake"
|
||||
}
|
||||
]
|
||||
orders:
|
||||
|
|
Loading…
Reference in New Issue