From 16ef95d60361ab61d5db900f896be058128ffb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Wed, 28 Jan 2026 23:42:38 +0300 Subject: [PATCH 01/20] fix: remove column_id parameter from task creation service --- src/services/task.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/services/task.js b/src/services/task.js index 8a86664..1d9d09e 100644 --- a/src/services/task.js +++ b/src/services/task.js @@ -32,7 +32,6 @@ export const fetchTasksByBoardIdService = async (boardId) => { * @param {string} payload.title - The title of the task * @param {string} payload.description - The description of the task * @param {string} payload.priority - The priority level of the task - * @param {string|number} payload.column_id - The ID of the column where the task will be placed * @param {string|Date} payload.deadline - The deadline for the task * @returns {Promise} The created task object * @throws {Error} If the database operation fails @@ -42,9 +41,9 @@ export const createTaskByBoardIdService = async (boardId, payload) => { const result = await sql` INSERT INTO task - (title,description,priority,column_id,board_id,deadline) + (title,description,priority,board_id,deadline) VALUES - (${payload.title}, ${payload.description}, ${payload.priority}, ${payload.column_id}, ${boardId}, ${payload.deadline}) + (${payload.title}, ${payload.description}, ${payload.priority}, ${boardId}, ${payload.deadline}) RETURNING * `; From 8f2a301ec0031bebab21ee2d54b1bf6d5b9cd85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Wed, 28 Jan 2026 23:42:41 +0300 Subject: [PATCH 02/20] fix: remove column_id property from addTaskSchema validation --- src/validation/task.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/validation/task.js b/src/validation/task.js index 86dc888..0f9d79d 100644 --- a/src/validation/task.js +++ b/src/validation/task.js @@ -7,7 +7,6 @@ import Joi from "joi"; * @property {string} title - The title of the task (required) * @property {string} [description] - The description of the task (optional, max 500 characters) * @property {('low'|'medium'|'high')} priority - The priority level of the task (required) - * @property {number} column_id - The ID of the column where the task belongs (required) * @property {Date} deadline - The deadline for the task (required) */ export const addTaskSchema = Joi.object({ @@ -16,7 +15,6 @@ export const addTaskSchema = Joi.object({ priority: Joi.string() .valid("low", "medium", "high") .required("Priority is required"), - column_id: Joi.number().required("Column ID is required"), deadline: Joi.date().required("Deadline is required"), }); From 6b01b6bdcd8b8b650a320416e122b418f891947e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Wed, 28 Jan 2026 23:47:29 +0300 Subject: [PATCH 03/20] fix: update task deletion endpoint and comment out move task path --- docs/openapi.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/openapi.yaml b/docs/openapi.yaml index af6af31..9e9d918 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -50,12 +50,12 @@ paths: $ref: ../swagger/paths/task/addTaskByBoardId.yaml get: $ref: ../swagger/paths/task/GetTasksByBoardId.yaml - /tasks/{board_id}/{task_id}: + /tasks/{task_id}: delete: $ref: ../swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml - /tasks/{board_id}/{task_id}/move: - patch: - $ref: ../swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml + # /tasks/{task_id}/move: + # patch: + # $ref: ../swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml components: securitySchemes: From 6dd23fc3e9fa3011f992eac39df379b6f20c5c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Wed, 28 Jan 2026 23:47:33 +0300 Subject: [PATCH 04/20] fix: comment out move task controller and validation schema --- src/routers/task.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/routers/task.js b/src/routers/task.js index aad1f34..f61fd2d 100644 --- a/src/routers/task.js +++ b/src/routers/task.js @@ -8,11 +8,14 @@ import { fetchTasksByBoardIdController, addTaskByBoardIdController, deleteTaskByIdController, - moveTaskByIdController, + // moveTaskByIdController, } from "../controller/task.js"; // Validation -import { addTaskSchema, moveTaskColumnSchema } from "../validation/task.js"; +import { + addTaskSchema, + // moveTaskColumnSchema +} from "../validation/task.js"; const router = Router(); @@ -20,18 +23,20 @@ router.use(authenticate); // Get all tasks for a specific board router.get("/:boardId", ctrlWrapper(fetchTasksByBoardIdController)); +// Add a Task By Board ID router.post( "/:boardId", validateBody(addTaskSchema), ctrlWrapper(addTaskByBoardIdController), ); + // Delete a Task By Board ID -router.delete("/:boardId/:taskId", ctrlWrapper(deleteTaskByIdController)); +router.delete("/:taskId", ctrlWrapper(deleteTaskByIdController)); // Move Task to another new column -router.patch( - "/:boardId/:taskId/move", - validateBody(moveTaskColumnSchema), - ctrlWrapper(moveTaskByIdController), -); +// router.patch( +// "/:boardId/:taskId/move", +// validateBody(moveTaskColumnSchema), +// ctrlWrapper(moveTaskByIdController), +// ); export default router; From ae8e074074ca114a022b5ffb7567a464f61fd90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Wed, 28 Jan 2026 23:47:37 +0300 Subject: [PATCH 05/20] fix: update delete task endpoint to remove board_id parameter --- .../task/DeleteTaskByBoardIdAndTaskId.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml b/swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml index 1851f9f..1acddc5 100644 --- a/swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml +++ b/swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml @@ -1,17 +1,17 @@ tags: - Task -summary: Delete Task by Board ID and Task ID -operationId: deleteTaskByBoardIdAndTaskId -description: Delete a specific task associated with a specific board by their IDs. +summary: Delete Task by Task ID +operationId: deleteTaskByTaskId +description: Delete a specific task by its ID. security: - bearerAuth: [] parameters: - - name: board_id - in: path - description: ID of the board to delete the task from - required: true - schema: - type: string + # - name: board_id + # in: path + # description: ID of the board to delete the task from + # required: true + # schema: + # type: string - name: task_id in: path description: ID of the task to delete From b4ff894c694c74a197afb2ff5f7ae409c709c8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Wed, 28 Jan 2026 23:54:28 +0300 Subject: [PATCH 06/20] fix: update delete task endpoint to remove board_id and simplify path --- docs/swagger.json | 108 ++-------------------------------------------- 1 file changed, 4 insertions(+), 104 deletions(-) diff --git a/docs/swagger.json b/docs/swagger.json index 377b964..e23e957 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -407,29 +407,20 @@ } } }, - "/tasks/{board_id}/{task_id}": { + "/tasks/{task_id}": { "delete": { "tags": [ "Task" ], - "summary": "Delete Task by Board ID and Task ID", - "operationId": "deleteTaskByBoardIdAndTaskId", - "description": "Delete a specific task associated with a specific board by their IDs.", + "summary": "Delete Task by Task ID", + "operationId": "deleteTaskByTaskId", + "description": "Delete a specific task by its ID.", "security": [ { "bearerAuth": [] } ], "parameters": [ - { - "name": "board_id", - "in": "path", - "description": "ID of the board to delete the task from", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "task_id", "in": "path", @@ -449,75 +440,6 @@ } } } - }, - "/tasks/{board_id}/{task_id}/move": { - "patch": { - "tags": [ - "Task" - ], - "summary": "Move Task by Board ID and Task ID", - "operationId": "moveTaskByBoardIdAndTaskId", - "description": "Move a specific task associated with a specific board by their IDs.", - "security": [ - { - "bearerAuth": [] - } - ], - "parameters": [ - { - "name": "board_id", - "in": "path", - "description": "ID of the board to delete the task from", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "task_id", - "in": "path", - "description": "ID of the task to delete", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/moveTask" - } - } - } - }, - "responses": { - "200": { - "description": "Task moved successfully.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "Success message.", - "example": "Task moved successfully." - }, - "data": { - "$ref": "#/components/schemas/taskItem" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - } - } - } } }, "components": { @@ -805,10 +727,6 @@ ], "example": "high" }, - "column_id": { - "type": "number", - "example": 3 - }, "board_id": { "type": "number", "example": 5 @@ -863,10 +781,6 @@ ], "example": "high" }, - "column_id": { - "type": "number", - "example": 3 - }, "board_id": { "type": "number", "example": 5 @@ -885,20 +799,6 @@ "board_id", "deadline" ] - }, - "moveTask": { - "type": "object", - "title": "Task | Move Task", - "properties": { - "column_id": { - "type": "number", - "description": "ID of the column to move the task to.", - "example": 3 - } - }, - "required": [ - "column_id" - ] } }, "responses": { From b40db4954c59bf8d076bfad3b421f4994ecdefe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Thu, 29 Jan 2026 00:16:15 +0300 Subject: [PATCH 07/20] fix: correct table name from 'column' to 'columns' in PostgreSQL connection script --- src/db/connectPostreSQL.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/connectPostreSQL.js b/src/db/connectPostreSQL.js index 69afd06..de9edd6 100644 --- a/src/db/connectPostreSQL.js +++ b/src/db/connectPostreSQL.js @@ -48,7 +48,7 @@ export const connectPostreSQL = async () => { );`; await sql` - CREATE TABLE IF NOT EXISTS column( + CREATE TABLE IF NOT EXISTS columns( id SERIAL PRIMARY KEY, title VARCHAR(100) NOT NULL, board_id INTEGER REFERENCES board(id) ON DELETE CASCADE From f5902f65fd3b9374f2c52a2c27dbab74bbddf0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Thu, 29 Jan 2026 00:21:36 +0300 Subject: [PATCH 08/20] fix: refactor task movement logic to remove board_id and update related schemas --- src/controller/task.js | 4 ++-- src/db/connectPostreSQL.js | 1 + src/routers/task.js | 17 +++++++---------- src/services/task.js | 14 +++++++------- src/validation/task.js | 2 ++ 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/controller/task.js b/src/controller/task.js index 4eea64b..e9394a8 100644 --- a/src/controller/task.js +++ b/src/controller/task.js @@ -37,9 +37,9 @@ export const deleteTaskByIdController = async (req, res) => { export const moveTaskByIdController = async (req, res) => { - const { taskId, boardId } = req.params; + const { taskId } = req.params; const { column_id: columnId } = req.body; - const updatedTask = await moveTaskByIdService(taskId, boardId, columnId); + const updatedTask = await moveTaskByIdService(taskId, columnId); res.status(200).json({ message: "Successfully moved task", diff --git a/src/db/connectPostreSQL.js b/src/db/connectPostreSQL.js index de9edd6..836fdc2 100644 --- a/src/db/connectPostreSQL.js +++ b/src/db/connectPostreSQL.js @@ -42,6 +42,7 @@ export const connectPostreSQL = async () => { title VARCHAR(100) NOT NULL, description TEXT, priority VARCHAR(10), + column_id INTEGER, board_id INTEGER REFERENCES board(id) ON DELETE CASCADE, deadline TIMESTAMP WITH TIME ZONE, created_at TIMESTAMP WITH TIME ZONE DEFAULT now() diff --git a/src/routers/task.js b/src/routers/task.js index f61fd2d..765342d 100644 --- a/src/routers/task.js +++ b/src/routers/task.js @@ -8,14 +8,11 @@ import { fetchTasksByBoardIdController, addTaskByBoardIdController, deleteTaskByIdController, - // moveTaskByIdController, + moveTaskByIdController, } from "../controller/task.js"; // Validation -import { - addTaskSchema, - // moveTaskColumnSchema -} from "../validation/task.js"; +import { addTaskSchema, moveTaskColumnSchema } from "../validation/task.js"; const router = Router(); @@ -34,9 +31,9 @@ router.post( router.delete("/:taskId", ctrlWrapper(deleteTaskByIdController)); // Move Task to another new column -// router.patch( -// "/:boardId/:taskId/move", -// validateBody(moveTaskColumnSchema), -// ctrlWrapper(moveTaskByIdController), -// ); +router.patch( + "/:taskId/move", + validateBody(moveTaskColumnSchema), + ctrlWrapper(moveTaskByIdController), +); export default router; diff --git a/src/services/task.js b/src/services/task.js index 1d9d09e..aa557e7 100644 --- a/src/services/task.js +++ b/src/services/task.js @@ -32,6 +32,7 @@ export const fetchTasksByBoardIdService = async (boardId) => { * @param {string} payload.title - The title of the task * @param {string} payload.description - The description of the task * @param {string} payload.priority - The priority level of the task + * @param {string|number} payload.column_id - The ID of the column where the task will be placed * @param {string|Date} payload.deadline - The deadline for the task * @returns {Promise} The created task object * @throws {Error} If the database operation fails @@ -41,9 +42,9 @@ export const createTaskByBoardIdService = async (boardId, payload) => { const result = await sql` INSERT INTO task - (title,description,priority,board_id,deadline) + (title,description,priority,column_id,board_id,deadline) VALUES - (${payload.title}, ${payload.description}, ${payload.priority}, ${boardId}, ${payload.deadline}) + (${payload.title}, ${payload.description}, ${payload.priority}, ${payload.column_id}, ${boardId}, ${payload.deadline}) RETURNING * `; @@ -61,10 +62,10 @@ export const createTaskByBoardIdService = async (boardId, payload) => { * @example * const deletedTask = await deleteTaskByIdService(123); */ -export const deleteTaskByIdService = async (taskId, boardId) => { +export const deleteTaskByIdService = async (taskId) => { const result = await sql` DELETE FROM task - WHERE id = ${taskId} AND board_id = ${boardId} + WHERE id = ${taskId} RETURNING * `; @@ -78,15 +79,14 @@ export const deleteTaskByIdService = async (taskId, boardId) => { * Moves a task to a different column within a board * @async * @param {string|number} taskId - The ID of the task to move - * @param {string|number} boardId - The ID of the board containing the task * @param {string|number} newColumnId - The ID of the destination column * @returns {Promise} The updated task object * @throws {Error} 404 error if task not found or doesn't belong to the specified board */ -export const moveTaskByIdService = async (taskId, boardId, newColumnId) => { +export const moveTaskByIdService = async (taskId, newColumnId) => { const result = await sql` UPDATE task SET column_id = ${newColumnId} - WHERE id = ${taskId} and board_id = ${boardId} + WHERE id = ${taskId} RETURNING * `; if (result.length === 0) { diff --git a/src/validation/task.js b/src/validation/task.js index 0f9d79d..86dc888 100644 --- a/src/validation/task.js +++ b/src/validation/task.js @@ -7,6 +7,7 @@ import Joi from "joi"; * @property {string} title - The title of the task (required) * @property {string} [description] - The description of the task (optional, max 500 characters) * @property {('low'|'medium'|'high')} priority - The priority level of the task (required) + * @property {number} column_id - The ID of the column where the task belongs (required) * @property {Date} deadline - The deadline for the task (required) */ export const addTaskSchema = Joi.object({ @@ -15,6 +16,7 @@ export const addTaskSchema = Joi.object({ priority: Joi.string() .valid("low", "medium", "high") .required("Priority is required"), + column_id: Joi.number().required("Column ID is required"), deadline: Joi.date().required("Deadline is required"), }); From 5d5c4c0115febf04ca937c4924ecdb92bb42bc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Thu, 29 Jan 2026 00:31:04 +0300 Subject: [PATCH 09/20] fix: add move task endpoint and update related schemas --- docs/openapi.yaml | 10 +-- docs/swagger.json | 82 +++++++++++++++++++ .../task/MoveTaskByBoardIdAndTaskId.yaml | 18 ++-- 3 files changed, 96 insertions(+), 14 deletions(-) diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 9e9d918..13d7504 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -46,17 +46,17 @@ paths: $ref: ../swagger/paths/board/deleteBoard.yaml # Tasks Paths /tasks/{board_id}: - post: + post: $ref: ../swagger/paths/task/addTaskByBoardId.yaml get: $ref: ../swagger/paths/task/GetTasksByBoardId.yaml /tasks/{task_id}: delete: $ref: ../swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml - # /tasks/{task_id}/move: - # patch: - # $ref: ../swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml - + /tasks/{task_id}/move: + patch: + $ref: ../swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml + components: securitySchemes: bearerAuth: diff --git a/docs/swagger.json b/docs/swagger.json index e23e957..2ac8ff1 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -440,6 +440,66 @@ } } } + }, + "/tasks/{task_id}/move": { + "patch": { + "tags": [ + "Task" + ], + "summary": "Move Task by Task ID", + "operationId": "moveTaskByTaskId", + "description": "Move a specific task by its ID.", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "task_id", + "in": "path", + "description": "ID of the task to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/moveTask" + } + } + } + }, + "responses": { + "200": { + "description": "Task moved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Success message.", + "example": "Task moved successfully." + }, + "data": { + "$ref": "#/components/schemas/taskItem" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + } + } } }, "components": { @@ -727,6 +787,10 @@ ], "example": "high" }, + "column_id": { + "type": "number", + "example": 3 + }, "board_id": { "type": "number", "example": 5 @@ -781,6 +845,10 @@ ], "example": "high" }, + "column_id": { + "type": "number", + "example": 3 + }, "board_id": { "type": "number", "example": 5 @@ -799,6 +867,20 @@ "board_id", "deadline" ] + }, + "moveTask": { + "type": "object", + "title": "Task | Move Task", + "properties": { + "column_id": { + "type": "number", + "description": "ID of the column to move the task to.", + "example": 3 + } + }, + "required": [ + "column_id" + ] } }, "responses": { diff --git a/swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml b/swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml index d784763..fd18725 100644 --- a/swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml +++ b/swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml @@ -1,17 +1,17 @@ tags: - Task -summary: Move Task by Board ID and Task ID -operationId: moveTaskByBoardIdAndTaskId -description: Move a specific task associated with a specific board by their IDs. +summary: Move Task by Task ID +operationId: moveTaskByTaskId +description: Move a specific task by its ID. security: - bearerAuth: [] parameters: - - name: board_id - in: path - description: ID of the board to delete the task from - required: true - schema: - type: string + # - name: board_id + # in: path + # description: ID of the board to delete the task from + # required: true + # schema: + # type: string - name: task_id in: path description: ID of the task to delete From 894cd265fe70bb9b1f77308fe559ba45611e5115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:10:21 +0300 Subject: [PATCH 10/20] fix: update OpenAPI documentation for endpoints and correct path references --- docs/openapi.yaml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 13d7504..a3bdace 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -8,11 +8,13 @@ info: description: This is a documentation of Task Pro tags: - name: Auth - description: Auth operations. + description: Auth Endpoint. - name: Board - description: Board operations. + description: Board Endpoint. - name: Task - description: Task operations. + description: Task Endpoint. + - name: Column + description: Column Endpoint. servers: - url: http://localhost:3000 description: Local Server @@ -49,14 +51,25 @@ paths: post: $ref: ../swagger/paths/task/addTaskByBoardId.yaml get: - $ref: ../swagger/paths/task/GetTasksByBoardId.yaml + $ref: ../swagger/paths/task/getTasksByBoardId.yaml /tasks/{task_id}: delete: - $ref: ../swagger/paths/task/DeleteTaskByBoardIdAndTaskId.yaml + $ref: ../swagger/paths/task/deleteTaskByBoardIdAndTaskId.yaml /tasks/{task_id}/move: patch: - $ref: ../swagger/paths/task/MoveTaskByBoardIdAndTaskId.yaml - + $ref: ../swagger/paths/task/moveTaskByBoardIdAndTaskId.yaml + # Columns Paths + /column: + post: + $ref: ../swagger/paths/column/addColumn.yaml + /column/{board_id}: + get: + $ref: ../swagger/paths/column/getColumnsByBoardId.yaml + /column/{column_id}: + delete: + $ref: ../swagger/paths/column/deleteColumnById.yaml + patch: + $ref: ../swagger/paths/column/updateColumnById.yaml components: securitySchemes: bearerAuth: From 679300495d9621a642e7919ca92768291b426ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:10:28 +0300 Subject: [PATCH 11/20] feat: enhance OpenAPI documentation for Column endpoints and add new operations --- docs/swagger.json | 274 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 263 insertions(+), 11 deletions(-) diff --git a/docs/swagger.json b/docs/swagger.json index 2ac8ff1..32bbd32 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -22,15 +22,19 @@ "tags": [ { "name": "Auth", - "description": "Auth operations." + "description": "Auth Endpoint." }, { "name": "Board", - "description": "Board operations." + "description": "Board Endpoint." }, { "name": "Task", - "description": "Task operations." + "description": "Task Endpoint." + }, + { + "name": "Column", + "description": "Column Endpoint." } ], "paths": { @@ -500,6 +504,201 @@ } } } + }, + "/column": { + "post": { + "tags": [ + "Column" + ], + "summary": "Add Column", + "operationId": "addColumn", + "description": "Add a new column to a specific board.", + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/addColumn" + } + } + } + }, + "responses": { + "201": { + "description": "Column added successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Success message.", + "example": "Column added successfully." + }, + "data": { + "$ref": "#/components/schemas/columnItem" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + } + } + }, + "/column/{board_id}": { + "get": { + "tags": [ + "Column" + ], + "summary": "Get Columns by Board ID", + "operationId": "getColumnsByBoardId", + "description": "Retrieve all columns associated with a specific board by its ID.", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "board_id", + "in": "path", + "description": "ID of the board to retrieve columns for", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A list of columns associated with the specified board ID.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Success message.", + "example": "Columns retrieved successfully." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/columnItem" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + } + } + }, + "/column/{column_id}": { + "delete": { + "tags": [ + "Column" + ], + "summary": "Delete Column by ID", + "operationId": "deleteColumnById", + "description": "Delete a specific column by its ID.", + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "column_id", + "in": "path", + "description": "ID of the column to delete", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Column deleted successfully." + }, + "401": { + "$ref": "#/components/responses/401" + } + } + }, + "patch": { + "tags": [ + "Column" + ], + "summary": "Update Column by ID", + "operationId": "updateColumnById", + "description": "Update the details of a specific column by its ID.", + "parameters": [ + { + "name": "column_id", + "in": "path", + "description": "column by id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/updateColumn" + } + } + } + }, + "responses": { + "200": { + "description": "Column updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Success message.", + "example": "Column updated successfully." + }, + "data": { + "$ref": "#/components/schemas/columnItem" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + } + } } }, "components": { @@ -572,10 +771,7 @@ }, "BadRequestError": { "type": "object", - "title": "Auth Error | Bad Request ", - "x-tags": [ - "Auth" - ], + "title": "Error | Bad Request ", "properties": { "message": { "type": "string", @@ -615,10 +811,7 @@ }, "UnauthorizedError": { "type": "object", - "title": "Auth Error | Unauthorized ", - "x-tags": [ - "Auth" - ], + "title": "Error | Unauthorized ", "properties": { "message": { "type": "string", @@ -881,6 +1074,65 @@ "required": [ "column_id" ] + }, + "addColumn": { + "type": "object", + "title": "Columns | Add Column ", + "properties": { + "title": { + "type": "string", + "example": "Design Homepage" + }, + "board_id": { + "type": "number", + "example": 5 + } + }, + "required": [ + "title", + "board_id" + ] + }, + "columnItem": { + "type": "object", + "title": "Columns | Item", + "properties": { + "id": { + "type": "number", + "example": 1 + }, + "title": { + "type": "string", + "example": "To Do" + }, + "board_id": { + "type": "number", + "example": 5 + }, + "position": { + "type": "number", + "example": 1 + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2024-01-10T14:30:00Z" + } + }, + "readOnly": true + }, + "updateColumn": { + "type": "object", + "title": "Columns | Update Column", + "properties": { + "title": { + "type": "string", + "example": "Updated Column Title" + } + }, + "required": [ + "title" + ] } }, "responses": { From e0ce25979e798c2cb54b479a4b95574ae8962b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:10:33 +0300 Subject: [PATCH 12/20] fix: update BadRequestError schema title and remove unnecessary x-tags --- swagger/components/schemas/auth/BadRequestError.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/swagger/components/schemas/auth/BadRequestError.yaml b/swagger/components/schemas/auth/BadRequestError.yaml index 39ab4c7..69822cf 100644 --- a/swagger/components/schemas/auth/BadRequestError.yaml +++ b/swagger/components/schemas/auth/BadRequestError.yaml @@ -1,7 +1,5 @@ type: object -title: "Auth Error | Bad Request " -x-tags: - - Auth +title: "Error | Bad Request " properties: message: type: string @@ -27,4 +25,4 @@ properties: "key": "email", }, } -readOnly: true \ No newline at end of file +readOnly: true From 12fe57c9d987f56b66e900cbb3b8004a89cfd0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:10:39 +0300 Subject: [PATCH 13/20] fix: update UnauthorizedError schema title and remove unnecessary x-tags --- swagger/components/schemas/auth/UnauthorizedError.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/swagger/components/schemas/auth/UnauthorizedError.yaml b/swagger/components/schemas/auth/UnauthorizedError.yaml index 54991f2..3e4dff4 100644 --- a/swagger/components/schemas/auth/UnauthorizedError.yaml +++ b/swagger/components/schemas/auth/UnauthorizedError.yaml @@ -1,7 +1,5 @@ type: object -title: "Auth Error | Unauthorized " -x-tags: - - Auth +title: "Error | Unauthorized " properties: message: type: string From 1c76f78cf31fce83d162ef4a1366f6ab62909e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:10:45 +0300 Subject: [PATCH 14/20] feat: add schema for adding columns in OpenAPI documentation --- swagger/components/schemas/column/addColumn.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 swagger/components/schemas/column/addColumn.yaml diff --git a/swagger/components/schemas/column/addColumn.yaml b/swagger/components/schemas/column/addColumn.yaml new file mode 100644 index 0000000..632f30d --- /dev/null +++ b/swagger/components/schemas/column/addColumn.yaml @@ -0,0 +1,12 @@ +type: object +title: "Columns | Add Column " +properties: + title: + type: string + example: "Design Homepage" + board_id: + type: number + example: 5 +required: + - title + - board_id From 88cce4342d6e482bc4f2ce90716f0d0a947ed2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:10:51 +0300 Subject: [PATCH 15/20] feat: add columnItem schema to OpenAPI documentation --- .../components/schemas/column/columnItem.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 swagger/components/schemas/column/columnItem.yaml diff --git a/swagger/components/schemas/column/columnItem.yaml b/swagger/components/schemas/column/columnItem.yaml new file mode 100644 index 0000000..dfad502 --- /dev/null +++ b/swagger/components/schemas/column/columnItem.yaml @@ -0,0 +1,20 @@ +type: object +title: "Columns | Item" +properties: + id: + type: number + example: 1 + title: + type: string + example: "To Do" + board_id: + type: number + example: 5 + position: + type: number + example: 1 + created_at: + type: string + format: date-time + example: "2024-01-10T14:30:00Z" +readOnly: true From daaa66311f9cbd06b1695a1dada34260687244ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:12:22 +0300 Subject: [PATCH 16/20] feat: add updateColumn schema to OpenAPI documentation --- swagger/components/schemas/column/updateColumn.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 swagger/components/schemas/column/updateColumn.yaml diff --git a/swagger/components/schemas/column/updateColumn.yaml b/swagger/components/schemas/column/updateColumn.yaml new file mode 100644 index 0000000..c30952b --- /dev/null +++ b/swagger/components/schemas/column/updateColumn.yaml @@ -0,0 +1,8 @@ +type: object +title: "Columns | Update Column" +properties: + title: + type: string + example: "Updated Column Title" +required: + - title From a4bdb70bd73ca4ee900c4b07288511dadc30c837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:12:29 +0300 Subject: [PATCH 17/20] feat: add addColumn endpoint to OpenAPI documentation --- swagger/paths/column/addColumn.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 swagger/paths/column/addColumn.yaml diff --git a/swagger/paths/column/addColumn.yaml b/swagger/paths/column/addColumn.yaml new file mode 100644 index 0000000..0043f10 --- /dev/null +++ b/swagger/paths/column/addColumn.yaml @@ -0,0 +1,28 @@ +tags: + - Column +summary: Add Column +operationId: addColumn +description: Add a new column to a specific board. +security: + - bearerAuth: [] +requestBody: + content: + application/json: + schema: + $ref: ../../components/schemas/column/addColumn.yaml +responses: + 201: + description: Column added successfully. + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: Success message. + example: "Column added successfully." + data: + $ref: ../../components/schemas/column/columnItem.yaml + 401: + $ref: ../../components/responses/auth/401.yaml From b26ae895db0fceda24225eb56c750bbb2684edeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:12:34 +0300 Subject: [PATCH 18/20] feat: add deleteColumnById endpoint to OpenAPI documentation --- swagger/paths/column/deleteColumnById.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 swagger/paths/column/deleteColumnById.yaml diff --git a/swagger/paths/column/deleteColumnById.yaml b/swagger/paths/column/deleteColumnById.yaml new file mode 100644 index 0000000..b66e09f --- /dev/null +++ b/swagger/paths/column/deleteColumnById.yaml @@ -0,0 +1,19 @@ +tags: + - Column +summary: Delete Column by ID +operationId: deleteColumnById +description: Delete a specific column by its ID. +security: + - bearerAuth: [] +parameters: + - name: column_id + in: path + description: ID of the column to delete + required: true + schema: + type: string +responses: + 204: + description: Column deleted successfully. + 401: + $ref: ../../components/responses/auth/401.yaml From f0063eb9b36287f5acd9fa0ed5e9521538766022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:12:40 +0300 Subject: [PATCH 19/20] feat: add getColumnsByBoardId endpoint to OpenAPI documentation --- swagger/paths/column/getColumnsByBoardId.yaml | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 swagger/paths/column/getColumnsByBoardId.yaml diff --git a/swagger/paths/column/getColumnsByBoardId.yaml b/swagger/paths/column/getColumnsByBoardId.yaml new file mode 100644 index 0000000..d9d5f07 --- /dev/null +++ b/swagger/paths/column/getColumnsByBoardId.yaml @@ -0,0 +1,32 @@ +tags: + - Column +summary: Get Columns by Board ID +operationId: getColumnsByBoardId +description: Retrieve all columns associated with a specific board by its ID. +security: + - bearerAuth: [] +parameters: + - name: board_id + in: path + description: ID of the board to retrieve columns for + required: true + schema: + type: string +responses: + 200: + description: A list of columns associated with the specified board ID. + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: Success message. + example: "Columns retrieved successfully." + data: + type: array + items: + $ref: ../../components/schemas/column/columnItem.yaml + 401: + $ref: ../../components/responses/auth/401.yaml From b6467aba89e568df147230941a774a3e48f8c5e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=BCrsel=20=C5=9EEN?= Date: Fri, 30 Jan 2026 00:12:44 +0300 Subject: [PATCH 20/20] feat: add updateColumnById endpoint to OpenAPI documentation --- swagger/paths/column/updateColumnById.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 swagger/paths/column/updateColumnById.yaml diff --git a/swagger/paths/column/updateColumnById.yaml b/swagger/paths/column/updateColumnById.yaml new file mode 100644 index 0000000..e789da6 --- /dev/null +++ b/swagger/paths/column/updateColumnById.yaml @@ -0,0 +1,35 @@ +tags: + - Column +summary: Update Column by ID +operationId: updateColumnById +description: Update the details of a specific column by its ID. +parameters: + - name: column_id + in: path + description: column by id + required: true + schema: + type: string +security: + - bearerAuth: [] +requestBody: + content: + application/json: + schema: + $ref: ../../components/schemas/column/updateColumn.yaml +responses: + 200: + description: Column updated successfully. + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: Success message. + example: "Column updated successfully." + data: + $ref: ../../components/schemas/column/columnItem.yaml + 401: + $ref: ../../components/responses/auth/401.yaml