Improve label handling (#48)
This commit is contained in:
98
docs/docs.go
98
docs/docs.go
@ -1,6 +1,6 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-01-07 23:16:50.581590248 +0100 CET m=+0.121922055
|
||||
// 2019-01-10 00:01:27.123040428 +0100 CET m=+0.110268080
|
||||
|
||||
package docs
|
||||
|
||||
@ -391,7 +391,7 @@ var doc = `{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a team by its ID.",
|
||||
"description": "Returns a list by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -399,13 +399,13 @@ var doc = `{
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"team"
|
||||
"list"
|
||||
],
|
||||
"summary": "Gets one team",
|
||||
"summary": "Gets one list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Team ID",
|
||||
"description": "List ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@ -413,14 +413,14 @@ var doc = `{
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The team",
|
||||
"description": "The list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Team"
|
||||
"$ref": "#/definitions/models.List"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "The user does not have access to the team",
|
||||
"description": "The user does not have access to the list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
@ -2533,7 +2533,7 @@ var doc = `{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Updates a task. This includes marking it as done.",
|
||||
"description": "Updates a task. This includes marking it as done. Assignees you pass will be updated, see their individual endpoints for more details on how this is done. To update labels, see the description of the endpoint.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -2712,13 +2712,13 @@ var doc = `{
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees/bulk": {
|
||||
"put": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
|
||||
"description": "Adds multiple new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -2728,7 +2728,7 @@ var doc = `{
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Add new assignees to a task",
|
||||
"summary": "Add multiple new assignees to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The array of assignees",
|
||||
@ -2832,6 +2832,68 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/labels/bulk": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds multiple new labels to a task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"labels"
|
||||
],
|
||||
"summary": "Add multiple new labels to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The array of labels",
|
||||
"name": "label",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LabelTaskBulk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The updated labels object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LabelTaskBulk"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid label object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{task}/labels": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -3858,6 +3920,18 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LabelTaskBulk": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"labels": {
|
||||
"description": "All labels you want to update at once. Works exactly like you would update labels while updateing a list.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.List": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -41,4 +41,5 @@ This document describes the different errors Vikunja can return.
|
||||
| 7002 | 409 | The user already has access to that list. |
|
||||
| 7003 | 403 | The user does not have access to that list. |
|
||||
| 8001 | 403 | This label already exists on that task. |
|
||||
| 8002 | 404 | The label does not exist. |
|
||||
| 8002 | 404 | The label does not exist. |
|
||||
| 8003 | 403 | The user does not have access to this label. |
|
@ -378,7 +378,7 @@
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns a team by its ID.",
|
||||
"description": "Returns a list by its ID.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -386,13 +386,13 @@
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"team"
|
||||
"list"
|
||||
],
|
||||
"summary": "Gets one team",
|
||||
"summary": "Gets one list",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Team ID",
|
||||
"description": "List ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@ -400,14 +400,14 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The team",
|
||||
"description": "The list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Team"
|
||||
"$ref": "#/definitions/models.List"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "The user does not have access to the team",
|
||||
"description": "The user does not have access to the list",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
@ -2520,7 +2520,7 @@
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Updates a task. This includes marking it as done.",
|
||||
"description": "Updates a task. This includes marking it as done. Assignees you pass will be updated, see their individual endpoints for more details on how this is done. To update labels, see the description of the endpoint.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -2699,13 +2699,13 @@
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/assignees/bulk": {
|
||||
"put": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
|
||||
"description": "Adds multiple new assignees to a task. The assignee needs to have access to the list, the doer must be able to edit this task. Every user not in the list will be unassigned from the task, pass an empty array to unassign everyone.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -2715,7 +2715,7 @@
|
||||
"tags": [
|
||||
"assignees"
|
||||
],
|
||||
"summary": "Add new assignees to a task",
|
||||
"summary": "Add multiple new assignees to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The array of assignees",
|
||||
@ -2819,6 +2819,68 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{taskID}/labels/bulk": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"JWTKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Adds multiple new labels to a task.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"labels"
|
||||
],
|
||||
"summary": "Add multiple new labels to a task",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The array of labels",
|
||||
"name": "label",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LabelTaskBulk"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Task ID",
|
||||
"name": "taskID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The updated labels object.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.LabelTaskBulk"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid label object provided.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/models.Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tasks/{task}/labels": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -3844,6 +3906,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LabelTaskBulk": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"labels": {
|
||||
"description": "All labels you want to update at once. Works exactly like you would update labels while updateing a list.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Label"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.List": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -146,6 +146,15 @@ definitions:
|
||||
change this value.
|
||||
type: integer
|
||||
type: object
|
||||
models.LabelTaskBulk:
|
||||
properties:
|
||||
labels:
|
||||
description: All labels you want to update at once. Works exactly like you
|
||||
would update labels while updateing a list.
|
||||
items:
|
||||
$ref: '#/definitions/models.Label'
|
||||
type: array
|
||||
type: object
|
||||
models.List:
|
||||
properties:
|
||||
created:
|
||||
@ -923,9 +932,9 @@ paths:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Returns a team by its ID.
|
||||
description: Returns a list by its ID.
|
||||
parameters:
|
||||
- description: Team ID
|
||||
- description: List ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
@ -934,12 +943,12 @@ paths:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The team
|
||||
description: The list
|
||||
schema:
|
||||
$ref: '#/definitions/models.Team'
|
||||
$ref: '#/definitions/models.List'
|
||||
type: object
|
||||
"403":
|
||||
description: The user does not have access to the team
|
||||
description: The user does not have access to the list
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
@ -950,9 +959,9 @@ paths:
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Gets one team
|
||||
summary: Gets one list
|
||||
tags:
|
||||
- team
|
||||
- list
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@ -2183,7 +2192,9 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Updates a task. This includes marking it as done.
|
||||
description: Updates a task. This includes marking it as done. Assignees you
|
||||
pass will be updated, see their individual endpoints for more details on how
|
||||
this is done. To update labels, see the description of the endpoint.
|
||||
parameters:
|
||||
- description: Task ID
|
||||
in: path
|
||||
@ -2442,12 +2453,13 @@ paths:
|
||||
tags:
|
||||
- assignees
|
||||
/tasks/{taskID}/assignees/bulk:
|
||||
put:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Adds new assignees to a task. The assignee needs to have access
|
||||
to the list, the doer must be able to edit this task. Every user not in the
|
||||
list will be unassigned from the task, pass an empty array to unassign everyone.
|
||||
description: Adds multiple new assignees to a task. The assignee needs to have
|
||||
access to the list, the doer must be able to edit this task. Every user not
|
||||
in the list will be unassigned from the task, pass an empty array to unassign
|
||||
everyone.
|
||||
parameters:
|
||||
- description: The array of assignees
|
||||
in: body
|
||||
@ -2481,9 +2493,50 @@ paths:
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Add new assignees to a task
|
||||
summary: Add multiple new assignees to a task
|
||||
tags:
|
||||
- assignees
|
||||
/tasks/{taskID}/labels/bulk:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Adds multiple new labels to a task.
|
||||
parameters:
|
||||
- description: The array of labels
|
||||
in: body
|
||||
name: label
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.LabelTaskBulk'
|
||||
type: object
|
||||
- description: Task ID
|
||||
in: path
|
||||
name: taskID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: The updated labels object.
|
||||
schema:
|
||||
$ref: '#/definitions/models.LabelTaskBulk'
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid label object provided.
|
||||
schema:
|
||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal error
|
||||
schema:
|
||||
$ref: '#/definitions/models.Message'
|
||||
type: object
|
||||
security:
|
||||
- JWTKeyAuth: []
|
||||
summary: Add multiple new labels to a task
|
||||
tags:
|
||||
- labels
|
||||
/tasks/all:
|
||||
get:
|
||||
consumes:
|
||||
|
Reference in New Issue
Block a user