From f2656e4ff22ccaea92f7f4f122694ffde055345a Mon Sep 17 00:00:00 2001 From: Marcon Neves Date: Sun, 3 Nov 2024 09:41:14 -0300 Subject: [PATCH 1/2] Update schema of private keys by id response --- openapi.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index d2616e9c6..a56a7970e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3467,9 +3467,7 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/PrivateKey' + $ref: '#/components/schemas/PrivateKey' '401': $ref: '#/components/responses/401' '400': From 4a6df8b6f917aadfd3ae147bcf331857ab1202fd Mon Sep 17 00:00:00 2001 From: Marcon Neves Date: Sun, 3 Nov 2024 14:03:59 -0300 Subject: [PATCH 2/2] fix: update schema in code decorator --- app/Http/Controllers/Api/SecurityController.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/Api/SecurityController.php b/app/Http/Controllers/Api/SecurityController.php index bb474aed3..b7190ab1e 100644 --- a/app/Http/Controllers/Api/SecurityController.php +++ b/app/Http/Controllers/Api/SecurityController.php @@ -81,15 +81,8 @@ class SecurityController extends Controller new OA\Response( response: 200, description: 'Get all private keys.', - content: [ - new OA\MediaType( - mediaType: 'application/json', - schema: new OA\Schema( - type: 'array', - items: new OA\Items(ref: '#/components/schemas/PrivateKey') - ) - ), - ]), + content: new OA\JsonContent(ref: '#/components/schemas/PrivateKey') + ), new OA\Response( response: 401, ref: '#/components/responses/401',