From 39a9a1e73d3d758390cc92b701d996fcf5db8980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maria=CC=81n=20Gemmel?= <> Date: Fri, 21 Nov 2025 13:11:45 +0100 Subject: [PATCH] Replace ErrorForbidden with ErrorUnauthorized --- src/Handlers/OpenApiHandler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Handlers/OpenApiHandler.php b/src/Handlers/OpenApiHandler.php index 7f372c4..bd81d4e 100644 --- a/src/Handlers/OpenApiHandler.php +++ b/src/Handlers/OpenApiHandler.php @@ -177,7 +177,7 @@ public function handle(array $params): ResponseInterface ], 'required' => ['status', 'message'], ], - 'ErrorForbidden' => [ + 'ErrorUnauthorized' => [ 'type' => 'object', 'properties' => [ 'status' => [ @@ -278,12 +278,12 @@ private function getPaths(array $versionApis, string $baseUrl, string $basePath) $authorization = $api->getAuthorization(); if (!$authorization instanceof NoAuthorization) { - $responses[IResponse::S403_FORBIDDEN] = [ + $responses[IResponse::S401_Unauthorized] = [ 'description' => 'Operation forbidden', 'content' => [ 'application/json; charset=utf-8' => [ 'schema' => [ - '$ref' => '#/components/schemas/ErrorForbidden', + '$ref' => '#/components/schemas/ErrorUnauthorized', ], ], ],