description added

This commit is contained in:
Elena Bobkova 2018-11-23 14:49:42 +03:00
parent fb8a1d4f7c
commit 5cbbcce2f6
2 changed files with 8 additions and 2 deletions

View File

@ -9,5 +9,5 @@
{%- elseif field.optional %}
@JsonInclude(JsonInclude.Include.NON_NULL)
{%- endif %}
{% if includeVal %}val {% endif %}{{ field.name }}: {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }}{{ utils.writeNullCheckMark(field.nullable, field.optional) }} {%- if (not (loop.last)) or (addCommaAtTheEnd)%}, {% endif %}
{% if includeVal %}val {% endif %}{{ field.name }}: {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }}{{ utils.writeNullCheckMark(field.nullable, field.optional) }} {%- if (not (loop.last)) or (addCommaAtTheEnd)%}, {% endif %} {{ utils.addDescription(field) }}
{%- endfor -%}

View File

@ -31,4 +31,10 @@ List<{{ self.formatValueType(valueType.itemsType, true, true) }}>
{% macro formatEnumValue(valuesTypes, value) %}
{%- if valuesTypes == "STRING" -%}"{{ value.value }}"{%- elseif valuesTypes == "INT" -%}{{ value.value }}{%- endif -%}
{% endmacro %}
{% endmacro %}
{% macro addDescription(field) %}
{%- if (field.description is not empty) -%}
// {{ field.description }}
{%- endif -%}
{% endmacro %}