diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index 5429211e86..cd9a0b28a4 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -275,6 +275,9 @@ class OpenAPI3 extends Format $node['schema']['x-example'] = false; break; case 'Utopia\Database\Validator\UID': + $node['schema']['type'] = $validator->getType(); + $node['schema']['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']'; + break; case 'Appwrite\Utopia\Database\Validator\CustomId': if($route->getLabel('sdk.methodType', '') === 'upload') { $node['schema']['x-upload-id'] = true; diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index a2a09e14e8..e24030ea7e 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -262,7 +262,6 @@ class Swagger2 extends Format $node['type'] = $validator->getType(); $node['x-example'] = false; break; - case 'Utopia\Database\Validator\UID': case 'Appwrite\Utopia\Database\Validator\CustomId': if($route->getLabel('sdk.methodType', '') === 'upload') { $node['x-upload-id'] = true; @@ -270,6 +269,10 @@ class Swagger2 extends Format $node['type'] = $validator->getType(); $node['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']'; break; + case 'Utopia\Database\Validator\UID': + $node['type'] = $validator->getType(); + $node['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']'; + break; case 'Appwrite\Network\Validator\Email': $node['type'] = $validator->getType(); $node['format'] = 'email';