diff --git a/pkg/models/task_collection.go b/pkg/models/task_collection.go index 00aaeb9fa..e1b765234 100644 --- a/pkg/models/task_collection.go +++ b/pkg/models/task_collection.go @@ -24,29 +24,29 @@ import ( // TaskCollection is a struct used to hold filter details and not clutter the Task struct with information not related to actual tasks. type TaskCollection struct { - ListID int64 `param:"list"` - Lists []*List + ListID int64 `param:"list" json:"-"` + Lists []*List `json:"-"` // The query parameter to sort by. This is for ex. done, priority, etc. - SortBy []string `query:"sort_by"` - SortByArr []string `query:"sort_by[]"` + SortBy []string `query:"sort_by" json:"sort_by"` + SortByArr []string `query:"sort_by[]" json:"-"` // The query parameter to order the items by. This can be either asc or desc, with asc being the default. - OrderBy []string `query:"order_by"` - OrderByArr []string `query:"order_by[]"` + OrderBy []string `query:"order_by" json:"order_by"` + OrderByArr []string `query:"order_by[]" json:"-"` // The field name of the field to filter by - FilterBy []string `query:"filter_by"` - FilterByArr []string `query:"filter_by[]"` + FilterBy []string `query:"filter_by" json:"filter_by"` + FilterByArr []string `query:"filter_by[]" json:"-"` // The value of the field name to filter by - FilterValue []string `query:"filter_value"` - FilterValueArr []string `query:"filter_value[]"` + FilterValue []string `query:"filter_value" json:"filter_value"` + FilterValueArr []string `query:"filter_value[]" json:"-"` // The comparator for field and value - FilterComparator []string `query:"filter_comparator"` - FilterComparatorArr []string `query:"filter_comparator[]"` + FilterComparator []string `query:"filter_comparator" json:"filter_comparator"` + FilterComparatorArr []string `query:"filter_comparator[]" json:"-"` // The way all filter conditions are concatenated together, can be either "and" or "or"., - FilterConcat string `query:"filter_concat"` + FilterConcat string `query:"filter_concat" json:"filter_concat"` // If set to true, the result will also include null values - FilterIncludeNulls bool `query:"filter_include_nulls"` + FilterIncludeNulls bool `query:"filter_include_nulls" json:"filter_include_nulls"` web.CRUDable `xorm:"-" json:"-"` web.Rights `xorm:"-" json:"-"` diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 7e864abf1..bea8591ac 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -7141,87 +7141,48 @@ var doc = `{ "models.TaskCollection": { "type": "object", "properties": { - "filterBy": { + "filter_by": { "description": "The field name of the field to filter by", "type": "array", "items": { "type": "string" } }, - "filterByArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "filterComparator": { + "filter_comparator": { "description": "The comparator for field and value", "type": "array", "items": { "type": "string" } }, - "filterComparatorArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "filterConcat": { + "filter_concat": { "description": "The way all filter conditions are concatenated together, can be either \"and\" or \"or\".,", "type": "string" }, - "filterIncludeNulls": { + "filter_include_nulls": { "description": "If set to true, the result will also include null values", "type": "boolean" }, - "filterValue": { + "filter_value": { "description": "The value of the field name to filter by", "type": "array", "items": { "type": "string" } }, - "filterValueArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "listID": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "$ref": "#/definitions/models.List" - } - }, - "orderBy": { + "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", "items": { "type": "string" } }, - "orderByArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "sortBy": { + "sort_by": { "description": "The query parameter to sort by. This is for ex. done, priority, etc.", "type": "array", "items": { "type": "string" } - }, - "sortByArr": { - "type": "array", - "items": { - "type": "string" - } } } }, diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index 94f505b08..d9633e901 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -7124,87 +7124,48 @@ "models.TaskCollection": { "type": "object", "properties": { - "filterBy": { + "filter_by": { "description": "The field name of the field to filter by", "type": "array", "items": { "type": "string" } }, - "filterByArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "filterComparator": { + "filter_comparator": { "description": "The comparator for field and value", "type": "array", "items": { "type": "string" } }, - "filterComparatorArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "filterConcat": { + "filter_concat": { "description": "The way all filter conditions are concatenated together, can be either \"and\" or \"or\".,", "type": "string" }, - "filterIncludeNulls": { + "filter_include_nulls": { "description": "If set to true, the result will also include null values", "type": "boolean" }, - "filterValue": { + "filter_value": { "description": "The value of the field name to filter by", "type": "array", "items": { "type": "string" } }, - "filterValueArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "listID": { - "type": "integer" - }, - "lists": { - "type": "array", - "items": { - "$ref": "#/definitions/models.List" - } - }, - "orderBy": { + "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", "items": { "type": "string" } }, - "orderByArr": { - "type": "array", - "items": { - "type": "string" - } - }, - "sortBy": { + "sort_by": { "description": "The query parameter to sort by. This is for ex. done, priority, etc.", "type": "array", "items": { "type": "string" } - }, - "sortByArr": { - "type": "array", - "items": { - "type": "string" - } } } }, diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 401447a19..f7a86a7ad 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -589,63 +589,37 @@ definitions: type: object models.TaskCollection: properties: - filterBy: + filter_by: description: The field name of the field to filter by items: type: string type: array - filterByArr: - items: - type: string - type: array - filterComparator: + filter_comparator: description: The comparator for field and value items: type: string type: array - filterComparatorArr: - items: - type: string - type: array - filterConcat: + filter_concat: description: The way all filter conditions are concatenated together, can be either "and" or "or"., type: string - filterIncludeNulls: + filter_include_nulls: description: If set to true, the result will also include null values type: boolean - filterValue: + filter_value: description: The value of the field name to filter by items: type: string type: array - filterValueArr: - items: - type: string - type: array - listID: - type: integer - lists: - items: - $ref: '#/definitions/models.List' - type: array - orderBy: + order_by: description: The query parameter to order the items by. This can be either asc or desc, with asc being the default. items: type: string type: array - orderByArr: - items: - type: string - type: array - sortBy: + sort_by: description: The query parameter to sort by. This is for ex. done, priority, etc. items: type: string type: array - sortByArr: - items: - type: string - type: array type: object models.TaskComment: properties: