Skip to content

Commit

Permalink
Merge pull request #8245 from stianlik/additionalPropertiesModelFix
Browse files Browse the repository at this point in the history
Fix getter methods for Java model with additionalProperties
  • Loading branch information
HugoMario authored Jun 9, 2018
2 parents e8f6df9 + 13c34c1 commit a6f9e98
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/swagger-codegen/src/main/resources/Java/pojo.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela
{{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}}
public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() {
{{#parent}}
return {{name}} == null ? ({{{datatypeWithEnum}}}) this.get("{{name}}") : {{name}};
{{/parent}}
{{^parent}}
return {{name}};
{{/parent}}
}
{{^isReadOnly}}

Expand Down

0 comments on commit a6f9e98

Please sign in to comment.