mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 06:30:52 +00:00
Fixes #242 - Ruby model syntax error
This commit is contained in:
parent
a13f46e781
commit
1ba42ef6cc
@ -20,7 +20,7 @@ class {{classname}}
|
|||||||
if self.class.attribute_map[:"{{{name}}}"]
|
if self.class.attribute_map[:"{{{name}}}"]
|
||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
if (value = attributes["{{{baseName}}}"]).is_a?(Array)
|
if (value = attributes["{{{baseName}}}"]).is_a?(Array)
|
||||||
@{{{name}}} = value{{#complexType}}.map{ |v| {{complexType}}.new(v) }{{/complexType}}
|
@{{{name}}} = value{{#complexType}}.map{ |v| {{complexType}}.new(v) }{{/complexType}}{{newline}}
|
||||||
end
|
end
|
||||||
{{/isContainer}}{{^isContainer}}
|
{{/isContainer}}{{^isContainer}}
|
||||||
@{{{name}}} = attributes["{{{baseName}}}"]
|
@{{{name}}} = attributes["{{{baseName}}}"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user