mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: keep it as a json string
This commit is contained in:
@@ -433,10 +433,7 @@ class OpenAPI3 extends Format
|
||||
case 'Utopia\Validator\Assoc':
|
||||
$param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default'];
|
||||
$node['schema']['type'] = 'object';
|
||||
|
||||
$example = $param['example'] ?? '{}';
|
||||
$decodedExample = json_decode($example, true);
|
||||
$node['schema']['x-example'] = json_last_error() === JSON_ERROR_NONE ? $decodedExample : $example;
|
||||
$node['schema']['x-example'] = $param['example'] ?? '{}';
|
||||
break;
|
||||
case 'Utopia\Storage\Validator\File':
|
||||
$consumes = ['multipart/form-data'];
|
||||
|
||||
@@ -467,10 +467,7 @@ class Swagger2 extends Format
|
||||
case 'Utopia\Validator\Assoc':
|
||||
$node['type'] = 'object';
|
||||
$node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default'];
|
||||
|
||||
$example = $param['example'] ?? '{}';
|
||||
$decodedExample = json_decode($example, true);
|
||||
$node['schema']['x-example'] = json_last_error() === JSON_ERROR_NONE ? $decodedExample : $example;
|
||||
$node['schema']['x-example'] = $param['example'] ?? '{}';
|
||||
break;
|
||||
case 'Utopia\Storage\Validator\File':
|
||||
$consumes = ['multipart/form-data'];
|
||||
|
||||
Reference in New Issue
Block a user