forked from loafle/openapi-generator-original
ruby: Fix boolean convertion on json to model attribute.
Current code will converts boolean true of json to false because ruby's boolean is not matched with any regex.
This commit is contained in:
parent
3ba4cd1409
commit
a442e1a60d
@ -31,7 +31,7 @@
|
||||
when :Float
|
||||
value.to_f
|
||||
when :BOOLEAN
|
||||
if value =~ /^(true|t|yes|y|1)$/i
|
||||
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
||||
true
|
||||
else
|
||||
false
|
||||
|
Loading…
x
Reference in New Issue
Block a user