diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2023-07-11 07:43:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 07:43:52 +0200 |
commit | 428153c8ba79ec34828f9cb2ba1d2a3d89a6d8a3 (patch) | |
tree | 1d151e4ae1fcdc7784b7cb5eb0fe8cebfa9f58c3 /apps | |
parent | de3b6a2219c933388c39f07faedc39cd76abd472 (diff) | |
parent | 9b822a5722bf8423d7a38d32f6e0f44f9f1d78f9 (diff) | |
download | nextcloud-server-428153c8ba79ec34828f9cb2ba1d2a3d89a6d8a3.tar.gz nextcloud-server-428153c8ba79ec34828f9cb2ba1d2a3d89a6d8a3.zip |
Merge pull request #39272 from nextcloud/feature/openapi/sharebymail
sharebymail: Add OpenAPI spec
Diffstat (limited to 'apps')
-rw-r--r-- | apps/sharebymail/lib/Capabilities.php | 21 | ||||
-rw-r--r-- | apps/sharebymail/openapi.json | 102 |
2 files changed, 123 insertions, 0 deletions
diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php index 39d7172bb76..8be0ca380cf 100644 --- a/apps/sharebymail/lib/Capabilities.php +++ b/apps/sharebymail/lib/Capabilities.php @@ -45,6 +45,27 @@ class Capabilities implements ICapability { $this->settingsManager = $settingsManager; } + /** + * @return array{ + * files_sharing: array{ + * sharebymail: array{ + * enabled: bool, + * send_password_by_mail: bool, + * upload_files_drop: array{ + * enabled: bool, + * }, + * password: array{ + * enabled: bool, + * enforced: bool, + * }, + * expire_date: array{ + * enabled: bool, + * enforced: bool, + * }, + * } + * } + * } + */ public function getCapabilities(): array { return [ 'files_sharing' => diff --git a/apps/sharebymail/openapi.json b/apps/sharebymail/openapi.json new file mode 100644 index 00000000000..3c98f9e43ac --- /dev/null +++ b/apps/sharebymail/openapi.json @@ -0,0 +1,102 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "sharebymail", + "version": "0.0.1", + "description": "Share provider which allows you to share files by mail", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { + "type": "object", + "required": [ + "sharebymail" + ], + "properties": { + "sharebymail": { + "type": "object", + "required": [ + "enabled", + "send_password_by_mail", + "upload_files_drop", + "password", + "expire_date" + ], + "properties": { + "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", + "enforced" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date": { + "type": "object", + "required": [ + "enabled", + "enforced" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "enforced": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + } + }, + "paths": {}, + "tags": [] +}
\ No newline at end of file |