1
0

Updated swagger docs

This commit is contained in:
kolaente
2018-12-25 21:45:26 +01:00
parent 067bb695b1
commit 36eb580c8a
4 changed files with 394 additions and 179 deletions

View File

@ -396,9 +396,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
@ -407,12 +407,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
@ -423,9 +423,9 @@ paths:
type: object
security:
- ApiKeyAuth: []
summary: Gets one team
summary: Gets one list
tags:
- team
- list
post:
consumes:
- application/json
@ -1616,40 +1616,6 @@ paths:
summary: Register
tags:
- user
/tasks:
get:
consumes:
- application/json
description: Returns all tasks on any list the user has access to.
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 tasks by task text.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The tasks
schema:
items:
$ref: '#/definitions/models.List'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- ApiKeyAuth: []
summary: Get tasks
tags:
- task
/tasks/{id}:
delete:
description: Deletes a task from a list. This does not mean "mark it done".
@ -1732,7 +1698,41 @@ paths:
summary: Update a task
tags:
- task
/tasks/{sortby}:
/tasks/all:
get:
consumes:
- application/json
description: Returns all tasks on any list the user has access to.
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 tasks by task text.
in: query
name: s
type: string
produces:
- application/json
responses:
"200":
description: The tasks
schema:
items:
$ref: '#/definitions/models.List'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- ApiKeyAuth: []
summary: Get tasks
tags:
- task
/tasks/all/{sortby}:
get:
consumes:
- application/json
@ -1772,6 +1772,56 @@ paths:
summary: Get tasks sorted
tags:
- task
/tasks/all/{sortby}/{startdate}/{enddate}:
get:
consumes:
- application/json
description: Returns all tasks on any list the user has access to.
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 tasks by task text.
in: query
name: s
type: string
- description: The sorting parameter. Possible values to sort by are priority,
prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.
in: path
name: sortby
required: true
type: string
- description: The start date parameter. Expects a unix timestamp.
in: path
name: startdate
required: true
type: string
- description: The end date parameter. Expects a unix timestamp.
in: path
name: enddate
required: true
type: string
produces:
- application/json
responses:
"200":
description: The tasks
schema:
items:
$ref: '#/definitions/models.List'
type: array
"500":
description: Internal error
schema:
$ref: '#/definitions/models.Message'
type: object
security:
- ApiKeyAuth: []
summary: Get tasks sorted and within a date range
tags:
- task
/tasks/caldav:
get:
description: Returns a calDAV-parsable format with all tasks as calendar events.