From 1e755f047a8ecb609d5e6cc4bc63ed25bf0748cf Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Mon, 24 Jun 2024 10:40:31 +0100 Subject: [PATCH] fix: modify return type Signed-off-by: Cleopatra Enjeck M --- lib/Controller/ContextController.php | 2 +- openapi.json | 38 ++++++++++++++++++++++++++++ src/types/openapi/openapi.ts | 13 ++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/lib/Controller/ContextController.php b/lib/Controller/ContextController.php index 2ade14ac0..d01d71ca0 100644 --- a/lib/Controller/ContextController.php +++ b/lib/Controller/ContextController.php @@ -126,7 +126,7 @@ public function create(string $name, string $iconName, string $description = '', * @param ?string $description provide this parameter to set a new description * @param ?array{id: int, type: int, permissions: int, order: int} $nodes provide this parameter to set a new list of nodes. * - * @return DataResponse|DataResponse + * @return DataResponse|DataResponse * * 200: returning the full context information * 403: No permissions diff --git a/openapi.json b/openapi.json index 39b30c4c7..057118379 100644 --- a/openapi.json +++ b/openapi.json @@ -8728,6 +8728,44 @@ } } } + }, + "403": { + "description": "No permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } } } }, diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 1018a9aee..0bffdef10 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -3228,6 +3228,19 @@ export type operations = { }; }; }; + /** @description No permissions */ + 403: { + content: { + "application/json": { + ocs: { + meta: components["schemas"]["OCSMeta"]; + data: { + message: string; + }; + }; + }; + }; + }; /** @description Not found */ 404: { content: {