Add missing validator cases for OpenAPI3

This commit is contained in:
Jake Barnby
2022-01-31 23:42:33 +13:00
parent 1ff0ecdee2
commit b2e93bfa40
@@ -325,9 +325,14 @@ class OpenAPI3 extends Format
$node['schema']['x-example'] = $validator->getMin();
break;
case 'Utopia\Validator\Numeric':
case 'Utopia\Validator\Integer':
$node['schema']['type'] = $validator->getType();
$node['schema']['format'] = 'int32';
break;
case 'Utopia\Validator\FloatValidator':
$node['schema']['type'] = 'number';
$node['schema']['format'] = 'float';
break;
case 'Utopia\Validator\Length':
$node['schema']['type'] = $validator->getType();
break;