NelmioApiDocBundle
NelmioApiDocBundle copied to clipboard
Invalid spec generated on OpenApi 3.1.0 with symfony constraints
I would have expected the underlying swagger-php to automatically transform the generated schema to the correct notation https://github.com/zircote/swagger-php/pull/1503. This does not seem to be the case when Symfony constraints are used.
For example when using #[Assert\GreaterThan(0)]
on a model property with nelmio config:
'documentation' => [
'openapi' => '3.1.0',
],
An incorrect spec will be generated:
"exampleProperty": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true
},