diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 863a7a9627..b52c385039 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -335,6 +335,12 @@ class OpenAPI3 extends Format 'type' => 'string', ]; break; + case 'Utopia\Database\Validator\Permissions': + $node['schema']['type'] = $validator->getType(); + $node['schema']['items'] = [ + 'type' => 'string', + ]; + break; case 'Appwrite\Auth\Validator\Password': $node['schema']['type'] = $validator->getType(); $node['schema']['format'] = 'password'; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 7a9822160a..ab45ae401c 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -323,6 +323,14 @@ class Swagger2 extends Format 'type' => 'string', ]; break; + case 'Utopia\Database\Validator\Permissions': + $node['type'] = $validator->getType(); + $node['collectionFormat'] = 'multi'; + $node['items'] = [ + 'type' => 'string', + ]; + $node['x-example'] = '["role:all"]'; + break; case 'Appwrite\Auth\Validator\Password': $node['type'] = $validator->getType(); $node['format'] = 'password';