From 740ec183d9637f7156b6d96a37de1b94acedba8e Mon Sep 17 00:00:00 2001 From: "Frederick [Bot]" Date: Wed, 4 Mar 2026 16:29:06 +0000 Subject: [PATCH] [skip ci] Updated swagger docs --- pkg/swagger/docs.go | 62 ++++++++++++++++++++++++++++++++++++++++ pkg/swagger/swagger.json | 62 ++++++++++++++++++++++++++++++++++++++++ pkg/swagger/swagger.yaml | 40 ++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index a554753c6..0684652a9 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -5277,6 +5277,55 @@ const docTemplate = `{ } } }, + "/tasks/{taskID}/duplicate": { + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Copies a task with all its properties (labels, assignees, attachments, reminders) into the same project. Creates a \"copied from\" relation between the new and original task.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Duplicate a task", + "parameters": [ + { + "type": "integer", + "description": "The task ID to duplicate", + "name": "taskID", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "description": "The duplicated task.", + "schema": { + "$ref": "#/definitions/models.TaskDuplicate" + } + }, + "403": { + "description": "The user does not have access to the task.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/tasks/{taskID}/labels/bulk": { "post": { "security": [ @@ -8946,6 +8995,19 @@ const docTemplate = `{ } } }, + "models.TaskDuplicate": { + "type": "object", + "properties": { + "duplicated_task": { + "description": "The duplicated task", + "allOf": [ + { + "$ref": "#/definitions/models.Task" + } + ] + } + } + }, "models.TaskPosition": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index 4e8b12c26..63120a3d5 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -5269,6 +5269,55 @@ } } }, + "/tasks/{taskID}/duplicate": { + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Copies a task with all its properties (labels, assignees, attachments, reminders) into the same project. Creates a \"copied from\" relation between the new and original task.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "task" + ], + "summary": "Duplicate a task", + "parameters": [ + { + "type": "integer", + "description": "The task ID to duplicate", + "name": "taskID", + "in": "path", + "required": true + } + ], + "responses": { + "201": { + "description": "The duplicated task.", + "schema": { + "$ref": "#/definitions/models.TaskDuplicate" + } + }, + "403": { + "description": "The user does not have access to the task.", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/tasks/{taskID}/labels/bulk": { "post": { "security": [ @@ -8938,6 +8987,19 @@ } } }, + "models.TaskDuplicate": { + "type": "object", + "properties": { + "duplicated_task": { + "description": "The duplicated task", + "allOf": [ + { + "$ref": "#/definitions/models.Task" + } + ] + } + } + }, "models.TaskPosition": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 0c5ce06cf..aa7662d89 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -840,6 +840,13 @@ definitions: updated: type: string type: object + models.TaskDuplicate: + properties: + duplicated_task: + allOf: + - $ref: '#/definitions/models.Task' + description: The duplicated task + type: object models.TaskPosition: properties: position: @@ -5299,6 +5306,39 @@ paths: summary: Update an existing task comment tags: - task + /tasks/{taskID}/duplicate: + put: + consumes: + - application/json + description: Copies a task with all its properties (labels, assignees, attachments, + reminders) into the same project. Creates a "copied from" relation between + the new and original task. + parameters: + - description: The task ID to duplicate + in: path + name: taskID + required: true + type: integer + produces: + - application/json + responses: + "201": + description: The duplicated task. + schema: + $ref: '#/definitions/models.TaskDuplicate' + "403": + description: The user does not have access to the task. + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Duplicate a task + tags: + - task /tasks/{taskID}/labels/bulk: post: consumes: