diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 607daa0f8de..a06f6689bba 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -5,7 +5,7 @@ {{/vars}} */{{#discriminator}} {{>typeInfoAnnotation}}{{/discriminator}} -{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}data class {{classname}} ( +{{#discriminator}}interface {{classname}}{{/discriminator}}{{^discriminator}}data class {{classname}}( {{#requiredVars}} {{>dataClassReqVar}}{{^-last}}, {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}}, 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 0f5001411af..dd139bd63bb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,5 +1,5 @@ {{#useBeanValidation}}{{#required}} - {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} - @Deprecated(message=""){{/deprecated}} - @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}}{{#deprecated}} + @Deprecated(message = ""){{/deprecated}} + @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache index 0fbccc8975f..2b2682033c1 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{#required}} - {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} - @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/isReadOnly}} \ No newline at end of file + {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} + @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/isReadOnly}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache index d85b8396fa5..5ccfb771530 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/exceptions.mustache @@ -17,13 +17,13 @@ class DefaultExceptionHandler { @ExceptionHandler(value = [ApiException::class]) fun onApiException(ex: ApiException, response: HttpServletResponse): Unit = - response.sendError(ex.code, ex.message) + response.sendError(ex.code, ex.message) @ExceptionHandler(value = [NotImplementedError::class]) fun onNotImplemented(ex: NotImplementedError, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) + response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) @ExceptionHandler(value = [ConstraintViolationException::class]) fun onConstraintViolation(ex: ConstraintViolationException, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) + response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index e4955748d3e..bfbf77eb7fa 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt index 4be27d19748..54ee92921f2 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Category.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Category ( +data class Category( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt index ee034530c63..2320d0f393a 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param name Updated name of the pet * @param status Updated status of the pet */ -data class InlineObject ( +data class InlineObject( - @ApiModelProperty(example = "null", value = "Updated name of the pet") - @JsonProperty("name") val name: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Updated name of the pet") + @JsonProperty("name") val name: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "Updated status of the pet") - @JsonProperty("status") val status: kotlin.String? = null + @ApiModelProperty(example = "null", value = "Updated status of the pet") + @JsonProperty("status") val status: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt index a289d8c05f7..5443aa323fd 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param additionalMetadata Additional data to pass to server * @param file file to upload */ -data class InlineObject1 ( +data class InlineObject1( - @ApiModelProperty(example = "null", value = "Additional data to pass to server") - @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Additional data to pass to server") + @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "file to upload") - @JsonProperty("file") val file: org.springframework.core.io.Resource? = null + @ApiModelProperty(example = "null", value = "file to upload") + @JsonProperty("file") val file: org.springframework.core.io.Resource? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 0e86b28e937..a49f0aea068 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -17,16 +17,16 @@ import io.swagger.annotations.ApiModelProperty * @param type * @param message */ -data class ModelApiResponse ( +data class ModelApiResponse( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt index 08726893f7d..0e12d03b1f8 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Order.kt @@ -21,25 +21,25 @@ import io.swagger.annotations.ApiModelProperty * @param status Order Status * @param complete */ -data class Order ( +data class Order( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "null", value = "Order Status") - @JsonProperty("status") val status: Order.Status? = null, + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: kotlin.Boolean? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt index 4a2e9d26cb9..5d3acb0d2ea 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Pet.kt @@ -16,34 +16,34 @@ import io.swagger.annotations.ApiModelProperty /** * A pet for sale in the pet store - * @param id - * @param category * @param name * @param photoUrls + * @param id + * @param category * @param tags * @param status pet status in the store */ -data class Pet ( +data class Pet( - @get:NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: kotlin.String, + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: kotlin.String, - @get:NotNull - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") val category: Category? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: kotlin.collections.List? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: kotlin.collections.List? = null, - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") val status: Pet.Status? = null + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt index df04dcd035d..5c6ec4d2968 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/Tag.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Tag ( +data class Tag( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt index 619b2e7c2c3..6f2e9f739ab 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/model/User.kt @@ -22,31 +22,31 @@ import io.swagger.annotations.ApiModelProperty * @param phone * @param userStatus User Status */ -data class User ( +data class User( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION index e4955748d3e..bfbf77eb7fa 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt index 4d8400902aa..44190af7a01 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/Exceptions.kt @@ -17,13 +17,13 @@ class DefaultExceptionHandler { @ExceptionHandler(value = [ApiException::class]) fun onApiException(ex: ApiException, response: HttpServletResponse): Unit = - response.sendError(ex.code, ex.message) + response.sendError(ex.code, ex.message) @ExceptionHandler(value = [NotImplementedError::class]) fun onNotImplemented(ex: NotImplementedError, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) + response.sendError(HttpStatus.NOT_IMPLEMENTED.value()) @ExceptionHandler(value = [ConstraintViolationException::class]) fun onConstraintViolation(ex: ConstraintViolationException, response: HttpServletResponse): Unit = - response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) + response.sendError(HttpStatus.BAD_REQUEST.value(), ex.constraintViolations.joinToString(", ") { it.message }) } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt index 4be27d19748..54ee92921f2 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Category.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Category ( +data class Category( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, @get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt index ee034530c63..2320d0f393a 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param name Updated name of the pet * @param status Updated status of the pet */ -data class InlineObject ( +data class InlineObject( - @ApiModelProperty(example = "null", value = "Updated name of the pet") - @JsonProperty("name") val name: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Updated name of the pet") + @JsonProperty("name") val name: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "Updated status of the pet") - @JsonProperty("status") val status: kotlin.String? = null + @ApiModelProperty(example = "null", value = "Updated status of the pet") + @JsonProperty("status") val status: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt index a289d8c05f7..5443aa323fd 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/InlineObject1.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param additionalMetadata Additional data to pass to server * @param file file to upload */ -data class InlineObject1 ( +data class InlineObject1( - @ApiModelProperty(example = "null", value = "Additional data to pass to server") - @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "Additional data to pass to server") + @JsonProperty("additionalMetadata") val additionalMetadata: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "file to upload") - @JsonProperty("file") val file: org.springframework.core.io.Resource? = null + @ApiModelProperty(example = "null", value = "file to upload") + @JsonProperty("file") val file: org.springframework.core.io.Resource? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt index 0e86b28e937..a49f0aea068 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/ModelApiResponse.kt @@ -17,16 +17,16 @@ import io.swagger.annotations.ApiModelProperty * @param type * @param message */ -data class ModelApiResponse ( +data class ModelApiResponse( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("code") val code: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("code") val code: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("type") val type: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("type") val type: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("message") val message: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("message") val message: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt index 08726893f7d..0e12d03b1f8 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Order.kt @@ -21,25 +21,25 @@ import io.swagger.annotations.ApiModelProperty * @param status Order Status * @param complete */ -data class Order ( +data class Order( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("petId") val petId: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("petId") val petId: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("quantity") val quantity: kotlin.Int? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("quantity") val quantity: kotlin.Int? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("shipDate") val shipDate: java.time.OffsetDateTime? = null, - @ApiModelProperty(example = "null", value = "Order Status") - @JsonProperty("status") val status: Order.Status? = null, + @ApiModelProperty(example = "null", value = "Order Status") + @JsonProperty("status") val status: Order.Status? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("complete") val complete: kotlin.Boolean? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("complete") val complete: kotlin.Boolean? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt index 4a2e9d26cb9..5d3acb0d2ea 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Pet.kt @@ -16,34 +16,34 @@ import io.swagger.annotations.ApiModelProperty /** * A pet for sale in the pet store - * @param id - * @param category * @param name * @param photoUrls + * @param id + * @param category * @param tags * @param status pet status in the store */ -data class Pet ( +data class Pet( - @get:NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") - @JsonProperty("name") val name: kotlin.String, + @get:NotNull + @ApiModelProperty(example = "doggie", required = true, value = "") + @JsonProperty("name") val name: kotlin.String, - @get:NotNull - @ApiModelProperty(example = "null", required = true, value = "") - @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, + @get:NotNull + @ApiModelProperty(example = "null", required = true, value = "") + @JsonProperty("photoUrls") val photoUrls: kotlin.collections.List, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("category") val category: Category? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("category") val category: Category? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("tags") val tags: kotlin.collections.List? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("tags") val tags: kotlin.collections.List? = null, - @ApiModelProperty(example = "null", value = "pet status in the store") - @JsonProperty("status") val status: Pet.Status? = null + @ApiModelProperty(example = "null", value = "pet status in the store") + @JsonProperty("status") val status: Pet.Status? = null ) { /** diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt index df04dcd035d..5c6ec4d2968 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/Tag.kt @@ -16,13 +16,13 @@ import io.swagger.annotations.ApiModelProperty * @param id * @param name */ -data class Tag ( +data class Tag( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("name") val name: kotlin.String? = null + @ApiModelProperty(example = "null", value = "") + @JsonProperty("name") val name: kotlin.String? = null ) { } diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt index 619b2e7c2c3..6f2e9f739ab 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/model/User.kt @@ -22,31 +22,31 @@ import io.swagger.annotations.ApiModelProperty * @param phone * @param userStatus User Status */ -data class User ( +data class User( - @ApiModelProperty(example = "null", value = "") - @JsonProperty("id") val id: kotlin.Long? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("id") val id: kotlin.Long? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("username") val username: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("username") val username: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("firstName") val firstName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("firstName") val firstName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("lastName") val lastName: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("lastName") val lastName: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("email") val email: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("email") val email: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("password") val password: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("password") val password: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "") - @JsonProperty("phone") val phone: kotlin.String? = null, + @ApiModelProperty(example = "null", value = "") + @JsonProperty("phone") val phone: kotlin.String? = null, - @ApiModelProperty(example = "null", value = "User Status") - @JsonProperty("userStatus") val userStatus: kotlin.Int? = null + @ApiModelProperty(example = "null", value = "User Status") + @JsonProperty("userStatus") val userStatus: kotlin.Int? = null ) { }