|
4669 | 4669 | } |
4670 | 4670 | } |
4671 | 4671 | } |
| 4672 | + }, |
| 4673 | + "/api/organization/{organizationId}/team/{teamId}/project/{projectId}/task/{taskId}": { |
| 4674 | + "put": { |
| 4675 | + "tags": ["Task"], |
| 4676 | + "summary": "Update a task", |
| 4677 | + "description": "Updates an existing task within a specific project, team, and organization. Requires appropriate permissions.", |
| 4678 | + "security": [{ "BearerAuth": [] }], |
| 4679 | + "parameters": [ |
| 4680 | + { |
| 4681 | + "name": "organizationId", |
| 4682 | + "in": "path", |
| 4683 | + "required": true, |
| 4684 | + "description": "ID of the organization", |
| 4685 | + "schema": { "type": "string" } |
| 4686 | + }, |
| 4687 | + { |
| 4688 | + "name": "teamId", |
| 4689 | + "in": "path", |
| 4690 | + "required": true, |
| 4691 | + "description": "ID of the team", |
| 4692 | + "schema": { "type": "string" } |
| 4693 | + }, |
| 4694 | + { |
| 4695 | + "name": "projectId", |
| 4696 | + "in": "path", |
| 4697 | + "required": true, |
| 4698 | + "description": "ID of the project", |
| 4699 | + "schema": { "type": "string" } |
| 4700 | + }, |
| 4701 | + { |
| 4702 | + "name": "taskId", |
| 4703 | + "in": "path", |
| 4704 | + "required": true, |
| 4705 | + "description": "ID of the task to update", |
| 4706 | + "schema": { "type": "string" } |
| 4707 | + } |
| 4708 | + ], |
| 4709 | + "requestBody": { |
| 4710 | + "required": true, |
| 4711 | + "content": { |
| 4712 | + "application/json": { |
| 4713 | + "schema": { |
| 4714 | + "type": "object", |
| 4715 | + "properties": { |
| 4716 | + "title": { |
| 4717 | + "type": "string", |
| 4718 | + "description": "Updated title of the task", |
| 4719 | + "example": "Updated: Implement user authentication" |
| 4720 | + }, |
| 4721 | + "description": { |
| 4722 | + "type": "string", |
| 4723 | + "description": "Updated description of the task", |
| 4724 | + "example": "Updated: Implement JWT based authentication for the API" |
| 4725 | + }, |
| 4726 | + "priority": { |
| 4727 | + "type": "string", |
| 4728 | + "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"], |
| 4729 | + "description": "Updated priority level of the task", |
| 4730 | + "example": "MEDIUM" |
| 4731 | + }, |
| 4732 | + "sprintId": { |
| 4733 | + "type": "string", |
| 4734 | + "description": "Updated ID of the sprint this task belongs to", |
| 4735 | + "example": "cln3k7vxp0000v2k0q2q3k4k5" |
| 4736 | + }, |
| 4737 | + "assignedTo": { |
| 4738 | + "type": "string", |
| 4739 | + "description": "Updated ID of the user this task is assigned to", |
| 4740 | + "example": "cln3k7vxp0000v2k0q2q3k4k5" |
| 4741 | + }, |
| 4742 | + "dueDate": { |
| 4743 | + "type": "string", |
| 4744 | + "format": "date-time", |
| 4745 | + "description": "Updated due date for the task", |
| 4746 | + "example": "2024-01-15T23:59:59Z" |
| 4747 | + }, |
| 4748 | + "estimatedTime": { |
| 4749 | + "type": "number", |
| 4750 | + "description": "Updated estimated time to complete the task in hours", |
| 4751 | + "example": 12 |
| 4752 | + }, |
| 4753 | + "parentId": { |
| 4754 | + "type": "string", |
| 4755 | + "description": "Updated ID of the parent task if this is a subtask", |
| 4756 | + "example": "cln3k7vxp0000v2k0q2q3k4k5" |
| 4757 | + }, |
| 4758 | + "labels": { |
| 4759 | + "type": "array", |
| 4760 | + "items": { "type": "string" }, |
| 4761 | + "description": "Updated array of labels for the task", |
| 4762 | + "example": ["backend", "authentication", "security"] |
| 4763 | + } |
| 4764 | + } |
| 4765 | + } |
| 4766 | + } |
| 4767 | + } |
| 4768 | + }, |
| 4769 | + "responses": { |
| 4770 | + "200": { |
| 4771 | + "description": "Task updated successfully", |
| 4772 | + "content": { |
| 4773 | + "application/json": { |
| 4774 | + "schema": { |
| 4775 | + "type": "object", |
| 4776 | + "properties": { |
| 4777 | + "success": { "type": "boolean", "example": true }, |
| 4778 | + "message": { |
| 4779 | + "type": "string", |
| 4780 | + "example": "Task updated successfully" |
| 4781 | + }, |
| 4782 | + "task": { "$ref": "#/components/schemas/Task" } |
| 4783 | + } |
| 4784 | + } |
| 4785 | + } |
| 4786 | + } |
| 4787 | + }, |
| 4788 | + "400": { |
| 4789 | + "description": "Validation error or circular dependency detected", |
| 4790 | + "content": { |
| 4791 | + "application/json": { |
| 4792 | + "schema": { |
| 4793 | + "type": "object", |
| 4794 | + "properties": { |
| 4795 | + "success": { "type": "boolean", "example": false }, |
| 4796 | + "message": { |
| 4797 | + "oneOf": [ |
| 4798 | + { |
| 4799 | + "type": "string", |
| 4800 | + "example": "\"priority\" must be one of [LOW, MEDIUM, HIGH, CRITICAL]" |
| 4801 | + }, |
| 4802 | + { |
| 4803 | + "type": "string", |
| 4804 | + "example": "A task cannot be its own parent" |
| 4805 | + }, |
| 4806 | + { |
| 4807 | + "type": "string", |
| 4808 | + "example": "Circular dependency detected in task hierarchy" |
| 4809 | + } |
| 4810 | + ] |
| 4811 | + } |
| 4812 | + } |
| 4813 | + } |
| 4814 | + } |
| 4815 | + } |
| 4816 | + }, |
| 4817 | + "403": { |
| 4818 | + "description": "Forbidden - insufficient permissions", |
| 4819 | + "content": { |
| 4820 | + "application/json": { |
| 4821 | + "schema": { |
| 4822 | + "type": "object", |
| 4823 | + "properties": { |
| 4824 | + "success": { "type": "boolean", "example": false }, |
| 4825 | + "message": { |
| 4826 | + "type": "string", |
| 4827 | + "example": "You don't have permission to update tasks in this project" |
| 4828 | + } |
| 4829 | + } |
| 4830 | + } |
| 4831 | + } |
| 4832 | + } |
| 4833 | + }, |
| 4834 | + "404": { |
| 4835 | + "description": "Not found - organization, team, project, task, sprint or parent task not found", |
| 4836 | + "content": { |
| 4837 | + "application/json": { |
| 4838 | + "schema": { |
| 4839 | + "type": "object", |
| 4840 | + "properties": { |
| 4841 | + "success": { "type": "boolean", "example": false }, |
| 4842 | + "message": { |
| 4843 | + "oneOf": [ |
| 4844 | + { |
| 4845 | + "type": "string", |
| 4846 | + "example": "Organization not found" |
| 4847 | + }, |
| 4848 | + { |
| 4849 | + "type": "string", |
| 4850 | + "example": "Task not found or does not belong to the specified project" |
| 4851 | + }, |
| 4852 | + { |
| 4853 | + "type": "string", |
| 4854 | + "example": "Sprint not found or does not belong to the specified project" |
| 4855 | + }, |
| 4856 | + { |
| 4857 | + "type": "string", |
| 4858 | + "example": "Parent task not found or does not belong to the specified project" |
| 4859 | + } |
| 4860 | + ] |
| 4861 | + } |
| 4862 | + } |
| 4863 | + } |
| 4864 | + } |
| 4865 | + } |
| 4866 | + }, |
| 4867 | + "500": { |
| 4868 | + "description": "Internal server error", |
| 4869 | + "content": { |
| 4870 | + "application/json": { |
| 4871 | + "schema": { |
| 4872 | + "type": "object", |
| 4873 | + "properties": { |
| 4874 | + "success": { "type": "boolean", "example": false }, |
| 4875 | + "message": { |
| 4876 | + "type": "string", |
| 4877 | + "example": "Internal server error" |
| 4878 | + } |
| 4879 | + } |
| 4880 | + } |
| 4881 | + } |
| 4882 | + } |
| 4883 | + } |
| 4884 | + } |
| 4885 | + } |
4672 | 4886 | } |
4673 | 4887 | }, |
4674 | 4888 |
|
|
0 commit comments