diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Category.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Category.kt index 7647c2d227e0..9d8571921384 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Category.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Category.kt @@ -12,17 +12,19 @@ package org.openapitools.server.models -import kotlinx.serialization.Serializable +import java.io.Serializable /** * A category for a pet * @param id * @param name */ -@Serializable data class Category( val id: kotlin.Long? = null, val name: kotlin.String? = null -) +) : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt index e16d42e86a4e..5548175d9048 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/ModelApiResponse.kt @@ -12,19 +12,21 @@ package org.openapitools.server.models -import kotlinx.serialization.Serializable +import java.io.Serializable /** * Describes the result of uploading an image resource * @param code * @param type * @param message */ -@Serializable data class ModelApiResponse( val code: kotlin.Int? = null, val type: kotlin.String? = null, val message: kotlin.String? = null -) +) : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Order.kt index a75a759f7a93..79dce95e1e47 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Order.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Order.kt @@ -12,7 +12,7 @@ package org.openapitools.server.models -import kotlinx.serialization.Serializable +import java.io.Serializable /** * An order for a pets from the pet store * @param id @@ -22,7 +22,6 @@ import kotlinx.serialization.Serializable * @param status Order Status * @param complete */ -@Serializable data class Order( val id: kotlin.Long? = null, val petId: kotlin.Long? = null, @@ -31,8 +30,11 @@ data class Order( /* Order Status */ val status: Order.Status? = null, val complete: kotlin.Boolean? = false -) +) : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } /** * Order Status * Values: placed,approved,delivered diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Pet.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Pet.kt index 8fe934cc3ff3..8b98ce0469c5 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Pet.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Pet.kt @@ -14,7 +14,7 @@ package org.openapitools.server.models import org.openapitools.server.models.Category import org.openapitools.server.models.Tag -import kotlinx.serialization.Serializable +import java.io.Serializable /** * A pet for sale in the pet store * @param name @@ -24,7 +24,6 @@ import kotlinx.serialization.Serializable * @param tags * @param status pet status in the store */ -@Serializable data class Pet( val name: kotlin.String, val photoUrls: kotlin.collections.List, @@ -33,8 +32,11 @@ data class Pet( val tags: kotlin.collections.List? = null, /* pet status in the store */ val status: Pet.Status? = null -) +) : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } /** * pet status in the store * Values: available,pending,sold diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Tag.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Tag.kt index fae4d9d0ba3c..e9626b25c6d1 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Tag.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/Tag.kt @@ -12,17 +12,19 @@ package org.openapitools.server.models -import kotlinx.serialization.Serializable +import java.io.Serializable /** * A tag for a pet * @param id * @param name */ -@Serializable data class Tag( val id: kotlin.Long? = null, val name: kotlin.String? = null -) +) : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } } diff --git a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/User.kt b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/User.kt index af04fd61c1cf..fdbdb4e1cff4 100644 --- a/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/User.kt +++ b/samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/models/User.kt @@ -12,7 +12,7 @@ package org.openapitools.server.models -import kotlinx.serialization.Serializable +import java.io.Serializable /** * A User who is purchasing from the pet store * @param id @@ -24,7 +24,6 @@ import kotlinx.serialization.Serializable * @param phone * @param userStatus User Status */ -@Serializable data class User( val id: kotlin.Long? = null, val username: kotlin.String? = null, @@ -35,7 +34,10 @@ data class User( val phone: kotlin.String? = null, /* User Status */ val userStatus: kotlin.Int? = null -) +) : Serializable { + companion object { + private const val serialVersionUID: Long = 123 + } }