-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Integer validation issue #733
Comments
We currently create a fix.
|
Thanks for this high quality bug report! |
I think it is necessary to specify UseNumber() in the JSON decoder during JSON validation so that integer precision is not lost when setting the default value. However, encoding/json is not able to unmarshal exponential notation to integer types. |
PR #738
Fix only fix this issue.
Not fix yet. |
Since the numeric value is converted to float64 during JSON validation in body in function `openapi3filter.ValidateRequestBody’, the precision of integer value in updated request body is lost, and the range check is not performed correctly.
You can see this issue in the test code below.
The text was updated successfully, but these errors were encountered: