Fix handling of +/-inf defaults in TS/rust/go/dart codegen (#7588)

+/-inf were not being handled, and so invalid typescript was being
generated when a float/double had an infinite default value. NaN was
being handled correctly.

Co-authored-by: Derek Bailey <derekbailey@google.com>
Co-authored-by: Casper <casperneo@uchicago.edu>
This commit is contained in:
James Kuszmaul
2022-11-08 10:59:46 -08:00
committed by GitHub
parent 001adf782d
commit 8aa8b9139e
41 changed files with 8217 additions and 4647 deletions

View File

@@ -340,6 +340,30 @@
},
"long_enum_normal_default" : {
"$ref" : "#/definitions/MyGame_Example_LongEnum"
},
"nan_default" : {
"type" : "number"
},
"inf_default" : {
"type" : "number"
},
"positive_inf_default" : {
"type" : "number"
},
"infinity_default" : {
"type" : "number"
},
"positive_infinity_default" : {
"type" : "number"
},
"negative_inf_default" : {
"type" : "number"
},
"negative_infinity_default" : {
"type" : "number"
},
"double_inf_default" : {
"type" : "number"
}
},
"required" : ["name"],