diff --git a/modules/swagger-codegen/src/main/resources/ruby/base_object.mustache b/modules/swagger-codegen/src/main/resources/ruby/base_object.mustache index 733537cb14e..ccf6db4a4fd 100644 --- a/modules/swagger-codegen/src/main/resources/ruby/base_object.mustache +++ b/modules/swagger-codegen/src/main/resources/ruby/base_object.mustache @@ -66,7 +66,7 @@ module {{moduleName}} if value.is_a?(Array) hash[param] = value.compact.map{ |v| _to_hash(v) } else - hash[param] = value + hash[param] = _to_hash(value) end end hash diff --git a/samples/client/petstore/ruby/lib/petstore/models/base_object.rb b/samples/client/petstore/ruby/lib/petstore/models/base_object.rb index d5cc842164a..4a9a781ae64 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/base_object.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/base_object.rb @@ -66,7 +66,7 @@ module Petstore if value.is_a?(Array) hash[param] = value.compact.map{ |v| _to_hash(v) } else - hash[param] = value + hash[param] = _to_hash(value) end end hash