Skip to content

Commit

Permalink
Merge pull request #1438 from Adyen/adjust-mustache-templates
Browse files Browse the repository at this point in the history
adjust mustache templates
  • Loading branch information
gcatanese authored Dec 23, 2024
2 parents 0c29636 + 0ef8af6 commit 38696c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/typescript/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
*/
{{/deprecated}}
{{/description}}
{{#isModel}}
'{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}} | null{{/required}};
{{/isModel}}
{{^isModel}}
'{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}};
{{/isModel}}
{{/vars}}

{{#discriminator}}
Expand All @@ -47,7 +52,12 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
{
"name": "{{name}}",
"baseName": "{{baseName}}",
{{#isModel}}
"type": "{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}} | null{{/required}}"
{{/isModel}}
{{^isModel}}
"type": "{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}}"
{{/isModel}}
}{{^-last}},
{{/-last}}
{{/vars}}
Expand Down

0 comments on commit 38696c1

Please sign in to comment.