-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
fix: make number default type instead of double for float in java #1602
Conversation
✅ Deploy Preview for modelina canceled.
|
@dlkj, do you agree with this change? I've received this feedback from our Java users. |
Pull Request Test Coverage Report for Build 6849276668
💛 - Coveralls |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
My main concern would be verifying that I'm happy with the current functionality. https://datatracker.ietf.org/doc/html/rfc7159#section-6 acknowledges that implementation are likely to represent numbers as an IEEE double precision floating point number. In Java that is |
We mandated that our uses specify a |
@dlkj, good points. I made Redocly/openapi-sampler#154 instead. Our biggest issue right now is that generated samples from openapi-sampler generate integers instead of floats. After reading both the OpenAPI and AsyncAPI specs, number should default to a float value. |
Description
Number
the default type instead ofDouble
for the Float constrainer in Java. If the format is not specified when the type isnumber
, it should allow for both float and double formats.I believe this is a fix because this is technically a bug in Modelina today.
Related issue(s)