diff --git a/pom.xml b/pom.xml index 6656dbd..aebe1b7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ TIKotlin-swagger-codegen jar TIKotlin-swagger-codegen - 1.0.0 + 1.0.1 diff --git a/src/main/resources/handlebars/TIKotlinCodegen/enum_class.mustache b/src/main/resources/handlebars/TIKotlinCodegen/enum_class.mustache new file mode 100644 index 0000000..02bf80f --- /dev/null +++ b/src/main/resources/handlebars/TIKotlinCodegen/enum_class.mustache @@ -0,0 +1,9 @@ +/** + * {{{description}}} + * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^@last}},{{/@last}}{{/enumVars}}{{/allowableValues}} + */ +enum class {{classname}}(val value: {{dataType}}{{#isNullable}}?{{/isNullable}}){ +{{#allowableValues}}{{#enumVars}} + {{&name}}({{#value}}{{{value}}}{{/value}}{{^value}}null{{/value}}){{^@last}},{{/@last}}{{#@last}};{{/@last}}// :/ +{{/enumVars}}{{/allowableValues}} +} \ No newline at end of file