[skip ci] Updated swagger docs

This commit is contained in:
Frederick [Bot] 2026-04-11 21:00:40 +00:00
parent c06a33fb63
commit 9a12c8f254
3 changed files with 203 additions and 0 deletions

View File

@ -3739,6 +3739,80 @@ const docTemplate = `{
}
}
},
"/projects/{project}/tasks/by-index/{index}": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns a single task identified by its per-project index. Useful when resolving human-readable references like \"PROJ-42\" to a canonical task object. Note that task indexes are reassigned when a task is moved between projects, so long-lived references should use the returned task id instead.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Get one task by its per-project index",
"parameters": [
{
"type": "integer",
"description": "The project ID",
"name": "project",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The task's per-project index",
"name": "index",
"in": "path",
"required": true
},
{
"type": "string",
"description": "If set to ` + "`" + `subtasks` + "`" + `, Vikunja will fetch only tasks which do not have subtasks and then in a second step, will fetch all of these subtasks. This may result in more tasks than the pagination limit being returned, but all subtasks will be present in the response. You can only set this to ` + "`" + `subtasks` + "`" + `.",
"name": "expand",
"in": "query"
}
],
"responses": {
"200": {
"description": "The task",
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"400": {
"description": "Invalid project ID or index",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the task",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/projects/{project}/views": {
"get": {
"security": [

View File

@ -3731,6 +3731,80 @@
}
}
},
"/projects/{project}/tasks/by-index/{index}": {
"get": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Returns a single task identified by its per-project index. Useful when resolving human-readable references like \"PROJ-42\" to a canonical task object. Note that task indexes are reassigned when a task is moved between projects, so long-lived references should use the returned task id instead.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"task"
],
"summary": "Get one task by its per-project index",
"parameters": [
{
"type": "integer",
"description": "The project ID",
"name": "project",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "The task's per-project index",
"name": "index",
"in": "path",
"required": true
},
{
"type": "string",
"description": "If set to `subtasks`, Vikunja will fetch only tasks which do not have subtasks and then in a second step, will fetch all of these subtasks. This may result in more tasks than the pagination limit being returned, but all subtasks will be present in the response. You can only set this to `subtasks`.",
"name": "expand",
"in": "query"
}
],
"responses": {
"200": {
"description": "The task",
"schema": {
"$ref": "#/definitions/models.Task"
}
},
"400": {
"description": "Invalid project ID or index",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"403": {
"description": "The user does not have access to the task",
"schema": {
"$ref": "#/definitions/web.HTTPError"
}
},
"404": {
"description": "Task not found",
"schema": {
"$ref": "#/definitions/models.Message"
}
},
"500": {
"description": "Internal error",
"schema": {
"$ref": "#/definitions/models.Message"
}
}
}
}
},
"/projects/{project}/views": {
"get": {
"security": [

View File

@ -3970,6 +3970,61 @@ paths:
summary: Get one link shares for a project
tags:
- sharing
/projects/{project}/tasks/by-index/{index}:
get:
consumes:
- application/json
description: Returns a single task identified by its per-project index. Useful
when resolving human-readable references like "PROJ-42" to a canonical task
object. Note that task indexes are reassigned when a task is moved between
projects, so long-lived references should use the returned task id instead.
parameters:
- description: The project ID
in: path
name: project
required: true
type: integer
- description: The task's per-project index
in: path
name: index
required: true
type: integer
- description: If set to `subtasks`, Vikunja will fetch only tasks which do
not have subtasks and then in a second step, will fetch all of these subtasks.
This may result in more tasks than the pagination limit being returned,
but all subtasks will be present in the response. You can only set this
to `subtasks`.
in: query
name: expand
type: string
produces:
- application/json
responses:
"200":
description: The task
schema:
$ref: '#/definitions/models.Task'
"400":
description: Invalid project ID or index
schema:
$ref: '#/definitions/web.HTTPError'
"403":
description: The user does not have access to the task
schema:
$ref: '#/definitions/web.HTTPError'
"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 by its per-project index
tags:
- task
/projects/{project}/views:
get:
consumes: