Skip to content

Commit dcec2e7

Browse files
committed
Forgot to use _to_hash for non-array value
1 parent 940e76f commit dcec2e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/ruby/base_object.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module {{moduleName}}
6666
if value.is_a?(Array)
6767
hash[param] = value.compact.map{ |v| _to_hash(v) }
6868
else
69-
hash[param] = value
69+
hash[param] = _to_hash(value)
7070
end
7171
end
7272
hash

samples/client/petstore/ruby/lib/petstore/models/base_object.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def to_hash
6666
if value.is_a?(Array)
6767
hash[param] = value.compact.map{ |v| _to_hash(v) }
6868
else
69-
hash[param] = value
69+
hash[param] = _to_hash(value)
7070
end
7171
end
7272
hash

0 commit comments

Comments
 (0)