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

[BUG] php-symfony generator bug, integer->maximum property #3209

Closed
reznikartem opened this issue Jun 24, 2019 · 2 comments · Fixed by #3971
Closed

[BUG] php-symfony generator bug, integer->maximum property #3209

reznikartem opened this issue Jun 24, 2019 · 2 comments · Fixed by #3971

Comments

@reznikartem
Copy link
Contributor

Bug Report Checklist

  • [+] Have you provided a full/minimal spec to reproduce the issue?
  • [+] Have you validated the input using an OpenAPI validator (example)?
  • [4.0.0-beta3] What's the version of OpenAPI Generator used?
  • [+] Have you search for related issues/PRs?

Hello. You have a bug in openapi-generator/modules/openapi-generator/src/main/resources/php-symfony/api_input_validation.mustache

In line 68 - 75 you have this code:

{{#maximum}} {{#exclusiveMaximum}} $asserts[] = new Assert\LessThan({{minimum}}); {{/exclusiveMaximum}} {{^exclusiveMaximum}} $asserts[] = new Assert\LessThanOrEqual({{minimum}}); {{/exclusiveMaximum}} {{/maximum}}

Variable minimum used here instead of maximum

@reznikartem reznikartem changed the title [BUG] php-symfony generator bug [BUG] php-symfony generator bug, integer->maximum property Jun 24, 2019
@wing328
Copy link
Member

wing328 commented Jun 25, 2019

@reznikartem thanks for reporting the issue. I wonder if you can file a PR so that we can review the suggested fix more easily.

Let us know if you need help with the PR.

@reznikartem
Copy link
Contributor Author

Made pull request #3971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants