Skip to content

Commit 22d2305

Browse files
committed
docs: add swagger docs for get all tasks endpoint
1 parent ede912b commit 22d2305

1 file changed

Lines changed: 250 additions & 0 deletions

File tree

src/docs/swagger.json

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5193,6 +5193,256 @@
51935193
}
51945194
}
51955195
}
5196+
},
5197+
"/api/organization/{organizationId}/team/{teamId}/project/{projectId}/task/all": {
5198+
"get": {
5199+
"tags": ["Tasks"],
5200+
"summary": "Get all tasks",
5201+
"description": "Retrieves all tasks for a specific project with filtering, sorting, and pagination capabilities.",
5202+
"security": [{ "BearerAuth": [] }],
5203+
"parameters": [
5204+
{
5205+
"name": "organizationId",
5206+
"in": "path",
5207+
"required": true,
5208+
"description": "ID of the organization",
5209+
"schema": { "type": "string" }
5210+
},
5211+
{
5212+
"name": "teamId",
5213+
"in": "path",
5214+
"required": true,
5215+
"description": "ID of the team",
5216+
"schema": { "type": "string" }
5217+
},
5218+
{
5219+
"name": "projectId",
5220+
"in": "path",
5221+
"required": true,
5222+
"description": "ID of the project",
5223+
"schema": { "type": "string" }
5224+
},
5225+
{
5226+
"name": "sprintId",
5227+
"in": "query",
5228+
"description": "Filter by sprint ID (use 'null' for tasks not in any sprint)",
5229+
"schema": { "type": "string" }
5230+
},
5231+
{
5232+
"name": "priority",
5233+
"in": "query",
5234+
"description": "Filter by priority (HIGH, MEDIUM, LOW, CRITICAL)",
5235+
"schema": { "type": "string" }
5236+
},
5237+
{
5238+
"name": "status",
5239+
"in": "query",
5240+
"description": "Filter by status (TODO, IN_PROGRESS, IN_REVIEW, DONE)",
5241+
"schema": { "type": "string" }
5242+
},
5243+
{
5244+
"name": "assignedTo",
5245+
"in": "query",
5246+
"description": "Filter by assignee ID (use 'null' for unassigned tasks)",
5247+
"schema": { "type": "string" }
5248+
},
5249+
{
5250+
"name": "parentId",
5251+
"in": "query",
5252+
"description": "Filter by parent task ID (use 'null' for root tasks)",
5253+
"schema": { "type": "string" }
5254+
},
5255+
{
5256+
"name": "search",
5257+
"in": "query",
5258+
"description": "Search term to filter by task title or description",
5259+
"schema": { "type": "string" }
5260+
},
5261+
{
5262+
"name": "page",
5263+
"in": "query",
5264+
"description": "Page number for pagination (default: 1)",
5265+
"schema": { "type": "integer", "default": 1 }
5266+
},
5267+
{
5268+
"name": "limit",
5269+
"in": "query",
5270+
"description": "Number of items per page (default: 20)",
5271+
"schema": { "type": "integer", "default": 20 }
5272+
},
5273+
{
5274+
"name": "sortBy",
5275+
"in": "query",
5276+
"description": "Field to sort by (default: createdAt)",
5277+
"schema": { "type": "string", "default": "createdAt" }
5278+
},
5279+
{
5280+
"name": "sortOrder",
5281+
"in": "query",
5282+
"description": "Sort order (asc or desc, default: desc)",
5283+
"schema": {
5284+
"type": "string",
5285+
"default": "desc",
5286+
"enum": ["asc", "desc"]
5287+
}
5288+
}
5289+
],
5290+
"responses": {
5291+
"200": {
5292+
"description": "List of tasks retrieved successfully",
5293+
"content": {
5294+
"application/json": {
5295+
"schema": {
5296+
"type": "object",
5297+
"properties": {
5298+
"success": { "type": "boolean", "example": true },
5299+
"tasks": {
5300+
"type": "array",
5301+
"items": {
5302+
"type": "object",
5303+
"properties": {
5304+
"id": { "type": "string" },
5305+
"title": { "type": "string" },
5306+
"description": { "type": "string" },
5307+
"priority": { "type": "string" },
5308+
"status": { "type": "string" },
5309+
"projectId": { "type": "string" },
5310+
"sprintId": { "type": "string" },
5311+
"createdBy": { "type": "string" },
5312+
"assignedTo": { "type": "string" },
5313+
"dueDate": {
5314+
"type": "string",
5315+
"format": "date-time"
5316+
},
5317+
"estimatedTime": { "type": "number" },
5318+
"parentId": { "type": "string" },
5319+
"labels": {
5320+
"type": "array",
5321+
"items": { "type": "string" }
5322+
},
5323+
"order": { "type": "number" },
5324+
"createdAt": {
5325+
"type": "string",
5326+
"format": "date-time"
5327+
},
5328+
"updatedAt": {
5329+
"type": "string",
5330+
"format": "date-time"
5331+
},
5332+
"creator": {
5333+
"type": "object",
5334+
"properties": {
5335+
"id": { "type": "string" },
5336+
"firstName": { "type": "string" },
5337+
"lastName": { "type": "string" },
5338+
"email": { "type": "string" },
5339+
"profilePic": { "type": "string" }
5340+
}
5341+
},
5342+
"assignee": {
5343+
"type": "object",
5344+
"properties": {
5345+
"id": { "type": "string" },
5346+
"firstName": { "type": "string" },
5347+
"lastName": { "type": "string" },
5348+
"email": { "type": "string" },
5349+
"profilePic": { "type": "string" }
5350+
}
5351+
},
5352+
"sprint": {
5353+
"type": "object",
5354+
"properties": {
5355+
"id": { "type": "string" },
5356+
"name": { "type": "string" },
5357+
"status": { "type": "string" }
5358+
}
5359+
},
5360+
"subtasks": {
5361+
"type": "array",
5362+
"items": {
5363+
"type": "object",
5364+
"properties": {
5365+
"id": { "type": "string" },
5366+
"title": { "type": "string" },
5367+
"status": { "type": "string" },
5368+
"priority": { "type": "string" }
5369+
}
5370+
}
5371+
},
5372+
"parent": {
5373+
"type": "object",
5374+
"properties": {
5375+
"id": { "type": "string" },
5376+
"title": { "type": "string" },
5377+
"status": { "type": "string" }
5378+
}
5379+
},
5380+
"_count": {
5381+
"type": "object",
5382+
"properties": {
5383+
"comments": { "type": "integer" },
5384+
"attachments": { "type": "integer" }
5385+
}
5386+
}
5387+
}
5388+
}
5389+
},
5390+
"pagination": {
5391+
"type": "object",
5392+
"properties": {
5393+
"total": { "type": "integer", "example": 100 },
5394+
"page": { "type": "integer", "example": 1 },
5395+
"limit": { "type": "integer", "example": 20 },
5396+
"pages": { "type": "integer", "example": 5 }
5397+
}
5398+
}
5399+
}
5400+
}
5401+
}
5402+
}
5403+
},
5404+
"404": {
5405+
"description": "Not found - organization, team or project not found",
5406+
"content": {
5407+
"application/json": {
5408+
"schema": {
5409+
"type": "object",
5410+
"properties": {
5411+
"success": { "type": "boolean", "example": false },
5412+
"message": {
5413+
"oneOf": [
5414+
{
5415+
"type": "string",
5416+
"example": "Organization not found"
5417+
},
5418+
{ "type": "string", "example": "Team not found" },
5419+
{ "type": "string", "example": "Project not found" }
5420+
]
5421+
}
5422+
}
5423+
}
5424+
}
5425+
}
5426+
},
5427+
"500": {
5428+
"description": "Internal server error",
5429+
"content": {
5430+
"application/json": {
5431+
"schema": {
5432+
"type": "object",
5433+
"properties": {
5434+
"success": { "type": "boolean", "example": false },
5435+
"message": {
5436+
"type": "string",
5437+
"example": "Internal server error"
5438+
}
5439+
}
5440+
}
5441+
}
5442+
}
5443+
}
5444+
}
5445+
}
51965446
}
51975447
},
51985448

0 commit comments

Comments
 (0)