aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2023-09-23 13:28:24 +0200
committerGitHub <noreply@github.com>2023-09-23 13:28:24 +0200
commit3c5d8410fa3d3f4ded01eed8c5cf1718532c174e (patch)
tree0daa5780c76e6b7624d7514c4108e8ff8c986fd4
parentb6f13cb2d9a64d9696c090cc10e8cdf5cbc99974 (diff)
parentc72ca72cdeba0cd1b11e0bab1ce2a1a320cff58a (diff)
downloadnextcloud-server-3c5d8410fa3d3f4ded01eed8c5cf1718532c174e.tar.gz
nextcloud-server-3c5d8410fa3d3f4ded01eed8c5cf1718532c174e.zip
Merge pull request #40575 from nextcloud/fix/openapi/core/ocm
core: Fix OCM OpenAPI
-rw-r--r--core/Controller/OCMController.php2
-rw-r--r--core/openapi.json53
2 files changed, 25 insertions, 30 deletions
diff --git a/core/Controller/OCMController.php b/core/Controller/OCMController.php
index 8d08da1f8e4..03a8c0d8e4f 100644
--- a/core/Controller/OCMController.php
+++ b/core/Controller/OCMController.php
@@ -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
diff --git a/core/openapi.json b/core/openapi.json
index 95fc7c2ff9f..74e67b28691 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"
- }
- }
}
}
}