diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md
index 54e62dcf208..942ccd478a1 100644
--- a/docs/generators/kotlin-server.md
+++ b/docs/generators/kotlin-server.md
@@ -16,7 +16,7 @@ sidebar_label: kotlin-server
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
-|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
+|serializableModel|boolean - toggle "implements java.io.Serializable" for generated models| |null|
|library|library template (sub-template)|
- **ktor**
- ktor framework
|ktor|
|featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true|
|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false|
diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md
index 03e2d0dd1fc..b73ca814c06 100644
--- a/docs/generators/kotlin-vertx.md
+++ b/docs/generators/kotlin-vertx.md
@@ -16,4 +16,4 @@ sidebar_label: kotlin-vertx
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
-|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
+|serializableModel|boolean - toggle "implements java.io.Serializable" for generated models| |null|
diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md
index 719ed37accb..5ccffd462be 100644
--- a/docs/generators/kotlin.md
+++ b/docs/generators/kotlin.md
@@ -16,7 +16,7 @@ sidebar_label: kotlin
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi|
|parcelizeModels|toggle "@Parcelize" for generated models| |null|
-|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
+|serializableModel|boolean - toggle "implements java.io.Serializable" for generated models| |null|
|dateLibrary|Option. Date library to use|- **string**
- String
- **java8**
- Java 8 native JSR310 (jvm only)
- **threetenbp**
- Threetenbp (jvm only)
|java8|
|collectionType|Option. Collection type to use|- **array**
- kotlin.Array
- **list**
- kotlin.collections.List
|array|
|library|Library template (sub-template) to use|- **jvm**
- Platform: Java Virtual Machine. HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1.
- **multiplatform**
- Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
index fa6d51ffb00..cc77584dfc1 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java
@@ -248,6 +248,9 @@ public class CodegenConstants {
public static final String CASE_INSENSITIVE_RESPONSE_HEADERS = "caseInsensitiveResponseHeaders";
public static final String CASE_INSENSITIVE_RESPONSE_HEADERS_DESC = "Make API response's headers case-insensitive";
+ public static final String NEEDS_DATACLASS_BODY = "needsDataClassBody";
+ public static final String NEEDS_DATACLASS_BODY_DESC = "Specifies if the kotlin data class needs a body with curly braces or not.";
+
// Not user-configurable. System provided for use in templates.
public static final String GENERATE_APIS = "generateApis";
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
index da9f4f14192..03cd06a017f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
@@ -24,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenConstants;
+import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger;
@@ -31,12 +32,14 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.*;
+import java.util.stream.Collectors;
import static org.openapitools.codegen.utils.StringUtils.*;
public abstract class AbstractKotlinCodegen extends DefaultCodegen implements CodegenConfig {
public static final String SERIALIZATION_LIBRARY_DESC = "What serialization library to use: 'moshi' (default), or 'gson'";
+
public enum SERIALIZATION_LIBRARY_TYPE {moshi, gson}
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractKotlinCodegen.class);
@@ -53,8 +56,9 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
protected String apiDocPath = "docs/";
protected String modelDocPath = "docs/";
protected boolean parcelizeModels = false;
-
protected boolean serializableModel = false;
+ protected boolean needsDataClassBody = false;
+ protected boolean hasEnums = false;
protected CodegenConstants.ENUM_PROPERTY_NAMING_TYPE enumPropertyNaming = CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.camelCase;
protected SERIALIZATION_LIBRARY_TYPE serializationLibrary = SERIALIZATION_LIBRARY_TYPE.moshi;
@@ -426,6 +430,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
additionalProperties.put(CodegenConstants.PARCELIZE_MODELS, parcelizeModels);
}
+ additionalProperties.put(CodegenConstants.NEEDS_DATACLASS_BODY, this.hasEnums || serializableModel);
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage());
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage());
@@ -476,6 +481,15 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
public void setSerializableModel(boolean serializableModel) {
this.serializableModel = serializableModel;
}
+
+ public boolean isNeedsDataClassBody() {
+ return needsDataClassBody;
+ }
+
+ public void setNeedsDataClassBody(boolean needsDataClassBody) {
+ this.needsDataClassBody = needsDataClassBody;
+ }
+
/**
* Return the sanitized variable name for enum
*
@@ -746,6 +760,15 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
return imports;
}
+ @Override
+ public CodegenModel fromModel(String name, Schema schema) {
+ CodegenModel m = super.fromModel(name, schema);
+ m.optionalVars = m.optionalVars.stream().distinct().collect(Collectors.toList());
+ m.allVars.stream().filter(p -> !m.vars.contains(p)).forEach(p -> p.isInherited = true);
+ this.hasEnums = m.hasEnums;
+ return m;
+ }
+
@Override
public String toEnumValue(String value, String datatype) {
if ("kotlin.Int".equals(datatype) || "kotlin.Long".equals(datatype)) {
diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
index 1cb58bb49e9..d23344f59d7 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
@@ -37,8 +37,12 @@ data class {{classname}} (
) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}
{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}}
{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}}
-{{#hasEnums}}
-{
+{{#needsDataClassBody}}{{=<% %>=}}{<%={{ }}=%>{{/needsDataClassBody}}
+{{#serializableModel}}
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+{{/serializableModel}}{{#hasEnums}}
{{#vars}}{{#isEnum}}
/**
* {{{description}}}
@@ -65,5 +69,4 @@ data class {{classname}} (
{{/multiplatform}}
}
{{/isEnum}}{{/vars}}
-}
-{{/hasEnums}}
+{{/hasEnums}}{{#needsDataClassBody}}{{=<% %>=}}}<%={{ }}=%>{{/needsDataClassBody}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache
index fe88e433f20..eb5b0d565ee 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache
@@ -21,11 +21,15 @@ data class {{classname}} (
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}},
{{/-last}}{{/optionalVars}}
-) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}
-{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}}
-{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}}
-{
-{{#hasEnums}}{{#vars}}{{#isEnum}}
+) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}}{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}}
+{{#needsDataClassBody}}{{=<% %>=}}{<%={{ }}=%>{{/needsDataClassBody}}
+{{#serializableModel}}
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+{{/serializableModel}}
+{{#hasEnums}}
+ {{#vars}}{{#isEnum}}
/**
* {{{description}}}
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
@@ -35,5 +39,4 @@ data class {{classname}} (
{{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
{{/enumVars}}{{/allowableValues}}
}
-{{/isEnum}}{{/vars}}{{/hasEnums}}
-}
+{{/isEnum}}{{/vars}}{{/hasEnums}}{{#needsDataClassBody}}{{=<% %>=}}}<%={{ }}=%>{{/needsDataClassBody}}
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 3f05f17779e..831b50ef770 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
@@ -29,3 +29,5 @@ data class ApiResponse (
+
+
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 eff7d12a4ab..2f08fc27d6b 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
@@ -27,3 +27,5 @@ data class Category (
+
+
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 76b9cf068ed..57ebfbf1a67 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
@@ -35,7 +35,8 @@ data class Order (
)
-{
+
+
/**
* Order Status
@@ -54,5 +55,5 @@ data class Order (
object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value }.toTypedArray())
}
-}
+
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 145683fe578..1e0d08a1b85 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
@@ -37,7 +37,8 @@ data class Pet (
)
-{
+
+
/**
* pet status in the store
@@ -56,5 +57,5 @@ data class Pet (
object Serializer : CommonEnumSerializer("Status", values(), values().map { it.value }.toTypedArray())
}
-}
+
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 6c5ce642e78..29ebfaf424f 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
@@ -27,3 +27,5 @@ data class Tag (
+
+
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 dd092dfd707..78d48510ade 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
@@ -40,3 +40,5 @@ data class User (
+
+
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 6d5c231ccc8..8d5c8448f04 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
@@ -31,4 +31,9 @@ data class ApiResponse (
)
: 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 1fe92af826c..7895d7627ab 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
@@ -28,4 +28,9 @@ data class Category (
)
: 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 81cc2b0940b..451109b15f5 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
@@ -42,6 +42,10 @@ data class Order (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* Order Status
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 3b4dfc22abd..9771dda248c 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
@@ -44,6 +44,10 @@ data class Pet (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* pet status in the store
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 1d97954c460..7fb74357125 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
@@ -28,4 +28,9 @@ data class Tag (
)
: 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 df835a5d968..e66f3cf09fe 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
@@ -47,4 +47,9 @@ data class User (
)
: 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 47766821f18..90b60bdccfc 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
@@ -31,3 +31,5 @@ data class ApiResponse (
+
+
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 edb16cc1270..f28b1fa2cdd 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
@@ -28,3 +28,5 @@ data class Category (
+
+
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 af6dcb45604..800a7fd6406 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
@@ -40,7 +40,8 @@ data class Order (
)
-{
+
+
/**
* Order Status
@@ -58,5 +59,5 @@ data class Order (
}
-}
+
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 8015b6dab72..a85f990e1e8 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
@@ -42,7 +42,8 @@ data class Pet (
)
-{
+
+
/**
* pet status in the store
@@ -60,5 +61,5 @@ data class Pet (
}
-}
+
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 05dc7c9afef..16c40f6039c 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
@@ -28,3 +28,5 @@ data class Tag (
+
+
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 537b01d3c27..bb6442aefcb 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
@@ -47,3 +47,5 @@ data class User (
+
+
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 6d5c231ccc8..8d5c8448f04 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
@@ -31,4 +31,9 @@ data class ApiResponse (
)
: 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 1fe92af826c..7895d7627ab 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
@@ -28,4 +28,9 @@ data class Category (
)
: 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 a5478a61626..2e883cccdd0 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
@@ -42,6 +42,10 @@ data class Order (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* Order Status
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 3b4dfc22abd..9771dda248c 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
@@ -44,6 +44,10 @@ data class Pet (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* pet status in the store
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 1d97954c460..7fb74357125 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
@@ -28,4 +28,9 @@ data class Tag (
)
: 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 df835a5d968..e66f3cf09fe 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
@@ -47,4 +47,9 @@ data class User (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION b/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION
index d99e7162d01..0e97bd19efb 100644
--- a/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/kotlin/.openapi-generator/VERSION
@@ -1 +1 @@
-5.0.0-SNAPSHOT
\ No newline at end of file
+4.1.3-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt
index 4367965e2dc..fe775011a95 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/AdditionalPropertiesClass.kt
@@ -28,4 +28,9 @@ data class AdditionalPropertiesClass (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt
index ba590f165b8..188e1ddc708 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Animal.kt
@@ -28,4 +28,9 @@ data class Animal (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
index 22773e65057..6df7feef3d9 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt
@@ -31,4 +31,9 @@ data class ApiResponse (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt
index 5c9048466e0..7a302b510f4 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfArrayOfNumberOnly.kt
@@ -25,4 +25,9 @@ data class ArrayOfArrayOfNumberOnly (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt
index 214ef4b0cfe..f8b5404b7e1 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayOfNumberOnly.kt
@@ -25,4 +25,9 @@ data class ArrayOfNumberOnly (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt
index d406e97bf71..1831ecc889a 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ArrayTest.kt
@@ -32,4 +32,9 @@ data class ArrayTest (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt
index c9153d08cc2..c478ffe9180 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Capitalization.kt
@@ -41,4 +41,9 @@ data class Capitalization (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt
index 05c1647fb79..48c9727de07 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Cat.kt
@@ -31,4 +31,9 @@ data class Cat (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt
index c4cb55cb62c..37bc7add21f 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt
@@ -25,4 +25,9 @@ data class CatAllOf (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt
index f3280e75d4c..61dc86df218 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Category.kt
@@ -28,4 +28,9 @@ data class Category (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt
index 7580a49224f..17228f01f48 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ClassModel.kt
@@ -25,4 +25,9 @@ data class ClassModel (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt
index 09324d61a09..c0f91b21a9d 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Client.kt
@@ -25,4 +25,9 @@ data class Client (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt
index 54a2bb6feaf..22414a0efd1 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Dog.kt
@@ -31,4 +31,9 @@ data class Dog (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt
index 6085540ff7f..086ee4c6a0d 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt
@@ -25,4 +25,9 @@ data class DogAllOf (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt
index 79b1a4c1018..c0e6c30e55e 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumArrays.kt
@@ -29,6 +29,10 @@ data class EnumArrays (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
*
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt
index 52ea113cc92..53b05926f1e 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/EnumTest.kt
@@ -51,6 +51,10 @@ data class EnumTest (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
*
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt
index ab39639e0cc..7deb80853b3 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FileSchemaTestClass.kt
@@ -28,4 +28,9 @@ data class FileSchemaTestClass (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt
index 0dd32c21afb..57925fce832 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Foo.kt
@@ -25,4 +25,9 @@ data class Foo (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt
index e746da485f9..2b587f520d2 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/FormatTest.kt
@@ -69,4 +69,9 @@ data class FormatTest (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
index 04eef4d206b..949cb4e5b80 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HasOnlyReadOnly.kt
@@ -28,4 +28,9 @@ data class HasOnlyReadOnly (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
index ce497df1fca..57c37e9dc60 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/HealthCheckResult.kt
@@ -25,4 +25,9 @@ data class HealthCheckResult (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt
index f2f290f4081..91689261680 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject.kt
@@ -30,4 +30,9 @@ data class InlineObject (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
index ea1e3ae2411..7e996c6a4fc 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject1.kt
@@ -30,4 +30,9 @@ data class InlineObject1 (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
index ec48e39edf2..16b100cac2d 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject2.kt
@@ -31,6 +31,10 @@ data class InlineObject2 (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* Form parameter enum test (string array)
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
index b2725c7fc12..aacdc7583fc 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject3.kt
@@ -78,4 +78,9 @@ data class InlineObject3 (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
index f6776d3b7fc..58674757a7b 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject4.kt
@@ -30,4 +30,9 @@ data class InlineObject4 (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
index 0497fa03e67..0c7c601bd7d 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineObject5.kt
@@ -30,4 +30,9 @@ data class InlineObject5 (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
index b09c724605e..de26c4e00b4 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/InlineResponseDefault.kt
@@ -26,4 +26,9 @@ data class InlineResponseDefault (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt
index 43f321eabcb..c24ed15deac 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/List.kt
@@ -16,13 +16,18 @@ import com.squareup.moshi.Json
import java.io.Serializable
/**
*
- * @param ``123minusList``
+ * @param `123minusList`
*/
data class List (
@Json(name = "123-list")
- val ``123minusList``: kotlin.String? = null
+ val `123minusList`: kotlin.String? = null
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt
index bf1aa56a158..d877a29bfd9 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MapTest.kt
@@ -35,6 +35,10 @@ data class MapTest (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
*
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt
index 1551efc4c2a..21d8a098101 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/MixedPropertiesAndAdditionalPropertiesClass.kt
@@ -32,4 +32,9 @@ data class MixedPropertiesAndAdditionalPropertiesClass (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt
index bb071875225..542405de963 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Model200Response.kt
@@ -28,4 +28,9 @@ data class Model200Response (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt
index 1362bd97c1b..99df32389af 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Name.kt
@@ -19,7 +19,7 @@ import java.io.Serializable
* @param name
* @param snakeCase
* @param property
- * @param ``123number``
+ * @param `123number`
*/
data class Name (
@@ -30,8 +30,13 @@ data class Name (
@Json(name = "property")
val property: kotlin.String? = null,
@Json(name = "123Number")
- val ``123number``: kotlin.Int? = null
+ val `123number`: kotlin.Int? = null
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt
index 7bfd1d97c1a..afc8d24463f 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NullableClass.kt
@@ -58,4 +58,9 @@ data class NullableClass (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt
index d14ad1907e1..15c8dfdcf56 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/NumberOnly.kt
@@ -25,4 +25,9 @@ data class NumberOnly (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
index 07459585e99..db8d8a57bdd 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
@@ -42,6 +42,10 @@ data class Order (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* Order Status
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt
index 21565c2cff3..2d2fd9b1c6d 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/OuterComposite.kt
@@ -31,4 +31,9 @@ data class OuterComposite (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
index 23abc63ce39..f687d449014 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Pet.kt
@@ -44,6 +44,10 @@ data class Pet (
: Serializable
{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+
/**
* pet status in the store
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt
index 325a4c5ffd8..7265237f9b1 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/ReadOnlyFirst.kt
@@ -28,4 +28,9 @@ data class ReadOnlyFirst (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt
index 6670a26a8f9..4ee2459c1cf 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Return.kt
@@ -16,13 +16,18 @@ import com.squareup.moshi.Json
import java.io.Serializable
/**
* Model for testing reserved words
- * @param ``return``
+ * @param `return`
*/
data class Return (
@Json(name = "return")
- val ``return``: kotlin.Int? = null
+ val `return`: kotlin.Int? = null
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt
index 2bcfeb506eb..b6161bcfd65 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/SpecialModelname.kt
@@ -25,4 +25,9 @@ data class SpecialModelname (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt
index 7596c7d495d..13667abe035 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Tag.kt
@@ -28,4 +28,9 @@ data class Tag (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt
index d6bd140f13a..4443da984df 100644
--- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt
+++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/User.kt
@@ -47,4 +47,9 @@ data class User (
)
: Serializable
+{
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+}
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 06b5019af3f..0e97bd19efb 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.0.1-SNAPSHOT
\ No newline at end of file
+4.1.3-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts b/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts
index f62d3f33c8d..f4561be14be 100644
--- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts
+++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/build.gradle.kts
@@ -43,9 +43,11 @@ dependencies {
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-xml")
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
+ testCompile("org.jetbrains.kotlin:kotlin-test-junit5")
testCompile("org.springframework.boot:spring-boot-starter-test") {
exclude(module = "junit")
}
+ testCompile("org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion")
}
repositories {
diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml b/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml
index 1932017d4bf..b0a954d4707 100644
--- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml
+++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/pom.xml
@@ -96,6 +96,12 @@
swagger-annotations
1.5.21
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
com.fasterxml.jackson.dataformat
jackson-dataformat-yaml
@@ -117,6 +123,12 @@
javax.validation
validation-api
+
+ org.jetbrains.kotlin
+ kotlin-test-junit5
+ 1.3.31
+ test
+
diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt
index 29de43b1a02..c0aeae1a41c 100644
--- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt
+++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApi.kt
@@ -45,142 +45,141 @@ import kotlin.collections.Map
class PetApiController(@Autowired(required = true) val service: PetApiService) {
@ApiOperation(
- value = "Add a new pet to the store",
- nickname = "addPet",
- notes = "",
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "Add a new pet to the store",
+ nickname = "addPet",
+ notes = "",
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 405, message = "Invalid input")])
+ value = [ApiResponse(code = 405, message = "Invalid input")])
@RequestMapping(
- value = ["/pet"],
- consumes = ["application/json", "application/xml"],
- method = [RequestMethod.POST])
+ value = ["/pet"],
+ consumes = ["application/json", "application/xml"],
+ method = [RequestMethod.POST])
suspend fun addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet
): ResponseEntity {
- return ResponseEntity(service.addPet(pet), HttpStatus.OK)
+ return ResponseEntity(service.addPet(pet), HttpStatus.valueOf(405))
}
@ApiOperation(
- value = "Deletes a pet",
- nickname = "deletePet",
- notes = "",
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "Deletes a pet",
+ nickname = "deletePet",
+ notes = "",
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 400, message = "Invalid pet value")])
+ value = [ApiResponse(code = 400, message = "Invalid pet value")])
@RequestMapping(
- value = ["/pet/{petId}"],
- method = [RequestMethod.DELETE])
- suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: Long
-,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: String?
+ value = ["/pet/{petId}"],
+ method = [RequestMethod.DELETE])
+ suspend fun deletePet(@ApiParam(value = "Pet id to delete", required=true) @PathVariable("petId") petId: kotlin.Long
+,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) apiKey: kotlin.String?
): ResponseEntity {
- return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.OK)
+ return ResponseEntity(service.deletePet(petId, apiKey), HttpStatus.valueOf(400))
}
@ApiOperation(
- value = "Finds Pets by status",
- nickname = "findPetsByStatus",
- notes = "Multiple status values can be provided with comma separated strings",
- response = Pet::class,
- responseContainer = "List",
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "Finds Pets by status",
+ nickname = "findPetsByStatus",
+ notes = "Multiple status values can be provided with comma separated strings",
+ response = Pet::class,
+ responseContainer = "List",
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")])
+ value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid status value")])
@RequestMapping(
- value = ["/pet/findByStatus"],
- produces = ["application/xml", "application/json"],
- method = [RequestMethod.GET])
- fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: List
+ value = ["/pet/findByStatus"],
+ produces = ["application/xml", "application/json"],
+ method = [RequestMethod.GET])
+ fun findPetsByStatus(@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) status: kotlin.collections.List
): ResponseEntity> {
- return ResponseEntity(service.findPetsByStatus(status), HttpStatus.OK)
+ return ResponseEntity(service.findPetsByStatus(status), HttpStatus.valueOf(200))
}
@ApiOperation(
- value = "Finds Pets by tags",
- nickname = "findPetsByTags",
- notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
- response = Pet::class,
- responseContainer = "List",
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "Finds Pets by tags",
+ nickname = "findPetsByTags",
+ notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+ response = Pet::class,
+ responseContainer = "List",
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")])
+ value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")])
@RequestMapping(
- value = ["/pet/findByTags"],
- produces = ["application/xml", "application/json"],
- method = [RequestMethod.GET])
- fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: List
-,@ApiParam(value = "Maximum number of items to return") @Valid @RequestParam(value = "maxCount", required = false) maxCount: Int?
+ value = ["/pet/findByTags"],
+ produces = ["application/xml", "application/json"],
+ method = [RequestMethod.GET])
+ fun findPetsByTags(@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) tags: kotlin.collections.List
): ResponseEntity> {
- return ResponseEntity(service.findPetsByTags(tags, maxCount), HttpStatus.OK)
+ return ResponseEntity(service.findPetsByTags(tags), HttpStatus.valueOf(200))
}
@ApiOperation(
- value = "Find pet by ID",
- nickname = "getPetById",
- notes = "Returns a single pet",
- response = Pet::class,
- authorizations = [Authorization(value = "api_key")])
+ value = "Find pet by ID",
+ nickname = "getPetById",
+ notes = "Returns a single pet",
+ response = Pet::class,
+ authorizations = [Authorization(value = "api_key")])
@ApiResponses(
- value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")])
+ value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found")])
@RequestMapping(
- value = ["/pet/{petId}"],
- produces = ["application/xml", "application/json"],
- method = [RequestMethod.GET])
- suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: Long
+ value = ["/pet/{petId}"],
+ produces = ["application/xml", "application/json"],
+ method = [RequestMethod.GET])
+ suspend fun getPetById(@ApiParam(value = "ID of pet to return", required=true) @PathVariable("petId") petId: kotlin.Long
): ResponseEntity {
- return ResponseEntity(service.getPetById(petId), HttpStatus.OK)
+ return ResponseEntity(service.getPetById(petId), HttpStatus.valueOf(200))
}
@ApiOperation(
- value = "Update an existing pet",
- nickname = "updatePet",
- notes = "",
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "Update an existing pet",
+ nickname = "updatePet",
+ notes = "",
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")])
+ value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Pet not found"),ApiResponse(code = 405, message = "Validation exception")])
@RequestMapping(
- value = ["/pet"],
- consumes = ["application/json", "application/xml"],
- method = [RequestMethod.PUT])
+ value = ["/pet"],
+ consumes = ["application/json", "application/xml"],
+ method = [RequestMethod.PUT])
suspend fun updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody pet: Pet
): ResponseEntity {
- return ResponseEntity(service.updatePet(pet), HttpStatus.OK)
+ return ResponseEntity(service.updatePet(pet), HttpStatus.valueOf(400))
}
@ApiOperation(
- value = "Updates a pet in the store with form data",
- nickname = "updatePetWithForm",
- notes = "",
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "Updates a pet in the store with form data",
+ nickname = "updatePetWithForm",
+ notes = "",
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 405, message = "Invalid input")])
+ value = [ApiResponse(code = 405, message = "Invalid input")])
@RequestMapping(
- value = ["/pet/{petId}"],
- consumes = ["application/x-www-form-urlencoded"],
- method = [RequestMethod.POST])
- suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: Long
-,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: String?
-,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: String?
+ value = ["/pet/{petId}"],
+ consumes = ["application/x-www-form-urlencoded"],
+ method = [RequestMethod.POST])
+ suspend fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required=true) @PathVariable("petId") petId: kotlin.Long
+,@ApiParam(value = "Updated name of the pet") @RequestParam(value="name", required=false) name: kotlin.String?
+,@ApiParam(value = "Updated status of the pet") @RequestParam(value="status", required=false) status: kotlin.String?
): ResponseEntity {
- return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.OK)
+ return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405))
}
@ApiOperation(
- value = "uploads an image",
- nickname = "uploadFile",
- notes = "",
- response = ModelApiResponse::class,
- authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
+ value = "uploads an image",
+ nickname = "uploadFile",
+ notes = "",
+ response = ModelApiResponse::class,
+ authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])])
@ApiResponses(
- value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)])
+ value = [ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse::class)])
@RequestMapping(
- value = ["/pet/{petId}/uploadImage"],
- produces = ["application/json"],
- consumes = ["multipart/form-data"],
- method = [RequestMethod.POST])
- suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: Long
-,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: String?
+ value = ["/pet/{petId}/uploadImage"],
+ produces = ["application/json"],
+ consumes = ["multipart/form-data"],
+ method = [RequestMethod.POST])
+ suspend fun uploadFile(@ApiParam(value = "ID of pet to update", required=true) @PathVariable("petId") petId: kotlin.Long
+,@ApiParam(value = "Additional data to pass to server") @RequestParam(value="additionalMetadata", required=false) additionalMetadata: kotlin.String?
,@ApiParam(value = "file detail") @Valid @RequestPart("file") file: org.springframework.core.io.Resource?
): ResponseEntity {
- return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.OK)
+ return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200))
}
}
diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt
index 2bd53b2a56d..033bd517c44 100644
--- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt
+++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt
@@ -7,17 +7,17 @@ interface PetApiService {
suspend fun addPet(pet: Pet): Unit
- suspend fun deletePet(petId: Long, apiKey: String?): Unit
+ suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit
- fun findPetsByStatus(status: List): Flow
+ fun findPetsByStatus(status: kotlin.collections.List): Flow
- fun findPetsByTags(tags: List, maxCount: Int?): Flow
+ fun findPetsByTags(tags: kotlin.collections.List): Flow
- suspend fun getPetById(petId: Long): Pet
+ suspend fun getPetById(petId: kotlin.Long): Pet
suspend fun updatePet(pet: Pet): Unit
- suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit
+ suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit
- suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse
+ suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse
}
diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt
index 009f039d860..e6db20b52c9 100644
--- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt
+++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiServiceImpl.kt
@@ -11,19 +11,19 @@ class PetApiServiceImpl : PetApiService {
TODO("Implement me")
}
- override suspend fun deletePet(petId: Long, apiKey: String?): Unit {
+ override suspend fun deletePet(petId: kotlin.Long, apiKey: kotlin.String?): Unit {
TODO("Implement me")
}
- override fun findPetsByStatus(status: List): Flow {
+ override fun findPetsByStatus(status: kotlin.collections.List): Flow {
TODO("Implement me")
}
- override fun findPetsByTags(tags: List, maxCount: Int?): Flow {
+ override fun findPetsByTags(tags: kotlin.collections.List): Flow {
TODO("Implement me")
}
- override suspend fun getPetById(petId: Long): Pet {
+ override suspend fun getPetById(petId: kotlin.Long): Pet {
TODO("Implement me")
}
@@ -31,11 +31,11 @@ class PetApiServiceImpl : PetApiService {
TODO("Implement me")
}
- override suspend fun updatePetWithForm(petId: Long, name: String?, status: String?): Unit {
+ override suspend fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String?, status: kotlin.String?): Unit {
TODO("Implement me")
}
- override suspend fun uploadFile(petId: Long, additionalMetadata: String?, file: org.springframework.core.io.Resource?): ModelApiResponse {
+ override suspend fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String?, file: org.springframework.core.io.Resource?): ModelApiResponse {
TODO("Implement me")
}
}
diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt
index 2ee42a77233..9bbe9fa4665 100644
--- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt
+++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt
@@ -44,66 +44,66 @@ import kotlin.collections.Map
class StoreApiController(@Autowired(required = true) val service: StoreApiService) {
@ApiOperation(
- value = "Delete purchase order by ID",
- nickname = "deleteOrder",
- notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors")
+ value = "Delete purchase order by ID",
+ nickname = "deleteOrder",
+ notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors")
@ApiResponses(
- value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")])
+ value = [ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")])
@RequestMapping(
- value = ["/store/order/{orderId}"],
- method = [RequestMethod.DELETE])
- suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: String
+ value = ["/store/order/{orderId}"],
+ method = [RequestMethod.DELETE])
+ suspend fun deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted", required=true) @PathVariable("orderId") orderId: kotlin.String
): ResponseEntity {
- return ResponseEntity(service.deleteOrder(orderId), HttpStatus.OK)
+ return ResponseEntity(service.deleteOrder(orderId), HttpStatus.valueOf(400))
}
@ApiOperation(
- value = "Returns pet inventories by status",
- nickname = "getInventory",
- notes = "Returns a map of status codes to quantities",
- response = Int::class,
- responseContainer = "Map",
- authorizations = [Authorization(value = "api_key")])
+ value = "Returns pet inventories by status",
+ nickname = "getInventory",
+ notes = "Returns a map of status codes to quantities",
+ response = kotlin.Int::class,
+ responseContainer = "Map",
+ authorizations = [Authorization(value = "api_key")])
@ApiResponses(
- value = [ApiResponse(code = 200, message = "successful operation", response = Map::class, responseContainer = "Map")])
+ value = [ApiResponse(code = 200, message = "successful operation", response = kotlin.collections.Map::class, responseContainer = "Map")])
@RequestMapping(
- value = ["/store/inventory"],
- produces = ["application/json"],
- method = [RequestMethod.GET])
- suspend fun getInventory(): ResponseEntity