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 -%}