Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for repeated fields #1451

Merged
merged 1 commit into from Nov 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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