Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sharebymail: Add OpenAPI spec #39272

Merged
merged 1 commit into from Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions apps/sharebymail/lib/Capabilities.php
Expand Up @@ -45,6 +45,27 @@ public function __construct(IManager $manager,
$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' =>
Expand Down
102 changes: 102 additions & 0 deletions 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": []
}