diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index fe4071cffbb..77966c3e9b0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -863,12 +863,6 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { supportingFiles.add(new SupportingFile("auth/HttpBasicAuth.kt.mustache", authFolder, "HttpBasicAuth.kt")); supportingFiles.add(new SupportingFile("auth/HttpBearerAuth.kt.mustache", authFolder, "HttpBearerAuth.kt")); supportingFiles.add(new SupportingFile("auth/OAuth.kt.mustache", authFolder, "OAuth.kt")); - - // multiplatform specific testing files - supportingFiles.add(new SupportingFile("commonTest/Coroutine.kt.mustache", "src/commonTest/kotlin/util", "Coroutine.kt")); - supportingFiles.add(new SupportingFile("iosTest/Coroutine.kt.mustache", "src/iosTest/kotlin/util", "Coroutine.kt")); - supportingFiles.add(new SupportingFile("jsTest/Coroutine.kt.mustache", "src/jsTest/kotlin/util", "Coroutine.kt")); - supportingFiles.add(new SupportingFile("jvmTest/Coroutine.kt.mustache", "src/jvmTest/kotlin/util", "Coroutine.kt")); } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/auth/HttpBasicAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/auth/HttpBasicAuth.kt.mustache index fbf39cb55b3..0e3dba003ef 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/auth/HttpBasicAuth.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/auth/HttpBasicAuth.kt.mustache @@ -1,13 +1,11 @@ package {{packageName}}.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class HttpBasicAuth : Authentication { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}var username: String? = null {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache index fbf39cb55b3..0e3dba003ef 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/auth/HttpBasicAuth.kt.mustache @@ -1,13 +1,11 @@ package {{packageName}}.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class HttpBasicAuth : Authentication { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}var username: String? = null {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache index e08e5eee30a..381dc29096b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform"){{^omitGradlePluginVersions}} version "1.9.20" // kotlin_version{{/omitGradlePluginVersions}} - kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "1.9.20" // kotlin_version{{/omitGradlePluginVersions}} + kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.0.21" // kotlin_version{{/omitGradlePluginVersions}} + kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.0.21" // kotlin_version{{/omitGradlePluginVersions}} } group = "{{groupId}}" version = "{{artifactVersion}}" -val kotlin_version = "1.9.20" -val coroutines_version = "1.7.3" -val serialization_version = "1.6.1" -val ktor_version = "2.3.6" +val kotlin_version = "2.0.21" +val coroutines_version = "1.9.0" +val serialization_version = "1.7.3" +val ktor_version = "3.0.1" repositories { mavenCentral() diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/Coroutine.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/Coroutine.kt.mustache deleted file mode 100644 index c3bd8b18461..00000000000 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/commonTest/Coroutine.kt.mustache +++ /dev/null @@ -1,13 +0,0 @@ -{{>licenseInfo}} - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/Coroutine.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/Coroutine.kt.mustache deleted file mode 100644 index 351c0120b7b..00000000000 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/iosTest/Coroutine.kt.mustache +++ /dev/null @@ -1,8 +0,0 @@ -{{>licenseInfo}} - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jsTest/Coroutine.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jsTest/Coroutine.kt.mustache deleted file mode 100644 index 23f710816de..00000000000 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jsTest/Coroutine.kt.mustache +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/Coroutine.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/Coroutine.kt.mustache deleted file mode 100644 index 351c0120b7b..00000000000 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/jvmTest/Coroutine.kt.mustache +++ /dev/null @@ -1,8 +0,0 @@ -{{>licenseInfo}} - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES index 78f5b4e762f..969f423e893 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/FILES @@ -21,7 +21,3 @@ src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt -src/commonTest/kotlin/util/Coroutine.kt -src/iosTest/kotlin/util/Coroutine.kt -src/jsTest/kotlin/util/Coroutine.kt -src/jvmTest/kotlin/util/Coroutine.kt diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts index 60a1d4bbf11..69c02b98acb 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.9.20" // kotlin_version - kotlin("plugin.serialization") version "1.9.20" // kotlin_version + kotlin("multiplatform") version "2.0.21" // kotlin_version + kotlin("plugin.serialization") version "2.0.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.9.20" -val coroutines_version = "1.7.3" -val serialization_version = "1.6.1" -val ktor_version = "2.3.6" +val kotlin_version = "2.0.21" +val coroutines_version = "1.9.0" +val serialization_version = "1.7.3" +val ktor_version = "3.0.1" repositories { mavenCentral() diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 4db267d629c..00000000000 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/commonTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/iosTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/iosTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/iosTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/jsTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/jsTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 23f710816de..00000000000 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/jsTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES index b3293eef4ed..bd3e98e7650 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/FILES @@ -23,7 +23,3 @@ src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/commonMain/kotlin/org/openapitools/client/models/Apa.kt -src/commonTest/kotlin/util/Coroutine.kt -src/iosTest/kotlin/util/Coroutine.kt -src/jsTest/kotlin/util/Coroutine.kt -src/jvmTest/kotlin/util/Coroutine.kt diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts index 60a1d4bbf11..69c02b98acb 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.9.20" // kotlin_version - kotlin("plugin.serialization") version "1.9.20" // kotlin_version + kotlin("multiplatform") version "2.0.21" // kotlin_version + kotlin("plugin.serialization") version "2.0.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.9.20" -val coroutines_version = "1.7.3" -val serialization_version = "1.6.1" -val ktor_version = "2.3.6" +val kotlin_version = "2.0.21" +val coroutines_version = "1.9.0" +val serialization_version = "1.7.3" +val ktor_version = "3.0.1" repositories { mavenCentral() diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 4db267d629c..00000000000 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/commonTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/iosTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/iosTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/iosTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/jsTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/jsTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 23f710816de..00000000000 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/jsTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES index b3293eef4ed..bd3e98e7650 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-default-values-multiplatform/.openapi-generator/FILES @@ -23,7 +23,3 @@ src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt src/commonMain/kotlin/org/openapitools/client/models/Apa.kt -src/commonTest/kotlin/util/Coroutine.kt -src/iosTest/kotlin/util/Coroutine.kt -src/jsTest/kotlin/util/Coroutine.kt -src/jvmTest/kotlin/util/Coroutine.kt diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts index 60a1d4bbf11..69c02b98acb 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.9.20" // kotlin_version - kotlin("plugin.serialization") version "1.9.20" // kotlin_version + kotlin("multiplatform") version "2.0.21" // kotlin_version + kotlin("plugin.serialization") version "2.0.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.9.20" -val coroutines_version = "1.7.3" -val serialization_version = "1.6.1" -val ktor_version = "2.3.6" +val kotlin_version = "2.0.21" +val coroutines_version = "1.9.0" +val serialization_version = "1.7.3" +val ktor_version = "3.0.1" repositories { mavenCentral() diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/commonTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 4db267d629c..00000000000 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/commonTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/iosTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/iosTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/iosTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/jsTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/jsTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 23f710816de..00000000000 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/jsTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-kotlinx_serialization/src/main/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES index ae11a0430af..54e8e5763da 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/.openapi-generator/FILES @@ -37,7 +37,3 @@ src/commonMain/kotlin/org/openapitools/client/models/Order.kt src/commonMain/kotlin/org/openapitools/client/models/Pet.kt src/commonMain/kotlin/org/openapitools/client/models/Tag.kt src/commonMain/kotlin/org/openapitools/client/models/User.kt -src/commonTest/kotlin/util/Coroutine.kt -src/iosTest/kotlin/util/Coroutine.kt -src/jsTest/kotlin/util/Coroutine.kt -src/jvmTest/kotlin/util/Coroutine.kt diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts index 60a1d4bbf11..69c02b98acb 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.9.20" // kotlin_version - kotlin("plugin.serialization") version "1.9.20" // kotlin_version + kotlin("multiplatform") version "2.0.21" // kotlin_version + kotlin("plugin.serialization") version "2.0.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.9.20" -val coroutines_version = "1.7.3" -val serialization_version = "1.6.1" -val ktor_version = "2.3.6" +val kotlin_version = "2.0.21" +val coroutines_version = "1.9.0" +val serialization_version = "1.7.3" +val ktor_version = "3.0.1" repositories { mavenCentral() diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 4db267d629c..00000000000 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/commonTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/iosTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/iosTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/iosTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/jsTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/jsTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 23f710816de..00000000000 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/jsTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } diff --git a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/jvmTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/jvmTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-multiplatform-kotlinx-datetime/src/jvmTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES index 633537acb58..6468fd04116 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/FILES @@ -33,7 +33,3 @@ src/commonMain/kotlin/org/openapitools/client/models/Order.kt src/commonMain/kotlin/org/openapitools/client/models/Pet.kt src/commonMain/kotlin/org/openapitools/client/models/Tag.kt src/commonMain/kotlin/org/openapitools/client/models/User.kt -src/commonTest/kotlin/util/Coroutine.kt -src/iosTest/kotlin/util/Coroutine.kt -src/jsTest/kotlin/util/Coroutine.kt -src/jvmTest/kotlin/util/Coroutine.kt diff --git a/samples/client/petstore/kotlin-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-multiplatform/build.gradle.kts index 60a1d4bbf11..69c02b98acb 100644 --- a/samples/client/petstore/kotlin-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.9.20" // kotlin_version - kotlin("plugin.serialization") version "1.9.20" // kotlin_version + kotlin("multiplatform") version "2.0.21" // kotlin_version + kotlin("plugin.serialization") version "2.0.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.9.20" -val coroutines_version = "1.7.3" -val serialization_version = "1.6.1" -val ktor_version = "2.3.6" +val kotlin_version = "2.0.21" +val coroutines_version = "1.9.0" +val serialization_version = "1.7.3" +val ktor_version = "3.0.1" repositories { mavenCentral() diff --git a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties index a40165ee36c..4670e1d441f 100644 --- a/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties +++ b/samples/client/petstore/kotlin-multiplatform/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Sep 24 10:59:07 CEST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt index 40276dbb985..7c4761bbd6f 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/auth/HttpBasicAuth.kt @@ -1,13 +1,11 @@ package org.openapitools.client.auth -import io.ktor.util.InternalAPI import io.ktor.util.encodeBase64 class HttpBasicAuth : Authentication { var username: String? = null var password: String? = null - @OptIn(InternalAPI::class) override fun apply(query: MutableMap>, headers: MutableMap) { if (username == null && password == null) return val str = (username ?: "") + ":" + (password ?: "") diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform/src/commonTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 4db267d629c..00000000000 --- a/samples/client/petstore/kotlin-multiplatform/src/commonTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,27 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/samples/client/petstore/kotlin-multiplatform/src/iosTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform/src/iosTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-multiplatform/src/iosTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 23f710816de..00000000000 --- a/samples/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } diff --git a/samples/client/petstore/kotlin-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt b/samples/client/petstore/kotlin-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt deleted file mode 100644 index e967e3993cf..00000000000 --- a/samples/client/petstore/kotlin-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,22 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES b/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES index f350611489a..110757a85cc 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/.openapi-generator/FILES @@ -116,7 +116,3 @@ src/commonMain/kotlin/org/openapitools/client/models/Return.kt src/commonMain/kotlin/org/openapitools/client/models/SpecialModelname.kt src/commonMain/kotlin/org/openapitools/client/models/Tag.kt src/commonMain/kotlin/org/openapitools/client/models/User.kt -src/commonTest/kotlin/util/Coroutine.kt -src/iosTest/kotlin/util/Coroutine.kt -src/jsTest/kotlin/util/Coroutine.kt -src/jvmTest/kotlin/util/Coroutine.kt diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonTest/kotlin/util/Coroutine.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 5be963e41b8..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,23 +0,0 @@ -/** -* OpenAPI Petstore -* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -package util - -import kotlinx.coroutines.CoroutineScope - -/** -* Block the current thread until execution of the given coroutine is complete. -* -* @param block The coroutine code. -* @return The result of the coroutine. -*/ -internal expect fun runTest(block: suspend CoroutineScope.() -> T): T diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/iosTest/kotlin/util/Coroutine.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/iosTest/kotlin/util/Coroutine.kt deleted file mode 100644 index ebcc320dbbb..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/iosTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,18 +0,0 @@ -/** -* OpenAPI Petstore -* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block) diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt deleted file mode 100644 index 2bea4861f67..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/jsTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.promise - -actual fun runTest(block: suspend (scope : CoroutineScope) -> T): dynamic = GlobalScope.promise { block(this) } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt deleted file mode 100644 index ebcc320dbbb..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/jvmTest/kotlin/util/Coroutine.kt +++ /dev/null @@ -1,18 +0,0 @@ -/** -* OpenAPI Petstore -* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ -* -* The version of the OpenAPI document: 1.0.0 -* -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -package util - -import kotlinx.coroutines.CoroutineScope -import kotlin.coroutines.EmptyCoroutineContext - -internal actual fun runTest(block: suspend CoroutineScope.() -> T): T = kotlinx.coroutines.runBlocking(EmptyCoroutineContext, block)