Skip to content

Commit

Permalink
fix(generation): Define optional fields in builders as nullable (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
osama-salman99 authored Dec 1, 2023
1 parent 02b8f21 commit 4a68bf8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo
) {
{{#allVars}}
{{#eliminateDiscriminators}}
fun {{{name}}}({{{name}}}: {{#isEnum}}{{^isArray}}{{^isInherited}}{{classname}}.{{{nameInCamelCase}}}{{/isInherited}}{{/isArray}}{{^isArray}}{{#isInherited}}{{{parent}}}.{{{nameInCamelCase}}}{{/isInherited}}{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}) = apply { this.{{{name}}} = {{{name}}} }
fun {{{name}}}({{{name}}}: {{#isEnum}}{{^isArray}}{{^isInherited}}{{classname}}.{{{nameInCamelCase}}}{{/isInherited}}{{/isArray}}{{^isArray}}{{#isInherited}}{{{parent}}}.{{{nameInCamelCase}}}{{/isInherited}}{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{/required}}) = apply { this.{{{name}}} = {{{name}}} }
{{/eliminateDiscriminators}}
{{/allVars}}

Expand Down

0 comments on commit 4a68bf8

Please sign in to comment.