From 3ecb5c54686e52af070f84126f4bdbe4394cea13 Mon Sep 17 00:00:00 2001 From: Joshua Bridge <jbridg12@jaguarlandrover.com> Date: Thu, 17 Jun 2021 19:26:49 +0100 Subject: [PATCH 1/5] Use Kotlin nullable operator for nullable properties. The previous check of isReadOnly was not applicable to whether a value should be null or not. Also removed the default null value if the value is not nullable. Also removed escaping of default values (this would cause any string value to be written to the file as val test = "value" instead of val test = "value" --- .../src/main/resources/kotlin-spring/dataClassOptVar.mustache | 2 +- .../src/main/resources/kotlin-spring/dataClassReqVar.mustache | 2 +- 2 files changed, 2 insertions(+), 2 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 0fca42a0ad8..87b75f20bd4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#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}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} \ No newline at end of file + @field:JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ 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 27e16f95fca..3603e741995 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,3 +1,3 @@ {{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @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}}{{/defaultValue}}{{#isReadOnly}}{{^defaultValue}} = null{{/defaultValue}}{{/isReadOnly}} \ No newline at end of file + @field:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{nameInCamelCase}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file -- GitLab From 8c81fefdb7eb7a2d42811a812a47f091cd2dd2fb Mon Sep 17 00:00:00 2001 From: Joshua Bridge <jbridg12@jaguarlandrover.com> Date: Thu, 17 Jun 2021 19:39:58 +0100 Subject: [PATCH 2/5] Update samples --- .../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 | 8 ++++---- .../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 | 8 ++++---- .../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 | 8 ++++---- .../main/kotlin/org/openapitools/model/Tag.kt | 4 ++-- .../main/kotlin/org/openapitools/model/User.kt | 16 ++++++++-------- 18 files changed, 75 insertions(+), 75 deletions(-) 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 42348e7084a..c2bec763eff 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 @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiModelProperty data class Category( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @field:JsonProperty("name") val name: kotlin.String ) { } 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 6ada956e84e..7b972866c14 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 @@ -21,13 +21,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @field:JsonProperty("code") val code: kotlin.Int, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @field:JsonProperty("type") val type: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @field:JsonProperty("message") val message: kotlin.String ) { } 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 2de2fa35642..9cc37747471 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 @@ -25,22 +25,22 @@ import io.swagger.annotations.ApiModelProperty data class Order( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @field:JsonProperty("petId") val petId: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @field:JsonProperty("quantity") val quantity: kotlin.Int, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime, @ApiModelProperty(example = "null", value = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @field:JsonProperty("status") val status: Order.Status, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @field: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 22bbe695c0d..45c800a1a49 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 @@ -33,18 +33,18 @@ data class Pet( @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List<kotlin.String>, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("category") val category: Category? = null, + @field:JsonProperty("category") val category: Category, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null, + @field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>, @ApiModelProperty(example = "null", value = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @field:JsonProperty("status") val status: Pet.Status ) { /** 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 ab8e8348498..0a84bba0233 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 @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @field:JsonProperty("name") val name: kotlin.String ) { } 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 c083bd85dba..a5be03a6fbe 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 @@ -26,28 +26,28 @@ import io.swagger.annotations.ApiModelProperty data class User( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @field:JsonProperty("username") val username: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @field:JsonProperty("firstName") val firstName: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @field:JsonProperty("lastName") val lastName: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @field:JsonProperty("email") val email: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @field:JsonProperty("password") val password: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @field:JsonProperty("phone") val phone: kotlin.String, @ApiModelProperty(example = "null", value = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @field:JsonProperty("userStatus") val userStatus: kotlin.Int ) { } 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 c76fbbf1e9c..200257b9fca 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 @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiModelProperty data class Category( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @field:JsonProperty("name") val name: kotlin.String ) { } 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 6ada956e84e..7b972866c14 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 @@ -21,13 +21,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @field:JsonProperty("code") val code: kotlin.Int, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @field:JsonProperty("type") val type: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @field:JsonProperty("message") val message: kotlin.String ) { } 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 2de2fa35642..9cc37747471 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 @@ -25,22 +25,22 @@ import io.swagger.annotations.ApiModelProperty data class Order( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @field:JsonProperty("petId") val petId: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @field:JsonProperty("quantity") val quantity: kotlin.Int, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime, @ApiModelProperty(example = "null", value = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @field:JsonProperty("status") val status: Order.Status, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @field: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 22bbe695c0d..45c800a1a49 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 @@ -33,18 +33,18 @@ data class Pet( @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List<kotlin.String>, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("category") val category: Category? = null, + @field:JsonProperty("category") val category: Category, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null, + @field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>, @ApiModelProperty(example = "null", value = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @field:JsonProperty("status") val status: Pet.Status ) { /** 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 ab8e8348498..0a84bba0233 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 @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @field:JsonProperty("name") val name: kotlin.String ) { } 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 c083bd85dba..a5be03a6fbe 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 @@ -26,28 +26,28 @@ import io.swagger.annotations.ApiModelProperty data class User( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @field:JsonProperty("username") val username: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @field:JsonProperty("firstName") val firstName: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @field:JsonProperty("lastName") val lastName: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @field:JsonProperty("email") val email: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @field:JsonProperty("password") val password: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @field:JsonProperty("phone") val phone: kotlin.String, @ApiModelProperty(example = "null", value = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @field:JsonProperty("userStatus") val userStatus: kotlin.Int ) { } 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 c76fbbf1e9c..200257b9fca 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 @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiModelProperty data class Category( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @field:JsonProperty("name") val name: kotlin.String ) { } 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 6ada956e84e..7b972866c14 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 @@ -21,13 +21,13 @@ import io.swagger.annotations.ApiModelProperty data class ModelApiResponse( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("code") val code: kotlin.Int? = null, + @field:JsonProperty("code") val code: kotlin.Int, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("type") val type: kotlin.String? = null, + @field:JsonProperty("type") val type: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("message") val message: kotlin.String? = null + @field:JsonProperty("message") val message: kotlin.String ) { } 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 2de2fa35642..9cc37747471 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 @@ -25,22 +25,22 @@ import io.swagger.annotations.ApiModelProperty data class Order( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("petId") val petId: kotlin.Long? = null, + @field:JsonProperty("petId") val petId: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("quantity") val quantity: kotlin.Int? = null, + @field:JsonProperty("quantity") val quantity: kotlin.Int, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @field:JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime, @ApiModelProperty(example = "null", value = "Order Status") - @field:JsonProperty("status") val status: Order.Status? = null, + @field:JsonProperty("status") val status: Order.Status, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("complete") val complete: kotlin.Boolean? = false + @field: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 22bbe695c0d..45c800a1a49 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 @@ -33,18 +33,18 @@ data class Pet( @field:JsonProperty("photoUrls", required = true) val photoUrls: kotlin.collections.List<kotlin.String>, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("category") val category: Category? = null, + @field:JsonProperty("category") val category: Category, @field:Valid @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null, + @field:JsonProperty("tags") val tags: kotlin.collections.List<Tag>, @ApiModelProperty(example = "null", value = "pet status in the store") - @field:JsonProperty("status") val status: Pet.Status? = null + @field:JsonProperty("status") val status: Pet.Status ) { /** 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 ab8e8348498..0a84bba0233 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 @@ -20,10 +20,10 @@ import io.swagger.annotations.ApiModelProperty data class Tag( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("name") val name: kotlin.String? = null + @field:JsonProperty("name") val name: kotlin.String ) { } 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 c083bd85dba..a5be03a6fbe 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 @@ -26,28 +26,28 @@ import io.swagger.annotations.ApiModelProperty data class User( @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("id") val id: kotlin.Long? = null, + @field:JsonProperty("id") val id: kotlin.Long, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("username") val username: kotlin.String? = null, + @field:JsonProperty("username") val username: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("firstName") val firstName: kotlin.String? = null, + @field:JsonProperty("firstName") val firstName: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("lastName") val lastName: kotlin.String? = null, + @field:JsonProperty("lastName") val lastName: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("email") val email: kotlin.String? = null, + @field:JsonProperty("email") val email: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("password") val password: kotlin.String? = null, + @field:JsonProperty("password") val password: kotlin.String, @ApiModelProperty(example = "null", value = "") - @field:JsonProperty("phone") val phone: kotlin.String? = null, + @field:JsonProperty("phone") val phone: kotlin.String, @ApiModelProperty(example = "null", value = "User Status") - @field:JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @field:JsonProperty("userStatus") val userStatus: kotlin.Int ) { } -- GitLab From 0b721bd2012ea2a1d42e69d508337ce72f9c6a01 Mon Sep 17 00:00:00 2001 From: Joshua Bridge <jbridg12@jaguarlandrover.com> Date: Fri, 18 Jun 2021 10:56:15 +0100 Subject: [PATCH 3/5] Update all kotlin templates to use nullable values --- .../main/resources/kotlin-client/data_class_opt_var.mustache | 2 +- .../main/resources/kotlin-client/data_class_req_var.mustache | 2 +- .../src/main/resources/kotlin-client/interface_opt_var.mustache | 2 +- .../src/main/resources/kotlin-client/interface_req_var.mustache | 2 +- .../main/resources/kotlin-server/data_class_opt_var.mustache | 2 +- .../main/resources/kotlin-server/data_class_req_var.mustache | 2 +- .../resources/kotlin-vertx-server/data_class_opt_var.mustache | 2 +- .../resources/kotlin-vertx-server/data_class_req_var.mustache | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache index deae3ebd5dc..15750c19820 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache index 2c44be195c8..00119b375ca 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache @@ -18,4 +18,4 @@ {{#deprecated}} @Deprecated(message = "This property is deprecated.") {{/deprecated}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache index 6d23fb240a0..b8f1161b71e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_opt_var.mustache @@ -15,4 +15,4 @@ {{^isEnum}}{{^isArray}}{{^isPrimitiveType}}{{^isModel}}@Contextual {{/isModel}}{{/isPrimitiveType}}{{/isArray}}{{/isEnum}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/kotlinx_serialization}} {{/multiplatform}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}? \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache index 6b93d6189fa..8325c26ceaf 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/interface_req_var.mustache @@ -15,4 +15,4 @@ {{^isEnum}}{{^isArray}}{{^isPrimitiveType}}{{^isModel}}@Contextual {{/isModel}}{{/isPrimitiveType}}{{/isArray}}{{/isEnum}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/kotlinx_serialization}} {{/multiplatform}} - {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} \ No newline at end of file + {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isArray}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{^items.isEnum}}{{^items.isPrimitiveType}}{{^items.isModel}}{{#kotlinx_serialization}}@Contextual {{/kotlinx_serialization}}{{/items.isModel}}{{/items.isPrimitiveType}}{{{items.dataType}}}{{/items.isEnum}}{{#items.isEnum}}{{classname}}.{{{nameInCamelCase}}}{{/items.isEnum}}>{{/isArray}}{{^isEnum}}{{^isArray}}{{{dataType}}}{{/isArray}}{{/isEnum}}{{#isEnum}}{{^isArray}}{{classname}}.{{{nameInCamelCase}}}{{/isArray}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache index b1060118732..cd8a211a1c4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{description}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache index c79bfec01bd..cd8a211a1c4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class_req_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{description}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache index b1060118732..cd8a211a1c4 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_opt_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{description}}} */ {{/description}} - {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache index 6a5b5280bb7..5bc43f0d0bf 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/data_class_req_var.mustache @@ -1,4 +1,4 @@ {{#description}} /* {{{description}}} */ {{/description}} - @SerializedName("{{{name}}}") private {{>modelMutable}} _{{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? \ No newline at end of file + @SerializedName("{{{name}}}") private {{>modelMutable}} _{{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#isNullable}}{{^defaultValue}} = null{{/defaultValue}}{{/isNullable}} \ No newline at end of file -- GitLab From 1bb79aa801c8bbcc459366bf8e7fa0ea66042c2d Mon Sep 17 00:00:00 2001 From: Joshua Bridge <jbridg12@jaguarlandrover.com> Date: Fri, 18 Jun 2021 10:56:22 +0100 Subject: [PATCH 4/5] Update samples --- .../openapitools/server/models/ApiResponse.kt | 6 +++--- .../org/openapitools/server/models/Category.kt | 4 ++-- .../org/openapitools/server/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/server/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/server/models/Tag.kt | 4 ++-- .../org/openapitools/server/models/User.kt | 16 ++++++++-------- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt index 14f50dbb9ad..283d848b6f6 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt @@ -20,9 +20,9 @@ import java.io.Serializable * @param message */ data class ApiResponse( - val code: kotlin.Int? = null, - val type: kotlin.String? = null, - val message: kotlin.String? = null + val code: kotlin.Int, + val type: kotlin.String, + val message: kotlin.String ) : Serializable { companion object { diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt index 9d857192138..e440eabdc37 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt @@ -19,8 +19,8 @@ import java.io.Serializable * @param name */ data class Category( - val id: kotlin.Long? = null, - val name: kotlin.String? = null + val id: kotlin.Long, + val name: kotlin.String ) : Serializable { companion object { diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt index 5e9e18b0328..9c9ef307063 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -23,13 +23,13 @@ import java.io.Serializable * @param complete */ data class Order( - val id: kotlin.Long? = null, - val petId: kotlin.Long? = null, - val quantity: kotlin.Int? = null, - val shipDate: java.time.OffsetDateTime? = null, + val id: kotlin.Long, + val petId: kotlin.Long, + val quantity: kotlin.Int, + val shipDate: java.time.OffsetDateTime, /* Order Status */ - val status: Order.Status? = null, - val complete: kotlin.Boolean? = null + val status: Order.Status, + val complete: kotlin.Boolean = false ) : Serializable { companion object { diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt index 8b98ce0469c..1eaea2ee9fc 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt @@ -27,11 +27,11 @@ import java.io.Serializable data class Pet( val name: kotlin.String, val photoUrls: kotlin.collections.List<kotlin.String>, - val id: kotlin.Long? = null, - val category: Category? = null, - val tags: kotlin.collections.List<Tag>? = null, + val id: kotlin.Long, + val category: Category, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ - val status: Pet.Status? = null + val status: Pet.Status ) : Serializable { companion object { diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt index e9626b25c6d..49bd09f922b 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt @@ -19,8 +19,8 @@ import java.io.Serializable * @param name */ data class Tag( - val id: kotlin.Long? = null, - val name: kotlin.String? = null + val id: kotlin.Long, + val name: kotlin.String ) : Serializable { companion object { diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt index fdbdb4e1cff..3dba4696bf4 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt @@ -25,15 +25,15 @@ import java.io.Serializable * @param userStatus User Status */ data class User( - val id: kotlin.Long? = null, - val username: kotlin.String? = null, - val firstName: kotlin.String? = null, - val lastName: kotlin.String? = null, - val email: kotlin.String? = null, - val password: kotlin.String? = null, - val phone: kotlin.String? = null, + val id: kotlin.Long, + val username: kotlin.String, + val firstName: kotlin.String, + val lastName: kotlin.String, + val email: kotlin.String, + val password: kotlin.String, + val phone: kotlin.String, /* User Status */ - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Serializable { companion object { -- GitLab From 40d5e3dc7acbc5c5987e62509f1d3ba7a4c4c052 Mon Sep 17 00:00:00 2001 From: Joshua Bridge <jbridg12@jaguarlandrover.com> Date: Fri, 18 Jun 2021 11:00:54 +0100 Subject: [PATCH 5/5] Update samples --- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- .../openapitools/client/models/ApiResponse.kt | 6 +++--- .../org/openapitools/client/models/Category.kt | 4 ++-- .../org/openapitools/client/models/Order.kt | 12 ++++++------ .../kotlin/org/openapitools/client/models/Pet.kt | 8 ++++---- .../kotlin/org/openapitools/client/models/Tag.kt | 4 ++-- .../org/openapitools/client/models/User.kt | 16 ++++++++-------- 90 files changed, 375 insertions(+), 375 deletions(-) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 54df813fcee..b3ee0630a48 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.google.gson.annotations.SerializedName data class ApiResponse ( @SerializedName("code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @SerializedName("type") - val type: kotlin.String? = null, + val type: kotlin.String, @SerializedName("message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt index fdefa74fda0..34b02f39561 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.google.gson.annotations.SerializedName data class Category ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt index 05e8a533cb9..0a733d705a6 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.google.gson.annotations.SerializedName data class Order ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @SerializedName("quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @SerializedName("shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @SerializedName("status") - val status: Order.Status? = null, + val status: Order.Status, @SerializedName("complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt index cbefe8712ef..78c2e303165 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ data class Pet ( @SerializedName("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("category") - val category: Category? = null, + val category: Category, @SerializedName("tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @SerializedName("status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt index 28e82b1df68..590f6218a71 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.google.gson.annotations.SerializedName data class Tag ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt index 62baf33e927..f546591797a 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.google.gson.annotations.SerializedName data class User ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("username") - val username: kotlin.String? = null, + val username: kotlin.String, @SerializedName("firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @SerializedName("lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @SerializedName("email") - val email: kotlin.String? = null, + val email: kotlin.String, @SerializedName("password") - val password: kotlin.String? = null, + val password: kotlin.String, @SerializedName("phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @SerializedName("userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index c341f8ca321..9739f73c0c0 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.fasterxml.jackson.annotation.JsonProperty data class ApiResponse ( @field:JsonProperty("code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @field:JsonProperty("type") - val type: kotlin.String? = null, + val type: kotlin.String, @field:JsonProperty("message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Category.kt index 2ed5390c1f3..0259b26667a 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonProperty data class Category ( @field:JsonProperty("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @field:JsonProperty("name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt index 4a2d6e0bd57..88686c1069c 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.fasterxml.jackson.annotation.JsonProperty data class Order ( @field:JsonProperty("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @field:JsonProperty("petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @field:JsonProperty("quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @field:JsonProperty("shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @field:JsonProperty("status") - val status: Order.Status? = null, + val status: Order.Status, @field:JsonProperty("complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Pet.kt index fa98c892601..62d104b1921 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ data class Pet ( @field:JsonProperty("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @field:JsonProperty("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @field:JsonProperty("category") - val category: Category? = null, + val category: Category, @field:JsonProperty("tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @field:JsonProperty("status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Tag.kt index 7243f42ed7d..776f6a2249f 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.fasterxml.jackson.annotation.JsonProperty data class Tag ( @field:JsonProperty("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @field:JsonProperty("name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/User.kt index e8f639e5092..84acf9967b3 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.fasterxml.jackson.annotation.JsonProperty data class User ( @field:JsonProperty("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @field:JsonProperty("username") - val username: kotlin.String? = null, + val username: kotlin.String, @field:JsonProperty("firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @field:JsonProperty("lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @field:JsonProperty("email") - val email: kotlin.String? = null, + val email: kotlin.String, @field:JsonProperty("password") - val password: kotlin.String? = null, + val password: kotlin.String, @field:JsonProperty("phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @field:JsonProperty("userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 5e349f9f96e..5d9db6bcf18 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -26,10 +26,10 @@ import kotlinx.parcelize.Parcelize data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) : Parcelable diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt index 38cc2226846..d5cdfaef635 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -25,8 +25,8 @@ import kotlinx.parcelize.Parcelize data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Parcelable diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt index 7e9d9fc4644..fcf3437941b 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -29,18 +29,18 @@ import kotlinx.parcelize.Parcelize data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) : Parcelable { /** diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt index 35de5ef28a2..c1d6bf4f8a0 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -35,14 +35,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) : Parcelable { /** diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt index dc72586b991..f7e3213494d 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -25,8 +25,8 @@ import kotlinx.parcelize.Parcelize data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Parcelable diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt index 9a840f06e7f..9d36a9c8648 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt @@ -31,21 +31,21 @@ import kotlinx.parcelize.Parcelize data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Parcelable diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index fc89bf34e7f..79914e4b1fb 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -24,11 +24,11 @@ import java.io.Serializable data class ApiResponse ( @SerializedName("code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @SerializedName("type") - val type: kotlin.String? = null, + val type: kotlin.String, @SerializedName("message") - val message: kotlin.String? = null + val message: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt index b483bee69b3..afcdaa27b28 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Category ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt index 8980b2883ef..e67ce99907f 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -27,18 +27,18 @@ import java.io.Serializable data class Order ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @SerializedName("quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @SerializedName("shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @SerializedName("status") - val status: Order.Status? = null, + val status: Order.Status, @SerializedName("complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt index 7ddddd99e96..fbc649407ba 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -33,14 +33,14 @@ data class Pet ( @SerializedName("photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("category") - val category: Category? = null, + val category: Category, @SerializedName("tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @SerializedName("status") - val status: Pet.Status? = null + val status: Pet.Status ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt index a1a282cb38d..d11814347f7 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Tag ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt index 59ba0254f60..8932b64f2a7 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/models/User.kt @@ -29,22 +29,22 @@ import java.io.Serializable data class User ( @SerializedName("id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerializedName("username") - val username: kotlin.String? = null, + val username: kotlin.String, @SerializedName("firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @SerializedName("lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @SerializedName("email") - val email: kotlin.String? = null, + val email: kotlin.String, @SerializedName("password") - val password: kotlin.String? = null, + val password: kotlin.String, @SerializedName("phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @SerializedName("userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 18d2ce3dbbe..4ecf1b0bbfd 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -24,10 +24,10 @@ import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt index 8396fa42357..ac37f94abec 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -23,8 +23,8 @@ import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt index 1a84efc4cb1..0ffa165fec1 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -27,18 +27,18 @@ import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt index 633f509bbd2..0f531a7cce5 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -33,14 +33,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt index e7cdab2bb5d..8483f4e81c5 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -23,8 +23,8 @@ import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt index 1bfad844904..8b5ccd76248 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/models/User.kt @@ -29,21 +29,21 @@ import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt index a035628a8f9..8ba069a6c61 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,8 +23,8 @@ import kotlinx.serialization.internal.CommonEnumSerializer */ @Serializable data class ApiResponse ( - @SerialName(value = "code") val code: kotlin.Int? = null, - @SerialName(value = "type") val type: kotlin.String? = null, - @SerialName(value = "message") val message: kotlin.String? = null + @SerialName(value = "code") val code: kotlin.Int, + @SerialName(value = "type") val type: kotlin.String, + @SerialName(value = "message") val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt index d5f9a45fd4d..4526b9cf041 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Category.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer */ @Serializable data class Category ( - @SerialName(value = "id") val id: kotlin.Long? = null, - @SerialName(value = "name") val name: kotlin.String? = null + @SerialName(value = "id") val id: kotlin.Long, + @SerialName(value = "name") val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt index 0a53ba0740e..f637aa1eb6c 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Order.kt @@ -26,13 +26,13 @@ import kotlinx.serialization.internal.CommonEnumSerializer */ @Serializable data class Order ( - @SerialName(value = "id") val id: kotlin.Long? = null, - @SerialName(value = "petId") val petId: kotlin.Long? = null, - @SerialName(value = "quantity") val quantity: kotlin.Int? = null, - @SerialName(value = "shipDate") val shipDate: kotlin.String? = null, + @SerialName(value = "id") val id: kotlin.Long, + @SerialName(value = "petId") val petId: kotlin.Long, + @SerialName(value = "quantity") val quantity: kotlin.Int, + @SerialName(value = "shipDate") val shipDate: kotlin.String, /* Order Status */ - @SerialName(value = "status") val status: Order.Status? = null, - @SerialName(value = "complete") val complete: kotlin.Boolean? = null + @SerialName(value = "status") val status: Order.Status, + @SerialName(value = "complete") val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt index 1649cf0fb29..ea8766c1d8c 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Pet.kt @@ -30,11 +30,11 @@ import kotlinx.serialization.internal.CommonEnumSerializer data class Pet ( @SerialName(value = "name") @Required val name: kotlin.String, @SerialName(value = "photoUrls") @Required val photoUrls: kotlin.collections.List<kotlin.String>, - @SerialName(value = "id") val id: kotlin.Long? = null, - @SerialName(value = "category") val category: Category? = null, - @SerialName(value = "tags") val tags: kotlin.collections.List<Tag>? = null, + @SerialName(value = "id") val id: kotlin.Long, + @SerialName(value = "category") val category: Category, + @SerialName(value = "tags") val tags: kotlin.collections.List<Tag>, /* pet status in the store */ - @SerialName(value = "status") val status: Pet.Status? = null + @SerialName(value = "status") val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt index 6116e50d3f9..318e83dbc3e 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/Tag.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer */ @Serializable data class Tag ( - @SerialName(value = "id") val id: kotlin.Long? = null, - @SerialName(value = "name") val name: kotlin.String? = null + @SerialName(value = "id") val id: kotlin.Long, + @SerialName(value = "name") val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt index 97b53a049c1..0b7ca944b50 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/User.kt @@ -28,14 +28,14 @@ import kotlinx.serialization.internal.CommonEnumSerializer */ @Serializable data class User ( - @SerialName(value = "id") val id: kotlin.Long? = null, - @SerialName(value = "username") val username: kotlin.String? = null, - @SerialName(value = "firstName") val firstName: kotlin.String? = null, - @SerialName(value = "lastName") val lastName: kotlin.String? = null, - @SerialName(value = "email") val email: kotlin.String? = null, - @SerialName(value = "password") val password: kotlin.String? = null, - @SerialName(value = "phone") val phone: kotlin.String? = null, + @SerialName(value = "id") val id: kotlin.Long, + @SerialName(value = "username") val username: kotlin.String, + @SerialName(value = "firstName") val firstName: kotlin.String, + @SerialName(value = "lastName") val lastName: kotlin.String, + @SerialName(value = "email") val email: kotlin.String, + @SerialName(value = "password") val password: kotlin.String, + @SerialName(value = "phone") val phone: kotlin.String, /* User Status */ - @SerialName(value = "userStatus") val userStatus: kotlin.Int? = null + @SerialName(value = "userStatus") val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index a695278dfa3..43139947d2b 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.squareup.moshi.Json internal data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt index 376994a9b25..45726b3690c 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json internal data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt index a5e3ef5a289..fbfb73d8619 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.squareup.moshi.Json internal data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt index 1609ba878dc..3ca597d54ac 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ internal data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt index d9b84e93eaf..c7b173a2a27 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json internal data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt index e0e821cd7e3..1d1f91c7e8c 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.squareup.moshi.Json internal data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 7d40c8efbc2..ad3887d6155 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -24,11 +24,11 @@ import java.io.Serializable data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt index ceb0fbc8fe6..5f7205bd0dc 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt index 941b2ec6d39..b496d3c4fb0 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -27,18 +27,18 @@ import java.io.Serializable data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt index 079c44f026a..6327c5ad1ac 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -33,14 +33,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt index 944b1cd0a14..9a9713b9c92 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt index 9697f07d5bf..dcd2c68d4fa 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/models/User.kt @@ -29,22 +29,22 @@ import java.io.Serializable data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index fafca8738f6..3637e648edc 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.squareup.moshi.Json data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt index a4c17c3b49d..8f7a2c26763 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt index 2bdaec85131..debe54a616a 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.squareup.moshi.Json data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt index 0e38da34b79..af0c160c930 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt index 6e619023a5c..2681c7a85d4 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt index af1e270325d..2faa3f7c067 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.squareup.moshi.Json data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index fbe55ab909f..934d7109e37 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -26,11 +26,11 @@ import java.io.Serializable @KSerializable data class ApiResponse ( @SerialName(value = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @SerialName(value = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @SerialName(value = "message") - val message: kotlin.String? = null + val message: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Category.kt index 5b2c9a487de..88aa8c45a32 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -25,9 +25,9 @@ import java.io.Serializable @KSerializable data class Category ( @SerialName(value = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerialName(value = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt index 4121b6fbbbb..78e166522c8 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -29,18 +29,18 @@ import java.io.Serializable @KSerializable data class Order ( @SerialName(value = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerialName(value = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @SerialName(value = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Contextual @SerialName(value = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @SerialName(value = "status") - val status: Order.Status? = null, + val status: Order.Status, @SerialName(value = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Pet.kt index ea1cd27b262..80f9c017a59 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -35,14 +35,14 @@ data class Pet ( @SerialName(value = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @SerialName(value = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerialName(value = "category") - val category: Category? = null, + val category: Category, @SerialName(value = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @SerialName(value = "status") - val status: Pet.Status? = null + val status: Pet.Status ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Tag.kt index e26edf9170a..8b6b24065ea 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -25,9 +25,9 @@ import java.io.Serializable @KSerializable data class Tag ( @SerialName(value = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerialName(value = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/User.kt index 23231a7536e..f20d2daeb24 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/models/User.kt @@ -31,22 +31,22 @@ import java.io.Serializable @KSerializable data class User ( @SerialName(value = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @SerialName(value = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @SerialName(value = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @SerialName(value = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @SerialName(value = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @SerialName(value = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @SerialName(value = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @SerialName(value = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index fafca8738f6..3637e648edc 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.squareup.moshi.Json data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Category.kt index a4c17c3b49d..8f7a2c26763 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt index 2bdaec85131..debe54a616a 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.squareup.moshi.Json data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Pet.kt index 0e38da34b79..af0c160c930 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Tag.kt index 6e619023a5c..2681c7a85d4 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/User.kt index af1e270325d..2faa3f7c067 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.squareup.moshi.Json data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index fafca8738f6..3637e648edc 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.squareup.moshi.Json data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt index a4c17c3b49d..8f7a2c26763 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt index 2bdaec85131..debe54a616a 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.squareup.moshi.Json data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt index 0e38da34b79..af0c160c930 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt index 6e619023a5c..2681c7a85d4 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt index af1e270325d..2faa3f7c067 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.squareup.moshi.Json data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 7d40c8efbc2..ad3887d6155 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -24,11 +24,11 @@ import java.io.Serializable data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt index ceb0fbc8fe6..5f7205bd0dc 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt index 3484f720ad7..ae64b29f0cc 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -27,18 +27,18 @@ import java.io.Serializable data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: kotlin.String? = null, + val shipDate: kotlin.String, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt index e87900fbea0..8d761a771b8 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -29,18 +29,18 @@ import java.io.Serializable data class Pet ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "name") val name: kotlin.String, @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt index 944b1cd0a14..9a9713b9c92 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt index 9697f07d5bf..dcd2c68d4fa 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/models/User.kt @@ -29,22 +29,22 @@ import java.io.Serializable data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index fafca8738f6..3637e648edc 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -23,10 +23,10 @@ import com.squareup.moshi.Json data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt index a4c17c3b49d..8f7a2c26763 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt index 4221574da26..0b94b8ff1c3 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -26,18 +26,18 @@ import com.squareup.moshi.Json data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: org.threeten.bp.OffsetDateTime? = null, + val shipDate: org.threeten.bp.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) { /** diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt index 0e38da34b79..af0c160c930 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -32,14 +32,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) { /** diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt index 6e619023a5c..2681c7a85d4 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -22,8 +22,8 @@ import com.squareup.moshi.Json data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt index af1e270325d..2faa3f7c067 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/models/User.kt @@ -28,21 +28,21 @@ import com.squareup.moshi.Json data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt index 7d40c8efbc2..ad3887d6155 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt @@ -24,11 +24,11 @@ import java.io.Serializable data class ApiResponse ( @Json(name = "code") - val code: kotlin.Int? = null, + val code: kotlin.Int, @Json(name = "type") - val type: kotlin.String? = null, + val type: kotlin.String, @Json(name = "message") - val message: kotlin.String? = null + val message: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt index ceb0fbc8fe6..5f7205bd0dc 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Category ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt index 941b2ec6d39..b496d3c4fb0 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -27,18 +27,18 @@ import java.io.Serializable data class Order ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "petId") - val petId: kotlin.Long? = null, + val petId: kotlin.Long, @Json(name = "quantity") - val quantity: kotlin.Int? = null, + val quantity: kotlin.Int, @Json(name = "shipDate") - val shipDate: java.time.OffsetDateTime? = null, + val shipDate: java.time.OffsetDateTime, /* Order Status */ @Json(name = "status") - val status: Order.Status? = null, + val status: Order.Status, @Json(name = "complete") - val complete: kotlin.Boolean? = null + val complete: kotlin.Boolean = false ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt index 079c44f026a..6327c5ad1ac 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -33,14 +33,14 @@ data class Pet ( @Json(name = "photoUrls") val photoUrls: kotlin.collections.List<kotlin.String>, @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "category") - val category: Category? = null, + val category: Category, @Json(name = "tags") - val tags: kotlin.collections.List<Tag>? = null, + val tags: kotlin.collections.List<Tag>, /* pet status in the store */ @Json(name = "status") - val status: Pet.Status? = null + val status: Pet.Status ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt index 944b1cd0a14..9a9713b9c92 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt @@ -23,9 +23,9 @@ import java.io.Serializable data class Tag ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "name") - val name: kotlin.String? = null + val name: kotlin.String ) : Serializable { companion object { private const val serialVersionUID: Long = 123 diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt index 9697f07d5bf..dcd2c68d4fa 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt @@ -29,22 +29,22 @@ import java.io.Serializable data class User ( @Json(name = "id") - val id: kotlin.Long? = null, + val id: kotlin.Long, @Json(name = "username") - val username: kotlin.String? = null, + val username: kotlin.String, @Json(name = "firstName") - val firstName: kotlin.String? = null, + val firstName: kotlin.String, @Json(name = "lastName") - val lastName: kotlin.String? = null, + val lastName: kotlin.String, @Json(name = "email") - val email: kotlin.String? = null, + val email: kotlin.String, @Json(name = "password") - val password: kotlin.String? = null, + val password: kotlin.String, @Json(name = "phone") - val phone: kotlin.String? = null, + val phone: kotlin.String, /* User Status */ @Json(name = "userStatus") - val userStatus: kotlin.Int? = null + val userStatus: kotlin.Int ) : Serializable { companion object { private const val serialVersionUID: Long = 123 -- GitLab