mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-10 12:37:48 +00:00
fix: Schema.Minimum and Schema.Maxmium are now float64
This commit is contained in:
committed by
quobix
parent
06f6b243a8
commit
a09916eb67
@@ -213,7 +213,7 @@ func SetField(field *reflect.Value, valueNode *yaml.Node, keyNode *yaml.Node) er
|
||||
|
||||
case reflect.TypeOf(NodeReference[float32]{}):
|
||||
|
||||
if utils.IsNodeFloatValue(valueNode) {
|
||||
if utils.IsNodeNumberValue(valueNode) {
|
||||
if field.CanSet() {
|
||||
fv, _ := strconv.ParseFloat(valueNode.Value, 32)
|
||||
nr := NodeReference[float32]{
|
||||
@@ -227,7 +227,7 @@ func SetField(field *reflect.Value, valueNode *yaml.Node, keyNode *yaml.Node) er
|
||||
|
||||
case reflect.TypeOf(NodeReference[float64]{}):
|
||||
|
||||
if utils.IsNodeFloatValue(valueNode) {
|
||||
if utils.IsNodeNumberValue(valueNode) {
|
||||
if field.CanSet() {
|
||||
fv, _ := strconv.ParseFloat(valueNode.Value, 64)
|
||||
nr := NodeReference[float64]{
|
||||
|
||||
Reference in New Issue
Block a user