mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Use an enum instead of a boolean to differentiate search
It's not very likely to have more modes of search besides normal and trashed, but got surprised in that way quite often and it's nicer this way anyways.
This commit is contained in:
@ -1478,7 +1478,7 @@ paths:
|
||||
- $ref: "#/components/parameters/limit"
|
||||
- $ref: "#/components/parameters/offset"
|
||||
- $ref: "#/components/parameters/withDetails"
|
||||
- $ref: "#/components/parameters/deleted"
|
||||
- $ref: "#/components/parameters/searchMode"
|
||||
responses:
|
||||
200:
|
||||
description: Ok
|
||||
@ -4114,12 +4114,16 @@ components:
|
||||
withDetails:
|
||||
type: boolean
|
||||
default: false
|
||||
deleted:
|
||||
type: boolean
|
||||
default: false
|
||||
searchMode:
|
||||
type: string
|
||||
format: searchmode
|
||||
enum:
|
||||
- normal
|
||||
- trashed
|
||||
default: normal
|
||||
description: |
|
||||
If this is true, the search performed only for
|
||||
soft-deleted items.
|
||||
Specify whether the search query should apply to
|
||||
soft-deleted items or not.
|
||||
query:
|
||||
type: string
|
||||
description: |
|
||||
@ -5846,12 +5850,13 @@ components:
|
||||
description: Whether to return details to each item.
|
||||
schema:
|
||||
type: boolean
|
||||
deleted:
|
||||
name: deleted
|
||||
searchMode:
|
||||
name: searchMode
|
||||
in: query
|
||||
description: Whether to search in soft-deleted items only.
|
||||
schema:
|
||||
type: boolean
|
||||
type: string
|
||||
format: searchmode
|
||||
name:
|
||||
name: name
|
||||
in: path
|
||||
|
Reference in New Issue
Block a user