fix: specs

This commit is contained in:
Chirag Aggarwal
2025-09-04 22:45:46 +05:30
parent d2b681e95c
commit a47d581eea
8 changed files with 18 additions and 18 deletions
@@ -433,7 +433,7 @@ class OpenAPI3 extends Format
case 'Utopia\Validator\Assoc':
$param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default'];
$node['schema']['type'] = 'object';
$node['schema']['x-example'] = $param['example'] ?? '{}';
$node['schema']['x-example'] = ($param['example'] ?? '') ?: '{}';
break;
case 'Utopia\Storage\Validator\File':
$consumes = ['multipart/form-data'];
@@ -467,7 +467,7 @@ class Swagger2 extends Format
case 'Utopia\Validator\Assoc':
$node['type'] = 'object';
$node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default'];
$node['schema']['x-example'] = $param['example'] ?? '{}';
$node['x-example'] = ($param['example'] ?? '') ?: '{}';
break;
case 'Utopia\Storage\Validator\File':
$consumes = ['multipart/form-data'];