From 921199bba7fd71b1a5acc60d69e8f2113dd60cb6 Mon Sep 17 00:00:00 2001 From: Julien Herr Date: Mon, 2 Jan 2023 16:32:57 +0100 Subject: [PATCH] [kotlin-spring] Move Jackson annotation from field to getter (#10825) * Move Jackson annotation from field to getter In some case, Jackson will duplicate entries when the annotation is on field See https://github.com/FasterXML/jackson-databind/issues/1609 * Update samples --- .../kotlin-spring/dataClassOptVar.mustache | 2 +- .../kotlin-spring/dataClassReqVar.mustache | 2 +- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- .../kotlin/org/openapitools/model/Category.kt | 4 ++-- .../org/openapitools/model/ModelApiResponse.kt | 6 +++--- .../main/kotlin/org/openapitools/model/Order.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Pet.kt | 12 ++++++------ .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- 44 files changed, 191 insertions(+), 191 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache index 1e5a00489a..211736d791 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -2,4 +2,4 @@ @Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} @ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#deprecated}} @Deprecated(message = ""){{/deprecated}} - @field:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + @get:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache index 95e6de71f0..400e065760 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}} @Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}} @ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeDoubleQuote}}{{{.}}}{{/lambdaEscapeDoubleQuote}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}} - @field:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file + @get:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInCamelCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}?{{/isReadOnly}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Category.kt index 3819c9bc2d..64541c666d 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Category.kt @@ -21,11 +21,11 @@ import io.swagger.v3.oas.annotations.media.Schema data class Category( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Schema(example = "null", description = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index b8a5657e99..6af39346cf 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -22,13 +22,13 @@ import io.swagger.v3.oas.annotations.media.Schema data class ModelApiResponse( @Schema(example = "null", description = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @get:JsonProperty("code") val code: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @get:JsonProperty("type") val type: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @get:JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt index 4494ffa95b..128eee7f62 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Order.kt @@ -26,22 +26,22 @@ import io.swagger.v3.oas.annotations.media.Schema data class Order( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @get:JsonProperty("petId") val petId: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @Schema(example = "null", description = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @get:JsonProperty("status") val status: Order.Status? = null, @Schema(example = "null", description = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt index 73c71328b6..12a5a585b4 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Pet.kt @@ -28,25 +28,25 @@ import io.swagger.v3.oas.annotations.media.Schema data class Pet( @Schema(example = "doggie", required = true, description = "") - @field:JsonProperty("name", required = true) val name: kotlin.String, + @get:JsonProperty("name", required = true) val name: kotlin.String, @Schema(example = "null", required = true, description = "") - @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("category") val category: Category? = null, + @get:JsonProperty("category") val category: Category? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, @Schema(example = "null", description = "pet status in the store") @Deprecated(message = "") - @field:JsonProperty("status") val status: Pet.Status? = null + @get:JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Tag.kt index e6f18b5e01..0f2b45edcf 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/Tag.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Tag( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/User.kt index 0192450f9d..ef3d46afd3 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/model/User.kt @@ -27,28 +27,28 @@ import io.swagger.v3.oas.annotations.media.Schema data class User( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @get:JsonProperty("username") val username: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @get:JsonProperty("email") val email: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @get:JsonProperty("password") val password: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @get:JsonProperty("phone") val phone: kotlin.String? = null, @Schema(example = "null", description = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt index c70efbdd4e..95fa00f263 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Category.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Category( @Schema(example = "null", description = "") - @field:JsonProperty("id") var id: kotlin.Long? = null, + @get:JsonProperty("id") var id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") var name: kotlin.String? = null + @get:JsonProperty("name") var name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 11126554b5..68d1ebf496 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -22,13 +22,13 @@ import io.swagger.v3.oas.annotations.media.Schema data class ModelApiResponse( @Schema(example = "null", description = "") - @field:JsonProperty("code") var code: kotlin.Int? = null, + @get:JsonProperty("code") var code: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("type") var type: kotlin.String? = null, + @get:JsonProperty("type") var type: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("message") var message: kotlin.String? = null + @get:JsonProperty("message") var message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt index 42afb45520..b0ebd4f13c 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Order.kt @@ -26,22 +26,22 @@ import io.swagger.v3.oas.annotations.media.Schema data class Order( @Schema(example = "null", description = "") - @field:JsonProperty("id") var id: kotlin.Long? = null, + @get:JsonProperty("id") var id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("petId") var petId: kotlin.Long? = null, + @get:JsonProperty("petId") var petId: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("quantity") var quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") var quantity: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("shipDate") var shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") var shipDate: java.time.OffsetDateTime? = null, @Schema(example = "null", description = "Order Status") - @field:JsonProperty("status") var status: Order.Status? = null, + @get:JsonProperty("status") var status: Order.Status? = null, @Schema(example = "null", description = "") - @field:JsonProperty("complete") var complete: kotlin.Boolean? = false + @get:JsonProperty("complete") var complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt index d6f845e733..a989737abc 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Pet.kt @@ -28,24 +28,24 @@ import io.swagger.v3.oas.annotations.media.Schema data class Pet( @Schema(example = "doggie", required = true, description = "") - @field:JsonProperty("name", required = true) var name: kotlin.String, + @get:JsonProperty("name", required = true) var name: kotlin.String, @Schema(example = "null", required = true, description = "") - @field:JsonProperty("photoUrls", required = true) var photoUrls: kotlin.collections.MutableList, + @get:JsonProperty("photoUrls", required = true) var photoUrls: kotlin.collections.MutableList, @Schema(example = "null", description = "") - @field:JsonProperty("id") var id: kotlin.Long? = null, + @get:JsonProperty("id") var id: kotlin.Long? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("category") var category: Category? = null, + @get:JsonProperty("category") var category: Category? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("tags") var tags: kotlin.collections.MutableList? = null, + @get:JsonProperty("tags") var tags: kotlin.collections.MutableList? = null, @Schema(example = "null", description = "pet status in the store") - @field:JsonProperty("status") var status: Pet.Status? = null + @get:JsonProperty("status") var status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt index 1c7cfa202e..1ad68021b8 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/Tag.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Tag( @Schema(example = "null", description = "") - @field:JsonProperty("id") var id: kotlin.Long? = null, + @get:JsonProperty("id") var id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") var name: kotlin.String? = null + @get:JsonProperty("name") var name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt index 7cf5020daf..b1d1cead41 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/model/User.kt @@ -27,28 +27,28 @@ import io.swagger.v3.oas.annotations.media.Schema data class User( @Schema(example = "null", description = "") - @field:JsonProperty("id") var id: kotlin.Long? = null, + @get:JsonProperty("id") var id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("username") var username: kotlin.String? = null, + @get:JsonProperty("username") var username: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("firstName") var firstName: kotlin.String? = null, + @get:JsonProperty("firstName") var firstName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("lastName") var lastName: kotlin.String? = null, + @get:JsonProperty("lastName") var lastName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("email") var email: kotlin.String? = null, + @get:JsonProperty("email") var email: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("password") var password: kotlin.String? = null, + @get:JsonProperty("password") var password: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("phone") var phone: kotlin.String? = null, + @get:JsonProperty("phone") var phone: kotlin.String? = null, @Schema(example = "null", description = "User Status") - @field:JsonProperty("userStatus") var userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") var userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index f6eb292c2d..f7ed3a1a97 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Category( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index b8a5657e99..6af39346cf 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -22,13 +22,13 @@ import io.swagger.v3.oas.annotations.media.Schema data class ModelApiResponse( @Schema(example = "null", description = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @get:JsonProperty("code") val code: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @get:JsonProperty("type") val type: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @get:JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 4494ffa95b..128eee7f62 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -26,22 +26,22 @@ import io.swagger.v3.oas.annotations.media.Schema data class Order( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @get:JsonProperty("petId") val petId: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @Schema(example = "null", description = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @get:JsonProperty("status") val status: Order.Status? = null, @Schema(example = "null", description = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index cd37d16c50..cab156b881 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -28,24 +28,24 @@ import io.swagger.v3.oas.annotations.media.Schema data class Pet( @Schema(example = "doggie", required = true, description = "") - @field:JsonProperty("name", required = true) val name: kotlin.String, + @get:JsonProperty("name", required = true) val name: kotlin.String, @Schema(example = "null", required = true, description = "") - @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("category") val category: Category? = null, + @get:JsonProperty("category") val category: Category? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, @Schema(example = "null", description = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @get:JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index e6f18b5e01..0f2b45edcf 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Tag( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index 0192450f9d..ef3d46afd3 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -27,28 +27,28 @@ import io.swagger.v3.oas.annotations.media.Schema data class User( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @get:JsonProperty("username") val username: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @get:JsonProperty("email") val email: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @get:JsonProperty("password") val password: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @get:JsonProperty("phone") val phone: kotlin.String? = null, @Schema(example = "null", description = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Category.kt index 66d8d45d46..926b412f10 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Category.kt @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModelProperty data class Category( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 6b3e10c569..be3714162c 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -22,13 +22,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @get:JsonProperty("code") val code: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @get:JsonProperty("type") val type: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @get:JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt index fb52543d7e..8365af3090 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Order.kt @@ -26,22 +26,22 @@ import io.swagger.annotations.ApiModelProperty data class Order( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @get:JsonProperty("petId") val petId: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @ApiModelProperty(example = "null", value = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @get:JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt index 7e07af537d..a1a910115d 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Pet.kt @@ -28,24 +28,24 @@ import io.swagger.annotations.ApiModelProperty data class Pet( @ApiModelProperty(example = "doggie", required = true, value = "") - @field:JsonProperty("name", required = true) val name: kotlin.String, + @get:JsonProperty("name", required = true) val name: kotlin.String, @ApiModelProperty(example = "null", required = true, value = "") - @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("category") val category: Category? = null, + @get:JsonProperty("category") val category: Category? = null, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, @ApiModelProperty(example = "null", value = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @get:JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Tag.kt index 1d540aa167..5ffd22fa34 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/Tag.kt @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/User.kt index 87e20405d9..cd0997a8e2 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/model/User.kt @@ -27,28 +27,28 @@ import io.swagger.annotations.ApiModelProperty data class User( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @get:JsonProperty("username") val username: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @get:JsonProperty("email") val email: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @get:JsonProperty("password") val password: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @get:JsonProperty("phone") val phone: kotlin.String? = null, @ApiModelProperty(example = "null", value = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Category.kt index f6eb292c2d..f7ed3a1a97 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Category.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Category( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index b8a5657e99..6af39346cf 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -22,13 +22,13 @@ import io.swagger.v3.oas.annotations.media.Schema data class ModelApiResponse( @Schema(example = "null", description = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @get:JsonProperty("code") val code: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @get:JsonProperty("type") val type: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @get:JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt index 4494ffa95b..128eee7f62 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Order.kt @@ -26,22 +26,22 @@ import io.swagger.v3.oas.annotations.media.Schema data class Order( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @get:JsonProperty("petId") val petId: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, @Schema(example = "null", description = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @Schema(example = "null", description = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @get:JsonProperty("status") val status: Order.Status? = null, @Schema(example = "null", description = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt index cd37d16c50..cab156b881 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Pet.kt @@ -28,24 +28,24 @@ import io.swagger.v3.oas.annotations.media.Schema data class Pet( @Schema(example = "doggie", required = true, description = "") - @field:JsonProperty("name", required = true) val name: kotlin.String, + @get:JsonProperty("name", required = true) val name: kotlin.String, @Schema(example = "null", required = true, description = "") - @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("category") val category: Category? = null, + @get:JsonProperty("category") val category: Category? = null, @field:Valid @Schema(example = "null", description = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, @Schema(example = "null", description = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @get:JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Tag.kt index e6f18b5e01..0f2b45edcf 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/Tag.kt @@ -21,10 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema data class Tag( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/User.kt index 0192450f9d..ef3d46afd3 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/model/User.kt @@ -27,28 +27,28 @@ import io.swagger.v3.oas.annotations.media.Schema data class User( @Schema(example = "null", description = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @Schema(example = "null", description = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @get:JsonProperty("username") val username: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @get:JsonProperty("email") val email: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @get:JsonProperty("password") val password: kotlin.String? = null, @Schema(example = "null", description = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @get:JsonProperty("phone") val phone: kotlin.String? = null, @Schema(example = "null", description = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Category.kt index 66d8d45d46..926b412f10 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Category.kt @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModelProperty data class Category( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 6b3e10c569..be3714162c 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -22,13 +22,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @get:JsonProperty("code") val code: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @get:JsonProperty("type") val type: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @get:JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Order.kt index fb52543d7e..8365af3090 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Order.kt @@ -26,22 +26,22 @@ import io.swagger.annotations.ApiModelProperty data class Order( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @get:JsonProperty("petId") val petId: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, @ApiModelProperty(example = "null", value = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @get:JsonProperty("status") val status: Order.Status? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Pet.kt index 7e07af537d..a1a910115d 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Pet.kt @@ -28,24 +28,24 @@ import io.swagger.annotations.ApiModelProperty data class Pet( @ApiModelProperty(example = "doggie", required = true, value = "") - @field:JsonProperty("name", required = true) val name: kotlin.String, + @get:JsonProperty("name", required = true) val name: kotlin.String, @ApiModelProperty(example = "null", required = true, value = "") - @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("category") val category: Category? = null, + @get:JsonProperty("category") val category: Category? = null, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, @ApiModelProperty(example = "null", value = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @get:JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Tag.kt index 1d540aa167..5ffd22fa34 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/Tag.kt @@ -21,10 +21,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/User.kt index 87e20405d9..cd0997a8e2 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/model/User.kt @@ -27,28 +27,28 @@ import io.swagger.annotations.ApiModelProperty data class User( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @get:JsonProperty("username") val username: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @get:JsonProperty("email") val email: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @get:JsonProperty("password") val password: kotlin.String? = null, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @get:JsonProperty("phone") val phone: kotlin.String? = null, @ApiModelProperty(example = "null", value = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index 1ed259de7f..7e906d10e1 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -19,9 +19,9 @@ import javax.validation.Valid */ data class Category( - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index a0d2798707..4b42c877ed 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -20,11 +20,11 @@ import javax.validation.Valid */ data class ModelApiResponse( - @field:JsonProperty("code") val code: kotlin.Int? = null, + @get:JsonProperty("code") val code: kotlin.Int? = null, - @field:JsonProperty("type") val type: kotlin.String? = null, + @get:JsonProperty("type") val type: kotlin.String? = null, - @field:JsonProperty("message") val message: kotlin.String? = null + @get:JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 6f0fe53d07..61814bda58 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -24,17 +24,17 @@ import javax.validation.Valid */ data class Order( - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @get:JsonProperty("petId") val petId: kotlin.Long? = null, - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @get:JsonProperty("quantity") val quantity: kotlin.Int? = null, - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @get:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @field:JsonProperty("status") val status: Order.Status? = null, + @get:JsonProperty("status") val status: Order.Status? = null, - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @get:JsonProperty("complete") val complete: kotlin.Boolean? = false ) { /** diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index db781b4eba..ebebb0c141 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -26,19 +26,19 @@ import javax.validation.Valid */ data class Pet( - @field:JsonProperty("name", required = true) val name: kotlin.String, + @get:JsonProperty("name", required = true) val name: kotlin.String, - @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, + @get:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List, - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, @field:Valid - @field:JsonProperty("category") val category: Category? = null, + @get:JsonProperty("category") val category: Category? = null, @field:Valid - @field:JsonProperty("tags") val tags: kotlin.collections.List? = null, + @get:JsonProperty("tags") val tags: kotlin.collections.List? = null, - @field:JsonProperty("status") val status: Pet.Status? = null + @get:JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index 412f02034f..0beafadd51 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -19,9 +19,9 @@ import javax.validation.Valid */ data class Tag( - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, - @field:JsonProperty("name") val name: kotlin.String? = null + @get:JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index dcdcc4a285..8780ff0d2f 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -25,21 +25,21 @@ import javax.validation.Valid */ data class User( - @field:JsonProperty("id") val id: kotlin.Long? = null, + @get:JsonProperty("id") val id: kotlin.Long? = null, - @field:JsonProperty("username") val username: kotlin.String? = null, + @get:JsonProperty("username") val username: kotlin.String? = null, - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @get:JsonProperty("firstName") val firstName: kotlin.String? = null, - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @get:JsonProperty("lastName") val lastName: kotlin.String? = null, - @field:JsonProperty("email") val email: kotlin.String? = null, + @get:JsonProperty("email") val email: kotlin.String? = null, - @field:JsonProperty("password") val password: kotlin.String? = null, + @get:JsonProperty("password") val password: kotlin.String? = null, - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @get:JsonProperty("phone") val phone: kotlin.String? = null, - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { }