1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

Fixed object default value

This commit is contained in:
Eldad Fux 2021-01-06 14:49:11 +02:00
parent eb0ed4f218
commit dfe12b2be0
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@ namespace Appwrite\Specification\Format;
use Appwrite\Specification\Format;
use Appwrite\Template\Template;
use stdClass;
class OpenAPI3 extends Format
{
@ -212,7 +213,7 @@ class OpenAPI3 extends Format
case 'Utopia\Validator\JSON':
case 'Utopia\Validator\Mock':
case 'Utopia\Validator\Assoc':
$node['schema']['type'] = 'object';
$param['default'] = (empty($param['default'])) ? new stdClass() : $param['default'];
$node['schema']['type'] = 'object';
$node['schema']['x-example'] = '{}';
//$node['schema']['format'] = 'json';

View file

@ -4,6 +4,7 @@ namespace Appwrite\Specification\Format;
use Appwrite\Specification\Format;
use Appwrite\Template\Template;
use stdClass;
class Swagger2 extends Format
{
@ -205,7 +206,7 @@ class Swagger2 extends Format
case 'Utopia\Validator\Mock':
case 'Utopia\Validator\Assoc':
$node['type'] = 'object';
$node['type'] = 'object';
$param['default'] = (empty($param['default'])) ? new stdClass() : $param['default'];
$node['x-example'] = '{}';
//$node['format'] = 'json';
break;