All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kotlin-spring.dataClass.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
/**
 * {{{description}}}
{{#vars}}
 * @param {{name}} {{{description}}}
{{/vars}}
 */{{#discriminator}}
{{>typeInfoAnnotation}}{{/discriminator}}
{{#additionalModelTypeAnnotations}}
    {{{.}}}
{{/additionalModelTypeAnnotations}}
{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}{{#hasVars}}data {{/hasVars}}class {{classname}}(
{{#requiredVars}}
{{>dataClassReqVar}}{{^-last}},
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}},
{{/-last}}{{/optionalVars}}
) {{/discriminator}}{{#parent}}: {{{.}}}{{/parent}}{
{{#discriminator}}
    {{#requiredVars}}
        {{>interfaceReqVar}}
    {{/requiredVars}}
    {{#optionalVars}}
        {{>interfaceOptVar}}
    {{/optionalVars}}
{{/discriminator}}
{{#hasEnums}}{{#vars}}{{#isEnum}}
    /**
    * {{{description}}}
    * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
    */
    enum class {{{nameInPascalCase}}}(val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) {
{{#allowableValues}}{{#enumVars}}
        @JsonProperty({{{value}}}) {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
    }
{{/isEnum}}{{/vars}}{{/hasEnums}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy