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

Added bool support in Swagger JSON

This commit is contained in:
Eldad Fux 2020-11-14 01:28:01 +02:00
parent e4db1ddd43
commit b2b6b5420d

View file

@ -345,7 +345,7 @@ class Swagger2 extends Format
break;
case 'boolean':
$type = 'string';
$type = 'boolean';
break;
default:
@ -379,7 +379,7 @@ class Swagger2 extends Format
$output['definitions'][$model->getType()]['properties'][$name] = [
'type' => $type,
'description' => $rule['description'] ?? '',
'default' => $rule['default'] ?? null,
//'default' => $rule['default'] ?? null,
'x-example' => $rule['example'] ?? null,
];