From 1b2f12179d4120bbb368bf169afb28d227cbfbf9 Mon Sep 17 00:00:00 2001 From: Jan Skrasek Date: Tue, 12 Nov 2024 21:18:12 +0100 Subject: [PATCH] [kotlin][client] do not generate Serializable(forClass) annotation as the serializer is already defined --- .../src/main/resources/kotlin-client/data_class.mustache | 1 - .../src/main/resources/kotlin-client/enum_class.mustache | 1 - .../jvm-common/infrastructure/AtomicBooleanAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/AtomicIntegerAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/AtomicLongAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/BigDecimalAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/BigIntegerAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/LocalDateAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/LocalDateTimeAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/OffsetDateTimeAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/StringBuilderAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/URIAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/URLAdapter.kt.mustache | 2 -- .../jvm-common/infrastructure/UUIDAdapter.kt.mustache | 2 -- .../openapitools/client/infrastructure/AtomicBooleanAdapter.kt | 2 -- .../openapitools/client/infrastructure/AtomicIntegerAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/AtomicLongAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/BigDecimalAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/BigIntegerAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/LocalDateAdapter.kt | 2 -- .../openapitools/client/infrastructure/LocalDateTimeAdapter.kt | 2 -- .../openapitools/client/infrastructure/OffsetDateTimeAdapter.kt | 2 -- .../openapitools/client/infrastructure/StringBuilderAdapter.kt | 2 -- .../kotlin/org/openapitools/client/infrastructure/URIAdapter.kt | 2 -- .../kotlin/org/openapitools/client/infrastructure/URLAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/UUIDAdapter.kt | 2 -- .../src/main/kotlin/org/openapitools/client/models/Order.kt | 1 - .../src/main/kotlin/org/openapitools/client/models/Pet.kt | 1 - .../openapitools/client/infrastructure/AtomicBooleanAdapter.kt | 2 -- .../openapitools/client/infrastructure/AtomicIntegerAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/AtomicLongAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/BigDecimalAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/BigIntegerAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/LocalDateAdapter.kt | 2 -- .../openapitools/client/infrastructure/LocalDateTimeAdapter.kt | 2 -- .../openapitools/client/infrastructure/OffsetDateTimeAdapter.kt | 2 -- .../openapitools/client/infrastructure/StringBuilderAdapter.kt | 2 -- .../kotlin/org/openapitools/client/infrastructure/URIAdapter.kt | 2 -- .../kotlin/org/openapitools/client/infrastructure/URLAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/UUIDAdapter.kt | 2 -- .../openapitools/client/infrastructure/AtomicBooleanAdapter.kt | 2 -- .../openapitools/client/infrastructure/AtomicIntegerAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/AtomicLongAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/BigDecimalAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/BigIntegerAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/LocalDateAdapter.kt | 2 -- .../openapitools/client/infrastructure/LocalDateTimeAdapter.kt | 2 -- .../openapitools/client/infrastructure/OffsetDateTimeAdapter.kt | 2 -- .../openapitools/client/infrastructure/StringBuilderAdapter.kt | 2 -- .../kotlin/org/openapitools/client/infrastructure/URIAdapter.kt | 2 -- .../kotlin/org/openapitools/client/infrastructure/URLAdapter.kt | 2 -- .../org/openapitools/client/infrastructure/UUIDAdapter.kt | 2 -- .../src/main/kotlin/org/openapitools/client/models/PetEnum.kt | 1 - 53 files changed, 101 deletions(-) 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 7da269811587..d95ce9403467 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 @@ -146,7 +146,6 @@ import {{packageName}}.infrastructure.ITransformForStorage {{#kotlinx_serialization}} {{#enumUnknownDefaultCase}} - @Serializer(forClass = {{{nameInPascalCase}}}::class) internal object {{nameInPascalCase}}Serializer : KSerializer<{{nameInPascalCase}}> { override val descriptor = {{{dataType}}}.serializer().descriptor diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache index a05b071d90a6..dd18d6e572dd 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache @@ -97,7 +97,6 @@ import kotlinx.serialization.* } }{{#kotlinx_serialization}}{{#enumUnknownDefaultCase}} -@Serializer(forClass = {{classname}}::class) internal object {{classname}}Serializer : KSerializer<{{classname}}> { override val descriptor = {{{dataType}}}.serializer().descriptor diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicBooleanAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicBooleanAdapter.kt.mustache index 4bdd86a134b3..4685f21aee18 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicBooleanAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicBooleanAdapter.kt.mustache @@ -1,7 +1,6 @@ package {{packageName}}.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicBoolean -@Serializer(forClass = AtomicBoolean::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object AtomicBooleanAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicBoolean) { encoder.encodeBoolean(value.get()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicIntegerAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicIntegerAdapter.kt.mustache index 592145434cc4..33c129898e1e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicIntegerAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicIntegerAdapter.kt.mustache @@ -1,7 +1,6 @@ package {{packageName}}.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicInteger -@Serializer(forClass = AtomicInteger::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object AtomicIntegerAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicInteger) { encoder.encodeInt(value.get()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicLongAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicLongAdapter.kt.mustache index e7006397ac0f..e815d6bcd053 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicLongAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/AtomicLongAdapter.kt.mustache @@ -1,7 +1,6 @@ package {{packageName}}.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicLong -@Serializer(forClass = AtomicLong::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object AtomicLongAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicLong) { encoder.encodeLong(value.get()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigDecimalAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigDecimalAdapter.kt.mustache index 6fc173cf0c26..e1db4c60f7a5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigDecimalAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigDecimalAdapter.kt.mustache @@ -2,7 +2,6 @@ package {{packageName}}.infrastructure {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -16,7 +15,6 @@ import com.squareup.moshi.ToJson import java.math.BigDecimal {{#kotlinx_serialization}} -@Serializer(forClass = BigDecimal::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object BigDecimalAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigDecimal", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigDecimal = BigDecimal(decoder.decodeString()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigIntegerAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigIntegerAdapter.kt.mustache index 8a0ddada6d54..468d44e48442 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigIntegerAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/BigIntegerAdapter.kt.mustache @@ -2,7 +2,6 @@ package {{packageName}}.infrastructure {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -16,7 +15,6 @@ import com.squareup.moshi.ToJson import java.math.BigInteger {{#kotlinx_serialization}} -@Serializer(forClass = BigInteger::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object BigIntegerAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigInteger", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigInteger { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateAdapter.kt.mustache index 641f7d7ab304..a5707cc238c7 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateAdapter.kt.mustache @@ -13,7 +13,6 @@ import java.io.IOException {{/gson}} {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -87,7 +86,6 @@ import kotlinx.datetime.LocalDate {{/gson}} {{#kotlinx_serialization}} {{^kotlinx-datetime}} -@Serializer(forClass = LocalDate::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object LocalDateAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDate", PrimitiveKind.STRING) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateTimeAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateTimeAdapter.kt.mustache index 168d4b272061..95c9d69a5745 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateTimeAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/LocalDateTimeAdapter.kt.mustache @@ -13,7 +13,6 @@ import java.io.IOException {{/gson}} {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -87,7 +86,6 @@ import kotlinx.datetime.LocalDateTime {{/gson}} {{#kotlinx_serialization}} {{^kotlinx-datetime}} -@Serializer(forClass = LocalDateTime::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object LocalDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDateTime", PrimitiveKind.STRING) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/OffsetDateTimeAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/OffsetDateTimeAdapter.kt.mustache index 0bf0e381690d..59375ef26beb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/OffsetDateTimeAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/OffsetDateTimeAdapter.kt.mustache @@ -13,7 +13,6 @@ import java.io.IOException {{/gson}} {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -71,7 +70,6 @@ import org.threeten.bp.format.DateTimeFormatter } {{/gson}} {{#kotlinx_serialization}} -@Serializer(forClass = OffsetDateTime::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object OffsetDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OffsetDateTime", PrimitiveKind.STRING) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/StringBuilderAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/StringBuilderAdapter.kt.mustache index 05f6e48a0877..41a5b6abf6eb 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/StringBuilderAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/StringBuilderAdapter.kt.mustache @@ -1,14 +1,12 @@ package {{packageName}}.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor -@Serializer(forClass = StringBuilder::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object StringBuilderAdapter : KSerializer { override fun serialize(encoder: Encoder, value: StringBuilder) { encoder.encodeString(value.toString()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URIAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URIAdapter.kt.mustache index 490121052563..5203f13c8d16 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URIAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URIAdapter.kt.mustache @@ -2,7 +2,6 @@ package {{packageName}}.infrastructure {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -25,7 +24,6 @@ import java.net.URI } {{/moshi}} {{#kotlinx_serialization}} -@Serializer(forClass = URI::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object URIAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URI) { encoder.encodeString(value.toASCIIString()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URLAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URLAdapter.kt.mustache index 9f70cf878a3e..23fa74bd31b8 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URLAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/URLAdapter.kt.mustache @@ -1,7 +1,6 @@ package {{packageName}}.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URL -@Serializer(forClass = URL::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object URLAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URL) { encoder.encodeString(value.toExternalForm()) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/UUIDAdapter.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/UUIDAdapter.kt.mustache index 6fd24cacc4c2..e609bc933535 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/UUIDAdapter.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure/UUIDAdapter.kt.mustache @@ -2,7 +2,6 @@ package {{packageName}}.infrastructure {{#kotlinx_serialization}} import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -25,7 +24,6 @@ import java.util.UUID } {{/moshi}} {{#kotlinx_serialization}} -@Serializer(forClass = UUID::class) {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}object UUIDAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt index 80611e349b1d..0c0d0d00fcfa 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicBoolean -@Serializer(forClass = AtomicBoolean::class) object AtomicBooleanAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicBoolean) { encoder.encodeBoolean(value.get()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt index 8a5a8bafc780..0060b2a0f1c3 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicInteger -@Serializer(forClass = AtomicInteger::class) object AtomicIntegerAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicInteger) { encoder.encodeInt(value.get()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt index 5842c4908896..6de80cc56bd5 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicLong -@Serializer(forClass = AtomicLong::class) object AtomicLongAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicLong) { encoder.encodeLong(value.get()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt index 94cbcb573ae9..86cb9efdd727 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.math.BigDecimal -@Serializer(forClass = BigDecimal::class) object BigDecimalAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigDecimal", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigDecimal = BigDecimal(decoder.decodeString()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt index 8f0544aa2b8c..136017cb21bc 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.math.BigInteger -@Serializer(forClass = BigInteger::class) object BigIntegerAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigInteger", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigInteger { diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt index f7c632d69649..923828ff017b 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.LocalDate import java.time.format.DateTimeFormatter -@Serializer(forClass = LocalDate::class) object LocalDateAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDate", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt index 88bd14011395..52d73dc0ad03 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.LocalDateTime import java.time.format.DateTimeFormatter -@Serializer(forClass = LocalDateTime::class) object LocalDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDateTime", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt index e0fe9e3b5321..f098b5ed1e15 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.OffsetDateTime import java.time.format.DateTimeFormatter -@Serializer(forClass = OffsetDateTime::class) object OffsetDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OffsetDateTime", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt index 7a15749f0629..b510e73808a5 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor -@Serializer(forClass = StringBuilder::class) object StringBuilderAdapter : KSerializer { override fun serialize(encoder: Encoder, value: StringBuilder) { encoder.encodeString(value.toString()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt index 0856c99813c1..8b4015feddc6 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URI -@Serializer(forClass = URI::class) object URIAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URI) { encoder.encodeString(value.toASCIIString()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt index 0dead7a73f87..9aa0326662e7 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URL -@Serializer(forClass = URL::class) object URLAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URL) { encoder.encodeString(value.toExternalForm()) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt index fbae87c1a6c6..64ff2f9139fe 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.UUID -@Serializer(forClass = UUID::class) object UUIDAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt index ea9cd7d4bbb7..930809c6ab3a 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt @@ -76,7 +76,6 @@ data class Order ( @SerialName(value = "unknown_default_open_api") unknown_default_open_api("unknown_default_open_api"); } - @Serializer(forClass = Status::class) internal object StatusSerializer : KSerializer { override val descriptor = kotlin.String.serializer().descriptor diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt index 16800beb37c0..111a57966c52 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt @@ -78,7 +78,6 @@ data class Pet ( @SerialName(value = "unknown_default_open_api") unknown_default_open_api("unknown_default_open_api"); } - @Serializer(forClass = Status::class) internal object StatusSerializer : KSerializer { override val descriptor = kotlin.String.serializer().descriptor diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt index 80611e349b1d..0c0d0d00fcfa 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicBoolean -@Serializer(forClass = AtomicBoolean::class) object AtomicBooleanAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicBoolean) { encoder.encodeBoolean(value.get()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt index 8a5a8bafc780..0060b2a0f1c3 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicInteger -@Serializer(forClass = AtomicInteger::class) object AtomicIntegerAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicInteger) { encoder.encodeInt(value.get()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt index 5842c4908896..6de80cc56bd5 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicLong -@Serializer(forClass = AtomicLong::class) object AtomicLongAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicLong) { encoder.encodeLong(value.get()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt index 94cbcb573ae9..86cb9efdd727 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.math.BigDecimal -@Serializer(forClass = BigDecimal::class) object BigDecimalAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigDecimal", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigDecimal = BigDecimal(decoder.decodeString()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt index 8f0544aa2b8c..136017cb21bc 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.math.BigInteger -@Serializer(forClass = BigInteger::class) object BigIntegerAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigInteger", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigInteger { diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt index f7c632d69649..923828ff017b 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.LocalDate import java.time.format.DateTimeFormatter -@Serializer(forClass = LocalDate::class) object LocalDateAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDate", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt index 88bd14011395..52d73dc0ad03 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.LocalDateTime import java.time.format.DateTimeFormatter -@Serializer(forClass = LocalDateTime::class) object LocalDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDateTime", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt index e0fe9e3b5321..f098b5ed1e15 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.OffsetDateTime import java.time.format.DateTimeFormatter -@Serializer(forClass = OffsetDateTime::class) object OffsetDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OffsetDateTime", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt index 7a15749f0629..b510e73808a5 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor -@Serializer(forClass = StringBuilder::class) object StringBuilderAdapter : KSerializer { override fun serialize(encoder: Encoder, value: StringBuilder) { encoder.encodeString(value.toString()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt index 0856c99813c1..8b4015feddc6 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URI -@Serializer(forClass = URI::class) object URIAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URI) { encoder.encodeString(value.toASCIIString()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt index 0dead7a73f87..9aa0326662e7 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URL -@Serializer(forClass = URL::class) object URLAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URL) { encoder.encodeString(value.toExternalForm()) diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt index fbae87c1a6c6..64ff2f9139fe 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.UUID -@Serializer(forClass = UUID::class) object UUIDAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt index 80611e349b1d..0c0d0d00fcfa 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicBooleanAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicBoolean -@Serializer(forClass = AtomicBoolean::class) object AtomicBooleanAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicBoolean) { encoder.encodeBoolean(value.get()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt index 8a5a8bafc780..0060b2a0f1c3 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicIntegerAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicInteger -@Serializer(forClass = AtomicInteger::class) object AtomicIntegerAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicInteger) { encoder.encodeInt(value.get()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt index 5842c4908896..6de80cc56bd5 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/AtomicLongAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.concurrent.atomic.AtomicLong -@Serializer(forClass = AtomicLong::class) object AtomicLongAdapter : KSerializer { override fun serialize(encoder: Encoder, value: AtomicLong) { encoder.encodeLong(value.get()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt index 94cbcb573ae9..86cb9efdd727 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.math.BigDecimal -@Serializer(forClass = BigDecimal::class) object BigDecimalAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigDecimal", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigDecimal = BigDecimal(decoder.decodeString()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt index 8f0544aa2b8c..136017cb21bc 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.math.BigInteger -@Serializer(forClass = BigInteger::class) object BigIntegerAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("BigInteger", PrimitiveKind.STRING) override fun deserialize(decoder: Decoder): BigInteger { diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt index f7c632d69649..923828ff017b 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.LocalDate import java.time.format.DateTimeFormatter -@Serializer(forClass = LocalDate::class) object LocalDateAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDate", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt index 88bd14011395..52d73dc0ad03 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.LocalDateTime import java.time.format.DateTimeFormatter -@Serializer(forClass = LocalDateTime::class) object LocalDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("LocalDateTime", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt index e0fe9e3b5321..f098b5ed1e15 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -10,7 +9,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor import java.time.OffsetDateTime import java.time.format.DateTimeFormatter -@Serializer(forClass = OffsetDateTime::class) object OffsetDateTimeAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OffsetDateTime", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt index 7a15749f0629..b510e73808a5 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/StringBuilderAdapter.kt @@ -1,14 +1,12 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor -@Serializer(forClass = StringBuilder::class) object StringBuilderAdapter : KSerializer { override fun serialize(encoder: Encoder, value: StringBuilder) { encoder.encodeString(value.toString()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt index 0856c99813c1..8b4015feddc6 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URI -@Serializer(forClass = URI::class) object URIAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URI) { encoder.encodeString(value.toASCIIString()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt index 0dead7a73f87..9aa0326662e7 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/URLAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.net.URL -@Serializer(forClass = URL::class) object URLAdapter : KSerializer { override fun serialize(encoder: Encoder, value: URL) { encoder.encodeString(value.toExternalForm()) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt index fbae87c1a6c6..64ff2f9139fe 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt @@ -1,7 +1,6 @@ package org.openapitools.client.infrastructure import kotlinx.serialization.KSerializer -import kotlinx.serialization.Serializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor @@ -9,7 +8,6 @@ import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.SerialDescriptor import java.util.UUID -@Serializer(forClass = UUID::class) object UUIDAdapter : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING) diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt index 882b8ff106b3..044b1b73ae23 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt @@ -68,7 +68,6 @@ enum class PetEnum(val value: kotlin.String) { } } -@Serializer(forClass = PetEnum::class) internal object PetEnumSerializer : KSerializer { override val descriptor = kotlin.String.serializer().descriptor