diff --git a/src/generator/templates/api-endpoint.njk b/src/generator/templates/api-endpoint.njk index 19d7ea0d0c1..27669ae7845 100644 --- a/src/generator/templates/api-endpoint.njk +++ b/src/generator/templates/api-endpoint.njk @@ -45,7 +45,7 @@ interface StandardParameters { /** * {{ p.description|oneLine|cleanComments|safe }} */ - {{ pname|cleanPropertyName|safe }}?: {{ p.type }}; + {{ pname|cleanPropertyName|safe }}?: {{ p.type }}{% if p.repeated %}[]{% endif %}; {% endfor %} } @@ -142,7 +142,7 @@ export interface Schema${{ schema.id }} { /** * {{ p.description|oneLine|cleanComments|safe }} */ - {{ pname|getSafeParamName }}?: {{ p.type }}; + {{ pname|getSafeParamName }}?: {{ p.type }}{% if p.repeated %}[]{% endif %}; {% endfor %} {% endif %} diff --git a/src/generator/templates/resource-partial.njk b/src/generator/templates/resource-partial.njk index 0bb385eb36d..11f4345454b 100644 --- a/src/generator/templates/resource-partial.njk +++ b/src/generator/templates/resource-partial.njk @@ -47,7 +47,7 @@ /** * {{ p.description|oneLine|cleanComments|safe }} */ - {{ pname|cleanPropertyName|safe }}?: {{ p|getType }}; + {{ pname|cleanPropertyName|safe }}?: {{ p|getType }}{% if p.repeated %}[]{% endif %}; {% endfor %} {% endif %}