diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index fd3427bfb..3cf5d0b39 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -1,4 +1,5 @@ -// Package swagger Code generated by swaggo/swag. DO NOT EDIT +// Code generated by swaggo/swag. DO NOT EDIT. + package swagger import "github.com/swaggo/swag" @@ -1937,26 +1938,8 @@ const docTemplate = `{ }, { "type": "string", - "description": "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match.", - "name": "filter_by", - "in": "query" - }, - { - "type": "string", - "description": "The value to filter for.", - "name": "filter_value", - "in": "query" - }, - { - "type": "string", - "description": "The comparator to use for a filter. Available values are ` + "`" + `equals` + "`" + `, ` + "`" + `greater` + "`" + `, ` + "`" + `greater_equals` + "`" + `, ` + "`" + `less` + "`" + `, ` + "`" + `less_equals` + "`" + `, ` + "`" + `like` + "`" + ` and ` + "`" + `in` + "`" + `. ` + "`" + `in` + "`" + ` expects comma-separated values in ` + "`" + `filter_value` + "`" + `. Defaults to ` + "`" + `equals` + "`" + `", - "name": "filter_comparator", - "in": "query" - }, - { - "type": "string", - "description": "The concatinator to use for filters. Available values are ` + "`" + `and` + "`" + ` or ` + "`" + `or` + "`" + `. Defaults to ` + "`" + `or` + "`" + `.", - "name": "filter_concat", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "name": "filter", "in": "query" }, { @@ -2169,26 +2152,8 @@ const docTemplate = `{ }, { "type": "string", - "description": "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match.", - "name": "filter_by", - "in": "query" - }, - { - "type": "string", - "description": "The value to filter for. You can use [grafana](https://grafana.com/docs/grafana/latest/dashboards/time-range-controls)- or [elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math)-style relative dates for all date fields like ` + "`" + `due_date` + "`" + `, ` + "`" + `start_date` + "`" + `, ` + "`" + `end_date` + "`" + `, etc.", - "name": "filter_value", - "in": "query" - }, - { - "type": "string", - "description": "The comparator to use for a filter. Available values are ` + "`" + `equals` + "`" + `, ` + "`" + `greater` + "`" + `, ` + "`" + `greater_equals` + "`" + `, ` + "`" + `less` + "`" + `, ` + "`" + `less_equals` + "`" + `, ` + "`" + `like` + "`" + ` and ` + "`" + `in` + "`" + `. ` + "`" + `in` + "`" + ` expects comma-separated values in ` + "`" + `filter_value` + "`" + `. Defaults to ` + "`" + `equals` + "`" + `", - "name": "filter_comparator", - "in": "query" - }, - { - "type": "string", - "description": "The concatinator to use for filters. Available values are ` + "`" + `and` + "`" + ` or ` + "`" + `or` + "`" + `. Defaults to ` + "`" + `or` + "`" + `.", - "name": "filter_concat", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "name": "filter", "in": "query" }, { @@ -8132,35 +8097,13 @@ const docTemplate = `{ "models.TaskCollection": { "type": "object", "properties": { - "filter_by": { - "description": "The field name of the field to filter by", - "type": "array", - "items": { - "type": "string" - } - }, - "filter_comparator": { - "description": "The comparator for field and value", - "type": "array", - "items": { - "type": "string" - } - }, - "filter_concat": { - "description": "The way all filter conditions are concatenated together, can be either \"and\" or \"or\".,", + "filter": { "type": "string" }, "filter_include_nulls": { "description": "If set to true, the result will also include null values", "type": "boolean" }, - "filter_value": { - "description": "The value of the field name to filter by", - "type": "array", - "items": { - "type": "string" - } - }, "order_by": { "description": "The query parameter to order the items by. This can be either asc or desc, with asc being the default.", "type": "array", @@ -9001,8 +8944,6 @@ var SwaggerInfo = &swag.Spec{ Description: "# Pagination\nEvery endpoint capable of pagination will return two headers:\n* `x-pagination-total-pages`: The total number of available pages for this request\n* `x-pagination-result-count`: The number of items returned for this request.\n# Rights\nAll endpoints which return a single item (project, task, etc.) - no array - will also return a `x-max-right` header with the max right the user has on this item as an int where `0` is `Read Only`, `1` is `Read & Write` and `2` is `Admin`.\nThis can be used to show or hide ui elements based on the rights the user has.\n# Errors\nAll errors have an error code and a human-readable error message in addition to the http status code. You should always check for the status code in the response, not only the http status code.\nDue to limitations in the swagger library we're using for this document, only one error per http status code is documented here. Make sure to check the [error docs](https://vikunja.io/docs/errors/) in Vikunja's documentation for a full list of available error codes.\n# Authorization\n**JWT-Auth:** Main authorization method, used for most of the requests. Needs `Authorization: Bearer `-header to authenticate successfully.\n\n**API Token:** You can create scoped API tokens for your user and use the token to make authenticated requests in the context of that user. The token must be provided via an `Authorization: Bearer ` header, similar to jwt auth. See the documentation for the `api` group to manage token creation and revocation.\n\n**BasicAuth:** Only used when requesting tasks via CalDAV.\n", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index 8549dd9a3..7edf42ae0 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -1929,26 +1929,8 @@ }, { "type": "string", - "description": "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match.", - "name": "filter_by", - "in": "query" - }, - { - "type": "string", - "description": "The value to filter for.", - "name": "filter_value", - "in": "query" - }, - { - "type": "string", - "description": "The comparator to use for a filter. Available values are `equals`, `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` expects comma-separated values in `filter_value`. Defaults to `equals`", - "name": "filter_comparator", - "in": "query" - }, - { - "type": "string", - "description": "The concatinator to use for filters. Available values are `and` or `or`. Defaults to `or`.", - "name": "filter_concat", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "name": "filter", "in": "query" }, { @@ -2161,26 +2143,8 @@ }, { "type": "string", - "description": "The name of the field to filter by. Allowed values are all task properties. Task properties which are their own object require passing in the id of that entity. Accepts an array for multiple filters which will be chanied together, all supplied filter must match.", - "name": "filter_by", - "in": "query" - }, - { - "type": "string", - "description": "The value to filter for. You can use [grafana](https://grafana.com/docs/grafana/latest/dashboards/time-range-controls)- or [elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math)-style relative dates for all date fields like `due_date`, `start_date`, `end_date`, etc.", - "name": "filter_value", - "in": "query" - }, - { - "type": "string", - "description": "The comparator to use for a filter. Available values are `equals`, `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` expects comma-separated values in `filter_value`. Defaults to `equals`", - "name": "filter_comparator", - "in": "query" - }, - { - "type": "string", - "description": "The concatinator to use for filters. Available values are `and` or `or`. Defaults to `or`.", - "name": "filter_concat", + "description": "The filter query to match tasks by. Check out https://vikunja.io/docs/filters for a full explanation of the feature.", + "name": "filter", "in": "query" }, { @@ -8124,35 +8088,13 @@ "models.TaskCollection": { "type": "object", "properties": { - "filter_by": { - "description": "The field name of the field to filter by", - "type": "array", - "items": { - "type": "string" - } - }, - "filter_comparator": { - "description": "The comparator for field and value", - "type": "array", - "items": { - "type": "string" - } - }, - "filter_concat": { - "description": "The way all filter conditions are concatenated together, can be either \"and\" or \"or\".,", + "filter": { "type": "string" }, "filter_include_nulls": { "description": "If set to true, the result will also include null values", "type": "boolean" }, - "filter_value": { - "description": "The value of the field name to filter by", - "type": "array", - "items": { - "type": "string" - } - }, "order_by": { "description": "The query parameter to order the items by. This can be either asc or desc, with asc being the default.", "type": "array", diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 5dd6c3625..76a301bc3 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -783,28 +783,11 @@ definitions: type: object models.TaskCollection: properties: - filter_by: - description: The field name of the field to filter by - items: - type: string - type: array - filter_comparator: - description: The comparator for field and value - items: - type: string - type: array - filter_concat: - description: The way all filter conditions are concatenated together, can - be either "and" or "or"., + filter: type: string filter_include_nulls: description: If set to true, the result will also include null values type: boolean - filter_value: - description: The value of the field name to filter by - items: - type: string - type: array order_by: description: The query parameter to order the items by. This can be either asc or desc, with asc being the default. @@ -2718,27 +2701,10 @@ paths: in: query name: s type: string - - description: The name of the field to filter by. Allowed values are all task - properties. Task properties which are their own object require passing in - the id of that entity. Accepts an array for multiple filters which will - be chanied together, all supplied filter must match. + - description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters + for a full explanation of the feature. in: query - name: filter_by - type: string - - description: The value to filter for. - in: query - name: filter_value - type: string - - description: The comparator to use for a filter. Available values are `equals`, - `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` - expects comma-separated values in `filter_value`. Defaults to `equals` - in: query - name: filter_comparator - type: string - - description: The concatinator to use for filters. Available values are `and` - or `or`. Defaults to `or`. - in: query - name: filter_concat + name: filter type: string - description: If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults @@ -2885,30 +2851,10 @@ paths: in: query name: order_by type: string - - description: The name of the field to filter by. Allowed values are all task - properties. Task properties which are their own object require passing in - the id of that entity. Accepts an array for multiple filters which will - be chanied together, all supplied filter must match. + - description: The filter query to match tasks by. Check out https://vikunja.io/docs/filters + for a full explanation of the feature. in: query - name: filter_by - type: string - - description: The value to filter for. You can use [grafana](https://grafana.com/docs/grafana/latest/dashboards/time-range-controls)- - or [elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math)-style - relative dates for all date fields like `due_date`, `start_date`, `end_date`, - etc. - in: query - name: filter_value - type: string - - description: The comparator to use for a filter. Available values are `equals`, - `greater`, `greater_equals`, `less`, `less_equals`, `like` and `in`. `in` - expects comma-separated values in `filter_value`. Defaults to `equals` - in: query - name: filter_comparator - type: string - - description: The concatinator to use for filters. Available values are `and` - or `or`. Defaults to `or`. - in: query - name: filter_concat + name: filter type: string - description: If set to true the result will include filtered fields whose value is set to `null`. Available values are `true` or `false`. Defaults