Note Number has larger absolute range than int64, but numbers outside MAX_SAFE_INTEGER and MIN_SAFE_INTEGER range are rounded. To avoid wierd behavior, I've set limits for int64 to these SAFE constraints.
I've added asserts to tests, but since numbers are random-generated, they are not really conclusive.. I've ran tests 100 times to make sure its likely correct.
Limit range of generated numbers for these integer subtypes.
They are well known by OpenAPI: https://swagger.io/docs/specification/data-models/data-types/#numbers
Note Number has larger absolute range than int64, but numbers outside MAX_SAFE_INTEGER and MIN_SAFE_INTEGER range are rounded. To avoid wierd behavior, I've set limits for int64 to these SAFE constraints.
I've added asserts to tests, but since numbers are random-generated, they are not really conclusive.. I've ran tests 100 times to make sure its likely correct.