server templates order fixed

This commit is contained in:
Elena Bobkova 2018-11-28 17:36:15 +03:00
parent 5d7517ef1f
commit 06c2d329c6
2 changed files with 2 additions and 3 deletions

View File

@ -16,6 +16,5 @@ import java.time.ZonedDateTime
*/
{%- endif %}
open class {% include 'blocks/class/classtype.twig' with { type: type } %} (
{%- include 'blocks/class/constructor-fields-info.twig' with { fields: superclassesFields, includeVal: false, addCommaAtTheEnd: (fields is not empty) } %}
{%- include 'blocks/class/constructor-fields-info.twig' with { fields: fields, includeVal: true, addComma: false } %}
{%- include 'blocks/class/constructor-fields-info.twig' with { fields: allFieldsOrdered, superclassesFields: superclassesFields } %}
){% include 'blocks/class/supertype.twig' with { type: type, parent: parent } %} {%- include 'blocks/class/fields-super-initialization.twig' with { fields: superclassesFields } -%}

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 %} {{ utils.addDescription(field) }}
{% if not (field in superclassesFields) %}val {% endif %}{{ field.name }}: {{ utils.formatValueType(field.type.type, field.nullable, field.optional) }}{{ utils.writeNullCheckMark(field.nullable, field.optional) }} {%- if not (loop.last) %}, {% endif %} {{ utils.addDescription(field) }}
{%- endfor -%}