1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

add to open api spec as well

This commit is contained in:
Damodar Lohani 2022-02-11 00:30:08 +00:00
parent ebe3dc0dbd
commit 31d596c43c

View file

@ -276,6 +276,9 @@ class OpenAPI3 extends Format
break;
case 'Utopia\Database\Validator\UID':
case 'Appwrite\Utopia\Database\Validator\CustomId':
if($route->getLabel('sdk.methodType', '') === 'upload') {
$node['schema']['x-upload-id'] = true;
}
$node['schema']['type'] = $validator->getType();
$node['schema']['x-example'] = '['.\strtoupper(Template::fromCamelCaseToSnake($node['name'])).']';
break;