Skip to content

Commit d5bac24

Browse files
committed
docs: add swagger docs for update task priority function
1 parent cbd2f47 commit d5bac24

1 file changed

Lines changed: 155 additions & 0 deletions

File tree

src/docs/swagger.json

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4883,6 +4883,161 @@
48834883
}
48844884
}
48854885
}
4886+
},
4887+
"/api/organization/{organizationId}/team/{teamId}/project/{projectId}/task/{taskId}/priority": {
4888+
"patch": {
4889+
"tags": ["Task"],
4890+
"summary": "Update task priority",
4891+
"description": "Updates the priority of an existing task within a specific project, team, and organization. Requires appropriate permissions.",
4892+
"security": [{ "BearerAuth": [] }],
4893+
"parameters": [
4894+
{
4895+
"name": "organizationId",
4896+
"in": "path",
4897+
"required": true,
4898+
"description": "ID of the organization",
4899+
"schema": { "type": "string" }
4900+
},
4901+
{
4902+
"name": "teamId",
4903+
"in": "path",
4904+
"required": true,
4905+
"description": "ID of the team",
4906+
"schema": { "type": "string" }
4907+
},
4908+
{
4909+
"name": "projectId",
4910+
"in": "path",
4911+
"required": true,
4912+
"description": "ID of the project",
4913+
"schema": { "type": "string" }
4914+
},
4915+
{
4916+
"name": "taskId",
4917+
"in": "path",
4918+
"required": true,
4919+
"description": "ID of the task to update",
4920+
"schema": { "type": "string" }
4921+
}
4922+
],
4923+
"requestBody": {
4924+
"required": true,
4925+
"content": {
4926+
"application/json": {
4927+
"schema": {
4928+
"type": "object",
4929+
"required": ["priority"],
4930+
"properties": {
4931+
"priority": {
4932+
"type": "string",
4933+
"enum": ["HIGH", "MEDIUM", "LOW"],
4934+
"description": "New priority level for the task",
4935+
"example": "MEDIUM"
4936+
}
4937+
}
4938+
}
4939+
}
4940+
}
4941+
},
4942+
"responses": {
4943+
"200": {
4944+
"description": "Task priority updated successfully",
4945+
"content": {
4946+
"application/json": {
4947+
"schema": {
4948+
"type": "object",
4949+
"properties": {
4950+
"success": { "type": "boolean", "example": true },
4951+
"message": {
4952+
"type": "string",
4953+
"example": "Task priority updated successfully"
4954+
},
4955+
"task": { "$ref": "#/components/schemas/Task" }
4956+
}
4957+
}
4958+
}
4959+
}
4960+
},
4961+
"400": {
4962+
"description": "Invalid priority value",
4963+
"content": {
4964+
"application/json": {
4965+
"schema": {
4966+
"type": "object",
4967+
"properties": {
4968+
"success": { "type": "boolean", "example": false },
4969+
"message": {
4970+
"type": "string",
4971+
"example": "Valid priority (HIGH, MEDIUM, LOW) is required"
4972+
}
4973+
}
4974+
}
4975+
}
4976+
}
4977+
},
4978+
"403": {
4979+
"description": "Forbidden - insufficient permissions",
4980+
"content": {
4981+
"application/json": {
4982+
"schema": {
4983+
"type": "object",
4984+
"properties": {
4985+
"success": { "type": "boolean", "example": false },
4986+
"message": {
4987+
"type": "string",
4988+
"example": "You don't have permission to update task priorities in this project"
4989+
}
4990+
}
4991+
}
4992+
}
4993+
}
4994+
},
4995+
"404": {
4996+
"description": "Not found - organization, team, project or task not found",
4997+
"content": {
4998+
"application/json": {
4999+
"schema": {
5000+
"type": "object",
5001+
"properties": {
5002+
"success": { "type": "boolean", "example": false },
5003+
"message": {
5004+
"oneOf": [
5005+
{
5006+
"type": "string",
5007+
"example": "Organization not found"
5008+
},
5009+
{ "type": "string", "example": "Team not found" },
5010+
{ "type": "string", "example": "Project not found" },
5011+
{
5012+
"type": "string",
5013+
"example": "Task not found or does not belong to the specified project"
5014+
}
5015+
]
5016+
}
5017+
}
5018+
}
5019+
}
5020+
}
5021+
},
5022+
"500": {
5023+
"description": "Internal server error",
5024+
"content": {
5025+
"application/json": {
5026+
"schema": {
5027+
"type": "object",
5028+
"properties": {
5029+
"success": { "type": "boolean", "example": false },
5030+
"message": {
5031+
"type": "string",
5032+
"example": "Internal server error"
5033+
}
5034+
}
5035+
}
5036+
}
5037+
}
5038+
}
5039+
}
5040+
}
48865041
}
48875042
},
48885043

0 commit comments

Comments
 (0)