mirror of
https://github.com/makeplane/plane.git
synced 2026-09-01 19:48:42 +02:00
[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) <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user