-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add "format" field for uint32 and uint64 #215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
I'm wondering about the shorter words though. Do they behave differently in purescript / js? Should we?
To my knowledge, the Swagger 2 spec only provides On the plus side it might allow us to use PureScript’s |
I'm beginning to think we should perhaps have just looked at the |
Apparently the format is necessary because the wire type may not actually be a number. |
More specifically, the min and max is not enough information to determine if it’s an integer that’s a numeric type, or an integer that’s actually a string. |
Using |
I can't see any downsides in what you're providing, nor any obvious improvements, so, merge! But feel free to open another PR if you can think of anything else. Thanks again! |
We noticed that for int32 and int64 fields we were able to check the
format
field and decode an int64 value to aBigInt
in PureScript (ultimately JavaScript) but for uint32 and uint64 that field wasn't present.This pull request adds that field along with a test to verify that it works as expected.