aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-24 15:53:13 +0200
committerprovokateurin <kate@provokateurin.de>2024-11-05 09:58:11 +0100
commit77114fb3277742fc69ddcf2432311ecb263af97e (patch)
tree0f360660038c65acc5f9cd014f183e45b0c5355b /apps/sharebymail
parent1140e41db2ef6241f806eb605df48642a2a32c62 (diff)
downloadnextcloud-server-77114fb3277742fc69ddcf2432311ecb263af97e.tar.gz
nextcloud-server-77114fb3277742fc69ddcf2432311ecb263af97e.zip
fix(OpenAPI): Adjust array syntax to avoid ambiguitiesfix/openapi/array-syntax
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/sharebymail')
-rw-r--r--apps/sharebymail/lib/Capabilities.php4
-rw-r--r--apps/sharebymail/openapi.json101
2 files changed, 47 insertions, 58 deletions
diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php
index 5b489b7d790..67a0ec7a9de 100644
--- a/apps/sharebymail/lib/Capabilities.php
+++ b/apps/sharebymail/lib/Capabilities.php
@@ -24,7 +24,7 @@ class Capabilities implements ICapability {
/**
* @return array{
- * files_sharing: array{
+ * files_sharing?: array{
* sharebymail: array{
* enabled: bool,
* send_password_by_mail: bool,
@@ -41,7 +41,7 @@ class Capabilities implements ICapability {
* },
* }
* }
- * }|array<empty>
+ * }
*/
public function getCapabilities(): array {
if (!$this->appManager->isEnabledForUser('files_sharing')) {
diff --git a/apps/sharebymail/openapi.json b/apps/sharebymail/openapi.json
index 7bc231c0770..a64013b1924 100644
--- a/apps/sharebymail/openapi.json
+++ b/apps/sharebymail/openapi.json
@@ -21,87 +21,76 @@
},
"schemas": {
"Capabilities": {
- "oneOf": [
- {
+ "type": "object",
+ "properties": {
+ "files_sharing": {
"type": "object",
"required": [
- "files_sharing"
+ "sharebymail"
],
"properties": {
- "files_sharing": {
+ "sharebymail": {
"type": "object",
"required": [
- "sharebymail"
+ "enabled",
+ "send_password_by_mail",
+ "upload_files_drop",
+ "password",
+ "expire_date"
],
"properties": {
- "sharebymail": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "send_password_by_mail": {
+ "type": "boolean"
+ },
+ "upload_files_drop": {
+ "type": "object",
+ "required": [
+ "enabled"
+ ],
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ }
+ },
+ "password": {
"type": "object",
"required": [
"enabled",
- "send_password_by_mail",
- "upload_files_drop",
- "password",
- "expire_date"
+ "enforced"
],
"properties": {
"enabled": {
"type": "boolean"
},
- "send_password_by_mail": {
+ "enforced": {
+ "type": "boolean"
+ }
+ }
+ },
+ "expire_date": {
+ "type": "object",
+ "required": [
+ "enabled",
+ "enforced"
+ ],
+ "properties": {
+ "enabled": {
"type": "boolean"
},
- "upload_files_drop": {
- "type": "object",
- "required": [
- "enabled"
- ],
- "properties": {
- "enabled": {
- "type": "boolean"
- }
- }
- },
- "password": {
- "type": "object",
- "required": [
- "enabled",
- "enforced"
- ],
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "enforced": {
- "type": "boolean"
- }
- }
- },
- "expire_date": {
- "type": "object",
- "required": [
- "enabled",
- "enforced"
- ],
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "enforced": {
- "type": "boolean"
- }
- }
+ "enforced": {
+ "type": "boolean"
}
}
}
}
}
}
- },
- {
- "type": "array",
- "maxItems": 0
}
- ]
+ }
}
}
},