1
0

Add task identifier (#115)

This commit is contained in:
konrad
2019-12-07 22:28:45 +00:00
parent 1a47d7d80d
commit 720df3cbed
18 changed files with 811 additions and 217 deletions

View File

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-12-07 20:29:10.551783293 +0100 CET m=+0.172017440
// 2019-12-07 22:54:02.661375666 +0100 CET m=+0.164990732
package swagger
@ -2649,7 +2649,7 @@ var doc = `{
"JWTKeyAuth": []
}
],
"description": "Returns one task by its ID",
"description": "Returns all tasks on any list the user has access to.",
"consumes": [
"application/json"
],
@ -2659,27 +2659,53 @@ var doc = `{
"tags": [
"task"
],
"summary": "Get one task",
"summary": "Get tasks",
"parameters": [
{
"type": "integer",
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
"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"
}
],
"responses": {
"200": {
"description": "The task",
"description": "The tasks",
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
"type": "array",
"items": {
"$ref": "#/definitions/models.Task"
}
}
},
"500": {
@ -2749,6 +2775,55 @@ var doc = `{
}
}
},
"/tasks/{ID}": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns one task by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Get one task",
"parameters": [
{
"type": "integer",
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The task",
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{id}": {
"post": {
"security": [
@ -4481,6 +4556,14 @@ var doc = `{
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"identifier": {
"description": "The task identifier, based on the list identifier and the task's index",
"type": "string"
},
"index": {
"description": "The task index, calculated per list",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",
@ -4663,6 +4746,12 @@ var doc = `{
"description": "The unique, numeric id of this list.",
"type": "integer"
},
"identifier": {
"description": "The unique list short identifier. Used to build task identifiers.",
"type": "string",
"maxLength": 10,
"minLength": 0
},
"owner": {
"description": "The user who created this list.",
"type": "object",
@ -4894,6 +4983,14 @@ var doc = `{
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"identifier": {
"description": "The task identifier, based on the list identifier and the task's index",
"type": "string"
},
"index": {
"description": "The task index, calculated per list",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",
@ -5002,6 +5099,14 @@ var doc = `{
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"identifier": {
"description": "The task identifier, based on the list identifier and the task's index",
"type": "string"
},
"index": {
"description": "The task index, calculated per list",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",

View File

@ -2631,7 +2631,7 @@
"JWTKeyAuth": []
}
],
"description": "Returns one task by its ID",
"description": "Returns all tasks on any list the user has access to.",
"consumes": [
"application/json"
],
@ -2641,27 +2641,53 @@
"tags": [
"task"
],
"summary": "Get one task",
"summary": "Get tasks",
"parameters": [
{
"type": "integer",
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
"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"
}
],
"responses": {
"200": {
"description": "The task",
"description": "The tasks",
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
"type": "array",
"items": {
"$ref": "#/definitions/models.Task"
}
}
},
"500": {
@ -2731,6 +2757,55 @@
}
}
},
"/tasks/{ID}": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns one task by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Get one task",
"parameters": [
{
"type": "integer",
"description": "The task ID",
"name": "ID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "The task",
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/tasks/{id}": {
"post": {
"security": [
@ -4462,6 +4537,14 @@
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"identifier": {
"description": "The task identifier, based on the list identifier and the task's index",
"type": "string"
},
"index": {
"description": "The task index, calculated per list",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",
@ -4644,6 +4727,12 @@
"description": "The unique, numeric id of this list.",
"type": "integer"
},
"identifier": {
"description": "The unique list short identifier. Used to build task identifiers.",
"type": "string",
"maxLength": 10,
"minLength": 0
},
"owner": {
"description": "The user who created this list.",
"type": "object",
@ -4875,6 +4964,14 @@
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"identifier": {
"description": "The task identifier, based on the list identifier and the task's index",
"type": "string"
},
"index": {
"description": "The task index, calculated per list",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",
@ -4983,6 +5080,14 @@
"description": "The unique, numeric id of this task.",
"type": "integer"
},
"identifier": {
"description": "The task identifier, based on the list identifier and the task's index",
"type": "string"
},
"index": {
"description": "The task index, calculated per list",
"type": "integer"
},
"labels": {
"description": "An array of labels which are associated with this task.",
"type": "array",

View File

@ -84,6 +84,13 @@ definitions:
id:
description: The unique, numeric id of this task.
type: integer
identifier:
description: The task identifier, based on the list identifier and the task's
index
type: string
index:
description: The task index, calculated per list
type: integer
labels:
description: An array of labels which are associated with this task.
items:
@ -232,6 +239,11 @@ definitions:
id:
description: The unique, numeric id of this list.
type: integer
identifier:
description: The unique list short identifier. Used to build task identifiers.
maxLength: 10
minLength: 0
type: string
owner:
$ref: '#/definitions/models.User'
description: The user who created this list.
@ -413,6 +425,13 @@ definitions:
id:
description: The unique, numeric id of this task.
type: integer
identifier:
description: The task identifier, based on the list identifier and the
task's index
type: string
index:
description: The task index, calculated per list
type: integer
labels:
description: An array of labels which are associated with this task.
items:
@ -500,6 +519,13 @@ definitions:
id:
description: The unique, numeric id of this task.
type: integer
identifier:
description: The task identifier, based on the list identifier and the task's
index
type: string
index:
description: The task index, calculated per list
type: integer
labels:
description: An array of labels which are associated with this task.
items:
@ -2587,6 +2613,37 @@ paths:
summary: Get an auth token for a share
tags:
- sharing
/tasks/{ID}:
get:
consumes:
- application/json
description: Returns one task by its ID
parameters:
- description: The task ID
in: path
name: ID
required: true
type: integer
produces:
- application/json
responses:
"200":
description: The task
schema:
$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 one task
tags:
- task
/tasks/{id}:
delete:
description: Deletes a task from a list. This does not mean "mark it done".
@ -3241,31 +3298,55 @@ paths:
get:
consumes:
- application/json
description: Returns one task by its ID
description: Returns all tasks on any list the user has access to.
parameters:
- description: The task ID
in: path
name: ID
required: true
- 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
type: integer
produces:
- application/json
responses:
"200":
description: The task
description: The tasks
schema:
$ref: '#/definitions/models.Task'
"404":
description: Task not found
schema:
$ref: '#/definitions/models.Message'
items:
$ref: '#/definitions/models.Task'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Get one task
summary: Get tasks
tags:
- task
/tasks/bulk: