-
Notifications
You must be signed in to change notification settings - Fork 6k
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
#9808 - Dart double cast #9809
#9808 - Dart double cast #9809
Conversation
Have added a check for null before parsing |
Hey just wondering the likelihood of this PR being merged, or if there's anything further I can do to get it merged? |
@MichaelMarner I saw The Travis CI build failed, have you try to solve it? |
@skordesign sync'd with master, which made Travis pass. Thanks |
Any update? Still open? |
Why no one accept the PR? |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for changes related to OpenAPI spec 3.0. Default:master
.Description of the PR
This PR resolves #9808 by explicitly casting double properties from JSON payloads before assignment. This works around dart's JsonCodec parsing numbers that look like ints to
int
, which cannot then be assigned directly to adouble
.This PR takes advantage of the fact all Dart's number types have a
toDouble
method. As long as the JSON payload contains a number, callingtoDouble
is safe.@ircecho