From d389a1e124e1163f76e619ed7d58db7fae0ff487 Mon Sep 17 00:00:00 2001 From: Elena Bobkova Date: Mon, 18 Mar 2019 16:13:21 +0300 Subject: [PATCH] enum description added for kotlin server templates --- KotlinServer/Enum.kt.twig | 2 +- KotlinServer/blocks/enum/cases.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KotlinServer/Enum.kt.twig b/KotlinServer/Enum.kt.twig index a493274..a70ead4 100644 --- a/KotlinServer/Enum.kt.twig +++ b/KotlinServer/Enum.kt.twig @@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonValue /** * {{ description }} */ -enum class {{ name }}(val code: {{ utils.formatEnumValueType(valuesTypes) }}) { +enum class {{ name }}(val code: {{ utils.formatEnumValueType(valuesTypes) }}, val description: String) { {%- include 'blocks/enum/cases.twig' with { valuesTypes: valuesTypes, values: values } %} diff --git a/KotlinServer/blocks/enum/cases.twig b/KotlinServer/blocks/enum/cases.twig index 19b2f39..613f94d 100644 --- a/KotlinServer/blocks/enum/cases.twig +++ b/KotlinServer/blocks/enum/cases.twig @@ -6,5 +6,5 @@ * {{ value.description }} */ {%- endif %} - {{ value.nameUpperCaseWithUnderscope }}({{ utils.formatEnumValue(valuesTypes, value) }}){%- if not (loop.last) %},{% else %};{% endif %} + {{ value.nameUpperCaseWithUnderscope }}({{ utils.formatEnumValue(valuesTypes, value) }}, "{{ value.description }}"){%- if not (loop.last) %},{% else %};{% endif %} {%- endfor -%}