forked from loafle/openapi-generator-original
* [kotlin] Add model enum support Model variables marked isEnum=true are nested class enums. Top-level enums will not be isEnum=true, but rather have a datatype specific to the enum's type. * [kotlin] Regenerate client sample
9 lines
375 B
Plaintext
9 lines
375 B
Plaintext
/**
|
|
* {{{description}}}
|
|
* Values: {{#allowableValues}}{{#enumVars}}{{name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
|
|
*/
|
|
enum class {{classname}}(val value: {{dataType}}){
|
|
{{#allowableValues}}{{#enumVars}}
|
|
{{name}}({{#isString}}"{{/isString}}{{{value}}}{{#isString}}"{{/isString}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
|
{{/enumVars}}{{/allowableValues}}
|
|
) |