|
20 | 20 | use models\utils\IEntity; |
21 | 21 | use ModelSerializers\SerializerRegistry; |
22 | 22 | use OpenApi\Attributes as OA; |
| 23 | +use Symfony\Component\HttpFoundation\Response; |
23 | 24 |
|
24 | 25 | /** |
25 | 26 | * Class OAuth2PaymentGatewayProfileApiController |
@@ -125,12 +126,13 @@ public function __construct |
125 | 126 | description: 'Payment gateway profiles retrieved successfully', |
126 | 127 | content: new OA\JsonContent(ref: '#/components/schemas/PaginatedPaymentGatewayProfilesResponse') |
127 | 128 | ), |
128 | | - new OA\Response(response: 400, ref: '#/components/responses/400'), |
129 | | - new OA\Response(response: 401, ref: '#/components/responses/401'), |
130 | | - new OA\Response(response: 403, ref: '#/components/responses/403'), |
131 | | - new OA\Response(response: 404, ref: '#/components/responses/404'), |
132 | | - new OA\Response(response: 412, ref: '#/components/responses/412'), |
133 | | - new OA\Response(response: 500, ref: '#/components/responses/500'), |
| 129 | + |
| 130 | + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), |
| 131 | + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), |
| 132 | + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), |
| 133 | + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), |
| 134 | + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), |
| 135 | + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), |
134 | 136 | ] |
135 | 137 | )] |
136 | 138 |
|
@@ -162,12 +164,13 @@ public function __construct |
162 | 164 | description: 'Payment gateway profile retrieved successfully', |
163 | 165 | content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') |
164 | 166 | ), |
165 | | - new OA\Response(response: 400, ref: '#/components/responses/400'), |
166 | | - new OA\Response(response: 401, ref: '#/components/responses/401'), |
167 | | - new OA\Response(response: 403, ref: '#/components/responses/403'), |
168 | | - new OA\Response(response: 404, ref: '#/components/responses/404'), |
169 | | - new OA\Response(response: 412, ref: '#/components/responses/412'), |
170 | | - new OA\Response(response: 500, ref: '#/components/responses/500'), |
| 167 | + |
| 168 | + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), |
| 169 | + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), |
| 170 | + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), |
| 171 | + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), |
| 172 | + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), |
| 173 | + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), |
171 | 174 | ] |
172 | 175 | )] |
173 | 176 |
|
@@ -196,13 +199,12 @@ public function __construct |
196 | 199 | description: 'Payment gateway profile created successfully', |
197 | 200 | content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') |
198 | 201 | ), |
199 | | - new OA\Response(response: 400, ref: '#/components/responses/400'), |
200 | | - new OA\Response(response: 401, ref: '#/components/responses/401'), |
201 | | - new OA\Response(response: 403, ref: '#/components/responses/403'), |
202 | | - new OA\Response(response: 404, ref: '#/components/responses/404'), |
203 | | - new OA\Response(response: 412, ref: '#/components/responses/412'), |
204 | | - new OA\Response(response: 422, ref: '#/components/responses/422'), |
205 | | - new OA\Response(response: 500, ref: '#/components/responses/500'), |
| 202 | + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), |
| 203 | + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), |
| 204 | + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), |
| 205 | + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), |
| 206 | + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), |
| 207 | + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), |
206 | 208 | ] |
207 | 209 | )] |
208 | 210 |
|
@@ -238,13 +240,12 @@ public function __construct |
238 | 240 | description: 'Payment gateway profile updated successfully', |
239 | 241 | content: new OA\JsonContent(ref: '#/components/schemas/PaymentGatewayProfile') |
240 | 242 | ), |
241 | | - new OA\Response(response: 400, ref: '#/components/responses/400'), |
242 | | - new OA\Response(response: 401, ref: '#/components/responses/401'), |
243 | | - new OA\Response(response: 403, ref: '#/components/responses/403'), |
244 | | - new OA\Response(response: 404, ref: '#/components/responses/404'), |
245 | | - new OA\Response(response: 412, ref: '#/components/responses/412'), |
246 | | - new OA\Response(response: 422, ref: '#/components/responses/422'), |
247 | | - new OA\Response(response: 500, ref: '#/components/responses/500'), |
| 243 | + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), |
| 244 | + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), |
| 245 | + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), |
| 246 | + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), |
| 247 | + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), |
| 248 | + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), |
248 | 249 | ] |
249 | 250 | )] |
250 | 251 |
|
@@ -275,12 +276,12 @@ public function __construct |
275 | 276 | response: 204, |
276 | 277 | description: 'Payment gateway profile deleted successfully' |
277 | 278 | ), |
278 | | - new OA\Response(response: 400, ref: '#/components/responses/400'), |
279 | | - new OA\Response(response: 401, ref: '#/components/responses/401'), |
280 | | - new OA\Response(response: 403, ref: '#/components/responses/403'), |
281 | | - new OA\Response(response: 404, ref: '#/components/responses/404'), |
282 | | - new OA\Response(response: 412, ref: '#/components/responses/412'), |
283 | | - new OA\Response(response: 500, ref: '#/components/responses/500'), |
| 279 | + new OA\Response(response: Response::HTTP_BAD_REQUEST, description: "Bad Request"), |
| 280 | + new OA\Response(response: Response::HTTP_UNAUTHORIZED, description: "Unauthorized"), |
| 281 | + new OA\Response(response: Response::HTTP_FORBIDDEN, description: "Forbidden"), |
| 282 | + new OA\Response(response: Response::HTTP_NOT_FOUND, description: "not found"), |
| 283 | + new OA\Response(response: Response::HTTP_PRECONDITION_FAILED, description: "Validation Error"), |
| 284 | + new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"), |
284 | 285 | ] |
285 | 286 | )] |
286 | 287 |
|
|
0 commit comments