-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Range for standard number types #298
Comments
I try to strike a balance simplicity/clarity with specificity - including I suppose that the smaller the range of possible values, the more valuable it would be to specify the actual min/max. Considering each type:
I'm curious what your use-case is for wanting these values, as that may help make a decision as to how schemars should behave |
You are right, it would definitely be much more relevant for the small types. I just thought, it might help guard against overflow errors - especially for people who choose their integers 'somewhat arbitrarily'. I must admit, I did not really care about the simplicity in human-readable schemas, but I get your point. |
Is there a reason, why no default minimum and maximum values are generated with schema_for! for rust built-in number types, like i8-i128, u8-u128, isize, usize, f32, f64?
The text was updated successfully, but these errors were encountered: