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

Wrong types of exclusiveMinimum & exclusiveMaximum fields in Schema class #149

Merged

Conversation

Lavertis
Copy link
Contributor

@Lavertis Lavertis commented Apr 16, 2024

This fixes #150
In Schema class exclusiveMinimum and exclusiveMaximum fields should be of type float instead of bool.
If you try to use the Pydantic Field() with the 'gt' or 'lt' constraint, the app crashes.

Checklist:

  • Run pytest tests and no failed.
  • Run flake8 flask_openapi3 tests examples and no failed.
  • Run mypy flask_openapi3 and no failed.
  • Run mkdocs serve and no failed.

@luolingchun
Copy link
Owner

Thanks! Please add a unit test file.

@Lavertis Lavertis force-pushed the fix/exclusive-min-max-constraints branch from 9b35021 to aa12336 Compare April 19, 2024 20:40
@Lavertis
Copy link
Contributor Author

Unit test added

@luolingchun luolingchun merged commit f048fb0 into luolingchun:master Apr 21, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

Error when using 'gt' or 'lt' constraints in Pydantic Field()
2 participants