swaggerdocs
Some checks reported errors
continuous-integration/drone/pr Build was killed

This commit is contained in:
kolaente 2019-08-31 22:48:56 +02:00
parent d861132e2d
commit f9cef8e69f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 193 additions and 40 deletions

View File

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at // This file was generated by swaggo/swag at
// 2019-08-29 21:40:58.623932113 +0200 CEST m=+0.319334650 // 2019-08-31 22:48:49.201391811 +0200 CEST m=+0.228973511
package swagger package swagger
@ -58,7 +58,7 @@ var doc = `{
"JWTKeyAuth": [] "JWTKeyAuth": []
} }
], ],
"description": "Returns an array with all assignees for this task.", "description": "Returns all labels which are either created by the user or associated with a task the user has at least read-access to.",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -66,9 +66,9 @@ var doc = `{
"application/json" "application/json"
], ],
"tags": [ "tags": [
"assignees" "labels"
], ],
"summary": "Get all assignees for a task", "summary": "Get all labels a user has access to",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@ -78,18 +78,18 @@ var doc = `{
}, },
{ {
"type": "string", "type": "string",
"description": "Search assignees by their username.", "description": "Search labels by label text.",
"name": "s", "name": "s",
"in": "query" "in": "query"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "The assignees", "description": "The labels",
"schema": { "schema": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/models.User" "$ref": "#/definitions/models.Label"
} }
} }
}, },
@ -412,7 +412,7 @@ var doc = `{
"JWTKeyAuth": [] "JWTKeyAuth": []
} }
], ],
"description": "Returns a team by its ID.", "description": "Returns a list by its ID.",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -420,13 +420,13 @@ var doc = `{
"application/json" "application/json"
], ],
"tags": [ "tags": [
"team" "list"
], ],
"summary": "Gets one team", "summary": "Gets one list",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
"description": "Team ID", "description": "List ID",
"name": "id", "name": "id",
"in": "path", "in": "path",
"required": true "required": true
@ -434,14 +434,14 @@ var doc = `{
], ],
"responses": { "responses": {
"200": { "200": {
"description": "The team", "description": "The list",
"schema": { "schema": {
"type": "object", "type": "object",
"$ref": "#/definitions/models.Team" "$ref": "#/definitions/models.List"
} }
}, },
"403": { "403": {
"description": "The user does not have access to the team", "description": "The user does not have access to the list",
"schema": { "schema": {
"type": "object", "type": "object",
"$ref": "#/definitions/code.vikunja.io.web.HTTPError" "$ref": "#/definitions/code.vikunja.io.web.HTTPError"
@ -2903,6 +2903,63 @@ var doc = `{
} }
}, },
"/tasks/{taskID}/assignees": { "/tasks/{taskID}/assignees": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns an array with all assignees for this task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"assignees"
],
"summary": "Get all assignees for a task",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
"name": "p",
"in": "query"
},
{
"type": "string",
"description": "Search assignees by their username.",
"name": "s",
"in": "query"
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The assignees",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"type": "object",
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": { "put": {
"security": [ "security": [
{ {

View File

@ -45,7 +45,7 @@
"JWTKeyAuth": [] "JWTKeyAuth": []
} }
], ],
"description": "Returns an array with all assignees for this task.", "description": "Returns all labels which are either created by the user or associated with a task the user has at least read-access to.",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -53,9 +53,9 @@
"application/json" "application/json"
], ],
"tags": [ "tags": [
"assignees" "labels"
], ],
"summary": "Get all assignees for a task", "summary": "Get all labels a user has access to",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@ -65,18 +65,18 @@
}, },
{ {
"type": "string", "type": "string",
"description": "Search assignees by their username.", "description": "Search labels by label text.",
"name": "s", "name": "s",
"in": "query" "in": "query"
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "The assignees", "description": "The labels",
"schema": { "schema": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/models.User" "$ref": "#/definitions/models.Label"
} }
} }
}, },
@ -399,7 +399,7 @@
"JWTKeyAuth": [] "JWTKeyAuth": []
} }
], ],
"description": "Returns a team by its ID.", "description": "Returns a list by its ID.",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@ -407,13 +407,13 @@
"application/json" "application/json"
], ],
"tags": [ "tags": [
"team" "list"
], ],
"summary": "Gets one team", "summary": "Gets one list",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
"description": "Team ID", "description": "List ID",
"name": "id", "name": "id",
"in": "path", "in": "path",
"required": true "required": true
@ -421,14 +421,14 @@
], ],
"responses": { "responses": {
"200": { "200": {
"description": "The team", "description": "The list",
"schema": { "schema": {
"type": "object", "type": "object",
"$ref": "#/definitions/models.Team" "$ref": "#/definitions/models.List"
} }
}, },
"403": { "403": {
"description": "The user does not have access to the team", "description": "The user does not have access to the list",
"schema": { "schema": {
"type": "object", "type": "object",
"$ref": "#/definitions/code.vikunja.io/web.HTTPError" "$ref": "#/definitions/code.vikunja.io/web.HTTPError"
@ -2890,6 +2890,63 @@
} }
}, },
"/tasks/{taskID}/assignees": { "/tasks/{taskID}/assignees": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns an array with all assignees for this task.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"assignees"
],
"summary": "Get all assignees for a task",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
"name": "p",
"in": "query"
},
{
"type": "string",
"description": "Search assignees by their username.",
"name": "s",
"in": "query"
},
{
"type": "integer",
"description": "Task ID",
"name": "taskID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The assignees",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.User"
}
}
},
"500": {
"description": "Internal error",
"schema": {
"type": "object",
"$ref": "#/definitions/models.Message"
}
}
}
},
"put": { "put": {
"security": [ "security": [
{ {

View File

@ -733,14 +733,15 @@ paths:
get: get:
consumes: consumes:
- application/json - application/json
description: Returns an array with all assignees for this task. description: Returns all labels which are either created by the user or associated
with a task the user has at least read-access to.
parameters: parameters:
- description: The page number. Used for pagination. If not provided, the first - description: The page number. Used for pagination. If not provided, the first
page of results is returned. page of results is returned.
in: query in: query
name: p name: p
type: integer type: integer
- description: Search assignees by their username. - description: Search labels by label text.
in: query in: query
name: s name: s
type: string type: string
@ -748,10 +749,10 @@ paths:
- application/json - application/json
responses: responses:
"200": "200":
description: The assignees description: The labels
schema: schema:
items: items:
$ref: '#/definitions/models.User' $ref: '#/definitions/models.Label'
type: array type: array
"500": "500":
description: Internal error description: Internal error
@ -760,9 +761,9 @@ paths:
type: object type: object
security: security:
- JWTKeyAuth: [] - JWTKeyAuth: []
summary: Get all assignees for a task summary: Get all labels a user has access to
tags: tags:
- assignees - labels
put: put:
consumes: consumes:
- application/json - application/json
@ -1006,9 +1007,9 @@ paths:
get: get:
consumes: consumes:
- application/json - application/json
description: Returns a team by its ID. description: Returns a list by its ID.
parameters: parameters:
- description: Team ID - description: List ID
in: path in: path
name: id name: id
required: true required: true
@ -1017,12 +1018,12 @@ paths:
- application/json - application/json
responses: responses:
"200": "200":
description: The team description: The list
schema: schema:
$ref: '#/definitions/models.Team' $ref: '#/definitions/models.List'
type: object type: object
"403": "403":
description: The user does not have access to the team description: The user does not have access to the list
schema: schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError' $ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object type: object
@ -1033,9 +1034,9 @@ paths:
type: object type: object
security: security:
- JWTKeyAuth: [] - JWTKeyAuth: []
summary: Gets one team summary: Gets one list
tags: tags:
- team - list
post: post:
consumes: consumes:
- application/json - application/json
@ -2701,6 +2702,44 @@ paths:
tags: tags:
- labels - labels
/tasks/{taskID}/assignees: /tasks/{taskID}/assignees:
get:
consumes:
- application/json
description: Returns an array with all assignees for this task.
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: p
type: integer
- description: Search assignees by their username.
in: query
name: s
type: string
- description: Task ID
in: path
name: taskID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The assignees
schema:
items:
$ref: '#/definitions/models.User'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- JWTKeyAuth: []
summary: Get all assignees for a task
tags:
- assignees
put: put:
consumes: consumes:
- application/json - application/json