Skip to content

Commit

Permalink
feat: Add support for repeated fields (#1451)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaaym authored and JustinBeckwith committed Nov 19, 2018
1 parent 853e218 commit 8d900f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/generator/templates/api-endpoint.njk
Expand Up @@ -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 %}
}

Expand Down Expand Up @@ -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 %}

Expand Down
2 changes: 1 addition & 1 deletion src/generator/templates/resource-partial.njk
Expand Up @@ -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 %}

Expand Down

0 comments on commit 8d900f1

Please sign in to comment.