Skip to content

Commit 3c5d841

Browse files
Merge pull request #40575 from nextcloud/fix/openapi/core/ocm
core: Fix OCM OpenAPI
2 parents b6f13cb + c72ca72 commit 3c5d841

File tree

2 files changed

+25
-30
lines changed

2 files changed

+25
-30
lines changed

core/Controller/OCMController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(
5959
* @NoCSRFRequired
6060
* @psalm-suppress MoreSpecificReturnType
6161
* @psalm-suppress LessSpecificReturnStatement
62-
* @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{}>
62+
* @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{}>
6363
*
6464
* 200: OCM Provider details returned
6565
* 500: OCM not supported

core/openapi.json

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,38 +1336,33 @@
13361336
"type": "string"
13371337
},
13381338
"resourceTypes": {
1339-
"type": "object",
1340-
"required": [
1341-
null
1342-
],
1343-
"properties": {
1344-
"": {
1345-
"type": "object",
1346-
"required": [
1347-
"name",
1348-
"shareTypes",
1349-
"protocols"
1350-
],
1351-
"properties": {
1352-
"name": {
1339+
"type": "array",
1340+
"items": {
1341+
"type": "object",
1342+
"required": [
1343+
"name",
1344+
"shareTypes",
1345+
"protocols"
1346+
],
1347+
"properties": {
1348+
"name": {
1349+
"type": "string"
1350+
},
1351+
"shareTypes": {
1352+
"type": "array",
1353+
"items": {
13531354
"type": "string"
1354-
},
1355-
"shareTypes": {
1356-
"type": "array",
1357-
"items": {
1355+
}
1356+
},
1357+
"protocols": {
1358+
"type": "object",
1359+
"required": [
1360+
"webdav"
1361+
],
1362+
"properties": {
1363+
"webdav": {
13581364
"type": "string"
13591365
}
1360-
},
1361-
"protocols": {
1362-
"type": "object",
1363-
"required": [
1364-
"webdav"
1365-
],
1366-
"properties": {
1367-
"webdav": {
1368-
"type": "string"
1369-
}
1370-
}
13711366
}
13721367
}
13731368
}

0 commit comments

Comments
 (0)