Skip to content

Commit 9cb7b1a

Browse files
fix: errors in error responses references
1 parent 1808543 commit 9cb7b1a

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

app/Http/Controllers/Apis/Protected/Main/OAuth2OrganizationsApiController.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ final class OAuth2OrganizationsApiController extends OAuth2ProtectedController
5353
description: 'Organization created successfully',
5454
content: new OA\JsonContent(ref: '#/components/schemas/Organization')
5555
),
56-
new OA\Response(response: 400, ref: '#/components/responses/400'),
57-
new OA\Response(response: 401, ref: '#/components/responses/401'),
58-
new OA\Response(response: 403, ref: '#/components/responses/403'),
59-
new OA\Response(response: 412, ref: '#/components/responses/412'),
60-
new OA\Response(response: 422, ref: '#/components/responses/422'),
61-
new OA\Response(response: 500, ref: '#/components/responses/500'),
56+
new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"),
57+
new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"),
58+
new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"),
59+
new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"),
60+
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
6261
]
6362
)]
6463

@@ -137,10 +136,9 @@ public function __construct
137136
description: 'Success - Returns paginated list of organizations',
138137
content: new OA\JsonContent(ref: '#/components/schemas/PaginatedOrganizationsResponse')
139138
),
140-
new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request - Invalid parameters"),
141-
new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized - Invalid or missing access token"),
142-
new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden - Insufficient permissions"),
143-
new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"),
139+
new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"),
140+
new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"),
141+
new OA\Response(response: Response::HTTP_NOT_FOUND, description: "Not Found"),
144142
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error")
145143
]
146144
)]

0 commit comments

Comments
 (0)