Skip to content

Commit

Permalink
Merge pull request #40575 from nextcloud/fix/openapi/core/ocm
Browse files Browse the repository at this point in the history
core: Fix OCM OpenAPI
  • Loading branch information
provokateurin authored Sep 23, 2023
2 parents b6f13cb + c72ca72 commit 3c5d841
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 30 deletions.
2 changes: 1 addition & 1 deletion core/Controller/OCMController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
* @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
Expand Down
53 changes: 24 additions & 29 deletions core/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
}
Expand Down

0 comments on commit 3c5d841

Please sign in to comment.