From c72ca72cdeba0cd1b11e0bab1ce2a1a320cff58a Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 22 Sep 2023 09:20:25 +0200 Subject: [PATCH] core: Fix OCM OpenAPI Signed-off-by: jld3103 --- core/Controller/OCMController.php | 2 +- core/openapi.json | 53 ++++++++++++++----------------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/core/Controller/OCMController.php b/core/Controller/OCMController.php index 8d08da1f8e49a..03a8c0d8e4f26 100644 --- a/core/Controller/OCMController.php +++ b/core/Controller/OCMController.php @@ -59,7 +59,7 @@ public function __construct( * @NoCSRFRequired * @psalm-suppress MoreSpecificReturnType * @psalm-suppress LessSpecificReturnStatement - * @return DataResponse|DataResponse + * @return DataResponse|DataResponse * * 200: OCM Provider details returned * 500: OCM not supported diff --git a/core/openapi.json b/core/openapi.json index 95fc7c2ff9f1e..74e67b28691aa 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -1336,38 +1336,33 @@ "type": "string" }, "resourceTypes": { - "type": "object", - "required": [ - null - ], - "properties": { - "": { - "type": "object", - "required": [ - "name", - "shareTypes", - "protocols" - ], - "properties": { - "name": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "shareTypes", + "protocols" + ], + "properties": { + "name": { + "type": "string" + }, + "shareTypes": { + "type": "array", + "items": { "type": "string" - }, - "shareTypes": { - "type": "array", - "items": { + } + }, + "protocols": { + "type": "object", + "required": [ + "webdav" + ], + "properties": { + "webdav": { "type": "string" } - }, - "protocols": { - "type": "object", - "required": [ - "webdav" - ], - "properties": { - "webdav": { - "type": "string" - } - } } } }