1
0

Add endpoint to get a single task (#106)

This commit is contained in:
konrad
2019-11-02 20:33:18 +00:00
parent ed4c17892e
commit 9be5ab248c
8 changed files with 136 additions and 191 deletions

View File

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-10-23 23:00:23.451871583 +0200 CEST m=+0.120322599
// 2019-11-02 21:06:44.848486087 +0100 CET m=+0.175638002
package swagger
@ -407,7 +407,7 @@ var doc = `{
"JWTKeyAuth": []
}
],
"description": "Returns a list by its ID.",
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
@ -415,13 +415,13 @@ var doc = `{
"application/json"
],
"tags": [
"list"
"team"
],
"summary": "Gets one list",
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "List ID",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
@ -429,13 +429,13 @@ var doc = `{
],
"responses": {
"200": {
"description": "The list",
"description": "The team",
"schema": {
"$ref": "#/definitions/models.List"
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the list",
"description": "The user does not have access to the team",
"schema": {
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
}
@ -2561,7 +2561,7 @@ var doc = `{
"JWTKeyAuth": []
}
],
"description": "Returns all tasks on any list the user has access to.",
"description": "Returns one task by its ID",
"consumes": [
"application/json"
],
@ -2571,53 +2571,27 @@ var doc = `{
"tags": [
"task"
],
"summary": "Get tasks",
"summary": "Get one task",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search tasks by task text.",
"name": "s",
"in": "query"
},
{
"type": "string",
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, duedate, duedatedesc, duedateasc.",
"name": "sort",
"in": "query"
},
{
"type": "integer",
"description": "The start date parameter to filter by. Expects a unix timestamp. If no end date, but a start date is specified, the end date is set to the current time.",
"name": "startdate",
"in": "query"
},
{
"type": "integer",
"description": "The end date parameter to filter by. Expects a unix timestamp. If no start date, but an end date is specified, the start date is set to the current time.",
"name": "enddate",
"in": "query"
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The tasks",
"description": "The task",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Task"
}
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {

View File

@ -389,7 +389,7 @@
"JWTKeyAuth": []
}
],
"description": "Returns a list by its ID.",
"description": "Returns a team by its ID.",
"consumes": [
"application/json"
],
@ -397,13 +397,13 @@
"application/json"
],
"tags": [
"list"
"team"
],
"summary": "Gets one list",
"summary": "Gets one team",
"parameters": [
{
"type": "integer",
"description": "List ID",
"description": "Team ID",
"name": "id",
"in": "path",
"required": true
@ -411,13 +411,13 @@
],
"responses": {
"200": {
"description": "The list",
"description": "The team",
"schema": {
"$ref": "#/definitions/models.List"
"$ref": "#/definitions/models.Team"
}
},
"403": {
"description": "The user does not have access to the list",
"description": "The user does not have access to the team",
"schema": {
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
}
@ -2543,7 +2543,7 @@
"JWTKeyAuth": []
}
],
"description": "Returns all tasks on any list the user has access to.",
"description": "Returns one task by its ID",
"consumes": [
"application/json"
],
@ -2553,53 +2553,27 @@
"tags": [
"task"
],
"summary": "Get tasks",
"summary": "Get one task",
"parameters": [
{
"type": "integer",
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "The maximum number of items per page. Note this parameter is limited by the configured maximum of items per page.",
"name": "per_page",
"in": "query"
},
{
"type": "string",
"description": "Search tasks by task text.",
"name": "s",
"in": "query"
},
{
"type": "string",
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, duedate, duedatedesc, duedateasc.",
"name": "sort",
"in": "query"
},
{
"type": "integer",
"description": "The start date parameter to filter by. Expects a unix timestamp. If no end date, but a start date is specified, the end date is set to the current time.",
"name": "startdate",
"in": "query"
},
{
"type": "integer",
"description": "The end date parameter to filter by. Expects a unix timestamp. If no start date, but an end date is specified, the start date is set to the current time.",
"name": "enddate",
"in": "query"
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The tasks",
"description": "The task",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Task"
}
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {

View File

@ -1138,9 +1138,9 @@ paths:
get:
consumes:
- application/json
description: Returns a list by its ID.
description: Returns a team by its ID.
parameters:
- description: List ID
- description: Team ID
in: path
name: id
required: true
@ -1149,11 +1149,11 @@ paths:
- application/json
responses:
"200":
description: The list
description: The team
schema:
$ref: '#/definitions/models.List'
$ref: '#/definitions/models.Team'
"403":
description: The user does not have access to the list
description: The user does not have access to the team
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
"500":
@ -1162,9 +1162,9 @@ paths:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Gets one list
summary: Gets one team
tags:
- list
- team
post:
consumes:
- application/json
@ -3177,55 +3177,31 @@ paths:
get:
consumes:
- application/json
description: Returns all tasks on any list the user has access to.
description: Returns one task by its ID
parameters:
- description: The page number. Used for pagination. If not provided, the first
page of results is returned.
in: query
name: page
type: integer
- description: The maximum number of items per page. Note this parameter is
limited by the configured maximum of items per page.
in: query
name: per_page
type: integer
- description: Search tasks by task text.
in: query
name: s
type: string
- description: The sorting parameter. Possible values to sort by are priority,
prioritydesc, priorityasc, duedate, duedatedesc, duedateasc.
in: query
name: sort
type: string
- description: The start date parameter to filter by. Expects a unix timestamp.
If no end date, but a start date is specified, the end date is set to the
current time.
in: query
name: startdate
type: integer
- description: The end date parameter to filter by. Expects a unix timestamp.
If no start date, but an end date is specified, the start date is set to
the current time.
in: query
name: enddate
- description: The task ID
in: path
name: ID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The tasks
description: The task
schema:
items:
$ref: '#/definitions/models.Task'
type: array
$ref: '#/definitions/models.Task'
"404":
description: Task not found
schema:
$ref: '#/definitions/models.Message'
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Get tasks
summary: Get one task
tags:
- task
/tasks/bulk: