templates.kotlin-micronaut.common.model.field_annotations.mustache Maven / Gradle / Ivy
{{#deprecated}}
@Deprecated("{{#vendorExtensions.x-deprecated-message}}{{{.}}}{{/vendorExtensions.x-deprecated-message}}")
{{/deprecated}}
{{>common/params/validation_field}}
{{#withXml}}
{{#isXmlAttribute}}
@{{{vendorExtensions.fieldAnnPrefix}}}XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"
{{/isXmlAttribute}}
{{^isXmlAttribute}}
{{^isContainer}}
@{{{vendorExtensions.fieldAnnPrefix}}}XmlElement({{#xmlNamespace}}namespace = "{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isContainer}}
{{#isContainer}}
// Is a container wrapped = {{isXmlWrapped}}
{{#items}}
// items.name = {{name}} items.baseName = {{baseName}} items.xmlName = {{xmlName}} items.xmlNamespace = {{xmlNamespace}}
// items.example = {{example}} items.type = {{dataType}}
@{{{vendorExtensions.fieldAnnPrefix}}}XmlElement({{#xmlNamespace}}namespace = "{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/items}}
{{#isXmlWrapped}}
@{{{vendorExtensions.fieldAnnPrefix}}}XmlElementWrapper({{#xmlNamespace}}namespace = "{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isXmlWrapped}}
{{/isContainer}}
{{/isXmlAttribute}}
{{/withXml}}
{{#generateSwagger2Annotations}}
@{{{vendorExtensions.fieldAnnPrefix}}}Schema(name = "{{{baseName}}}"{{#isReadOnly}}, accessMode = Schema.AccessMode.READ_ONLY{{/isReadOnly}}{{#example}}, example = "{{{.}}}"{{/example}}{{#description}}, description = "{{{.}}}"{{/description}}, requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}{{#deprecated}}, deprecated = true{{/deprecated}})
{{/generateSwagger2Annotations}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{!Unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}}
@{{{vendorExtensions.fieldAnnPrefix}}}JsonIgnore
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{^vendorExtensions.x-is-jackson-optional-nullable}}
{{#jackson}}
{{>common/model/jackson_annotations}}
{{/jackson}}
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#vendorExtensions.x-setter-extra-annotation}}
{{{.}}}
{{/vendorExtensions.x-setter-extra-annotation}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy