Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid spec generated on OpenApi 3.1.0 with symfony constraints #2173

Open
DjordyKoert opened this issue Jan 3, 2024 · 0 comments
Open

Comments

@DjordyKoert
Copy link
Collaborator

I would have expected the underlying swagger-php to automatically transform the generated schema to the correct notation zircote/swagger-php#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
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant