diff options
Diffstat (limited to 'apps/sharebymail')
-rw-r--r-- | apps/sharebymail/lib/Capabilities.php | 4 | ||||
-rw-r--r-- | apps/sharebymail/openapi.json | 101 |
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 } - ] + } } } }, |