]> source.dussan.org Git - nextcloud-server.git/commitdiff
core: Fix OCM OpenAPI 40575/head
authorjld3103 <jld3103yt@gmail.com>
Fri, 22 Sep 2023 07:20:25 +0000 (09:20 +0200)
committerjld3103 <jld3103yt@gmail.com>
Sat, 23 Sep 2023 11:00:58 +0000 (13:00 +0200)
Signed-off-by: jld3103 <jld3103yt@gmail.com>
core/Controller/OCMController.php
core/openapi.json

index 8d08da1f8e49ae01eebc8660b25b11fa030670ee..03a8c0d8e4f2657669c53ef8707a5544cea5394e 100644 (file)
@@ -59,7 +59,7 @@ class OCMController extends Controller {
         * @NoCSRFRequired
         * @psalm-suppress MoreSpecificReturnType
         * @psalm-suppress LessSpecificReturnStatement
-        * @return DataResponse<Http::STATUS_OK, array{enabled: bool, apiVersion: string, endPoint: string, resourceTypes: array{array{name: string, shareTypes: string[], protocols: array{webdav: string}}}}, array{X-NEXTCLOUD-OCM-PROVIDERS: true, Content-Type: 'application/json'}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
+        * @return DataResponse<Http::STATUS_OK, array{enabled: bool, apiVersion: string, endPoint: string, resourceTypes: array{name: string, shareTypes: string[], protocols: array{webdav: string}}[]}, array{X-NEXTCLOUD-OCM-PROVIDERS: true, Content-Type: 'application/json'}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
         *
         * 200: OCM Provider details returned
         * 500: OCM not supported
index 95fc7c2ff9f1ec39e9203f589cd5509e960e01b1..74e67b28691aa858e0324cd743327de1fcdfd3c8 100644 (file)
                                             "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"
-                                                                }
-                                                            }
                                                         }
                                                     }
                                                 }