From b9a01fdaef0f270fe5f7efb6913cc28247d39cbb Mon Sep 17 00:00:00 2001 From: Manish Gupta Date: Fri, 31 Jul 2026 16:59:25 +0530 Subject: [PATCH] [WEB-8382][WEB-8383] docs: document 403 responses in the OpenAPI contract The author/admin guard on comment update+delete and the project-membership guard on attachment list all return 403, but their explicit `responses` maps omitted it, so the generated schema advertised only 400/404/409. Adds `403: FORBIDDEN_RESPONSE` (already imported) to update_work_item_comment, delete_work_item_comment and list_work_item_attachments. Addresses CodeRabbit review on #9475. Co-Authored-By: Claude Opus 5 (1M context) --- apps/api/plane/api/views/issue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api/plane/api/views/issue.py b/apps/api/plane/api/views/issue.py index 12ba27de77..ea5bbf2a15 100644 --- a/apps/api/plane/api/views/issue.py +++ b/apps/api/plane/api/views/issue.py @@ -1591,6 +1591,7 @@ class IssueCommentDetailAPIEndpoint(BaseAPIView): examples=[ISSUE_COMMENT_EXAMPLE], ), 400: INVALID_REQUEST_RESPONSE, + 403: FORBIDDEN_RESPONSE, 404: COMMENT_NOT_FOUND_RESPONSE, 409: EXTERNAL_ID_EXISTS_RESPONSE, }, @@ -1672,6 +1673,7 @@ class IssueCommentDetailAPIEndpoint(BaseAPIView): ], responses={ 204: OpenApiResponse(description="Work item comment deleted successfully"), + 403: FORBIDDEN_RESPONSE, 404: COMMENT_NOT_FOUND_RESPONSE, }, ) @@ -2014,6 +2016,7 @@ class IssueAttachmentListCreateAPIEndpoint(BaseAPIView): examples=[ISSUE_ATTACHMENT_EXAMPLE], ), 400: INVALID_REQUEST_RESPONSE, + 403: FORBIDDEN_RESPONSE, 404: ATTACHMENT_NOT_FOUND_RESPONSE, }, )