From 6dcd7314350652ec4b6406b44f84598b6dd94a8e Mon Sep 17 00:00:00 2001 From: Marek Malik Date: Tue, 11 Oct 2022 22:50:17 +0200 Subject: [PATCH 1/6] [kotlin][ktor] add set JSON as the ContentType header for ktor projects samples revert content type --- .../kotlin-client/build.gradle.mustache | 2 +- .../infrastructure/ApiClient.kt.mustache | 21 ++++++++--------- .../infrastructure/ApiClient.kt.mustache | 6 ++--- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../client/infrastructure/ApiClient.kt | 6 +++-- .../.openapi-generator/VERSION | 2 +- .../client/infrastructure/ApiClient.kt | 6 +++-- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-jackson/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-ktor-gson/build.gradle | 2 +- .../client/infrastructure/ApiClient.kt | 23 +++++++++---------- .../.openapi-generator/VERSION | 2 +- .../kotlin-jvm-ktor-jackson/build.gradle | 2 +- .../client/infrastructure/ApiClient.kt | 23 +++++++++---------- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../client/infrastructure/ApiClient.kt | 6 +++-- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-string/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-server-modelMutable/README.md | 2 +- .../jaxrs-spec/.openapi-generator/VERSION | 2 +- .../ktor/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/README.md | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin/org/openapitools/api/PetApi.kt | 2 +- .../kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../kotlin/org/openapitools/api/UserApi.kt | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin/vertx/.openapi-generator/VERSION | 2 +- 53 files changed, 92 insertions(+), 91 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 5716f8656c32..e613a3d8f39d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -11,7 +11,7 @@ wrapper { buildscript { ext.kotlin_version = '1.6.10' {{#jvm-ktor}} - ext.ktor_version = '2.0.3' + ext.ktor_version = '2.1.2' {{/jvm-ktor}} {{#jvm-retrofit2}} ext.retrofitVersion = '2.9.0' diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/infrastructure/ApiClient.kt.mustache index 51a0a5f504e5..301af9194f8c 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor/infrastructure/ApiClient.kt.mustache @@ -12,6 +12,7 @@ import io.ktor.client.request.parameter import io.ktor.client.request.request import io.ktor.client.request.setBody import io.ktor.client.statement.HttpResponse +import io.ktor.http.contentType import io.ktor.http.HttpHeaders import io.ktor.http.HttpMethod import io.ktor.http.Parameters @@ -34,11 +35,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.core.util.DefaultIndenter import com.fasterxml.jackson.core.util.DefaultPrettyPrinter {{/jackson}} -import org.openapitools.client.auth.ApiKeyAuth -import org.openapitools.client.auth.Authentication -import org.openapitools.client.auth.HttpBasicAuth -import org.openapitools.client.auth.HttpBearerAuth -import org.openapitools.client.auth.OAuth import {{packageName}}.auth.* {{#nonPublicApi}}internal {{/nonPublicApi}}open class ApiClient( @@ -111,7 +107,7 @@ import {{packageName}}.auth.* * @param username Username */ fun setUsername(username: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.username = username } @@ -122,7 +118,7 @@ import {{packageName}}.auth.* * @param password Password */ fun setPassword(password: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.password = password } @@ -134,7 +130,7 @@ import {{packageName}}.auth.* * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKey(apiKey: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKey = apiKey } @@ -146,7 +142,7 @@ import {{packageName}}.auth.* * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKeyPrefix = apiKeyPrefix } @@ -157,7 +153,7 @@ import {{packageName}}.auth.* * @param accessToken Access token */ fun setAccessToken(accessToken: String) { - val auth = authentications.values.firstOrNull { it is OAuth } as OAuth? + val auth = authentications?.values?.firstOrNull { it is OAuth } as OAuth? ?: throw Exception("No OAuth2 authentication configured") auth.accessToken = accessToken } @@ -168,7 +164,7 @@ import {{packageName}}.auth.* * @param bearerToken The bearer token. */ fun setBearerToken(bearerToken: String) { - val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? ?: throw Exception("No Bearer authentication configured") auth.bearerToken = bearerToken } @@ -199,8 +195,9 @@ import {{packageName}}.auth.* } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { setBody(body) + } } } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache index bc5d9b195081..43e73c0d5ce2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache @@ -11,10 +11,10 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit -import kotlinx.serialization.json.Json import {{packageName}}.auth.* @@ -153,9 +153,9 @@ import {{packageName}}.auth.* } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { this.setBody(body) - + } } } diff --git a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index fd07e4229d10..bcd41210b6ce 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -11,6 +11,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit @@ -142,9 +143,10 @@ open class ApiClient( } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { + this.contentType(Json) this.setBody(body) - + } } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index fd07e4229d10..bcd41210b6ce 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -11,6 +11,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit @@ -142,9 +143,10 @@ open class ApiClient( } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { + this.contentType(Json) this.setBody(body) - + } } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle index 0c3e6b64c92a..67441d77a6a5 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle @@ -8,7 +8,7 @@ wrapper { buildscript { ext.kotlin_version = '1.6.10' - ext.ktor_version = '2.0.3' + ext.ktor_version = '2.1.2' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d6fc3af68b6..3022cf488873 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -12,6 +12,8 @@ import io.ktor.client.request.parameter import io.ktor.client.request.request import io.ktor.client.request.setBody import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json +import io.ktor.http.contentType import io.ktor.http.HttpHeaders import io.ktor.http.HttpMethod import io.ktor.http.Parameters @@ -23,11 +25,6 @@ import io.ktor.http.takeFrom import io.ktor.serialization.gson.* import com.google.gson.GsonBuilder import java.text.DateFormat -import org.openapitools.client.auth.ApiKeyAuth -import org.openapitools.client.auth.Authentication -import org.openapitools.client.auth.HttpBasicAuth -import org.openapitools.client.auth.HttpBearerAuth -import org.openapitools.client.auth.OAuth import org.openapitools.client.auth.* open class ApiClient( @@ -71,7 +68,7 @@ open class ApiClient( * @param username Username */ fun setUsername(username: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.username = username } @@ -82,7 +79,7 @@ open class ApiClient( * @param password Password */ fun setPassword(password: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.password = password } @@ -94,7 +91,7 @@ open class ApiClient( * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKey(apiKey: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKey = apiKey } @@ -106,7 +103,7 @@ open class ApiClient( * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKeyPrefix = apiKeyPrefix } @@ -117,7 +114,7 @@ open class ApiClient( * @param accessToken Access token */ fun setAccessToken(accessToken: String) { - val auth = authentications.values.firstOrNull { it is OAuth } as OAuth? + val auth = authentications?.values?.firstOrNull { it is OAuth } as OAuth? ?: throw Exception("No OAuth2 authentication configured") auth.accessToken = accessToken } @@ -128,7 +125,7 @@ open class ApiClient( * @param bearerToken The bearer token. */ fun setBearerToken(bearerToken: String) { - val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? ?: throw Exception("No Bearer authentication configured") auth.bearerToken = bearerToken } @@ -159,8 +156,10 @@ open class ApiClient( } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { + contentType(Json) setBody(body) + } } } diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle index febcd440b1e9..072128b1cecb 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle @@ -8,7 +8,7 @@ wrapper { buildscript { ext.kotlin_version = '1.6.10' - ext.ktor_version = '2.0.3' + ext.ktor_version = '2.1.2' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index e21bccb90604..3e9aec243d39 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -12,6 +12,8 @@ import io.ktor.client.request.parameter import io.ktor.client.request.request import io.ktor.client.request.setBody import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json +import io.ktor.http.contentType import io.ktor.http.HttpHeaders import io.ktor.http.HttpMethod import io.ktor.http.Parameters @@ -27,11 +29,6 @@ import com.fasterxml.jackson.databind.SerializationFeature import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.core.util.DefaultIndenter import com.fasterxml.jackson.core.util.DefaultPrettyPrinter -import org.openapitools.client.auth.ApiKeyAuth -import org.openapitools.client.auth.Authentication -import org.openapitools.client.auth.HttpBasicAuth -import org.openapitools.client.auth.HttpBearerAuth -import org.openapitools.client.auth.OAuth import org.openapitools.client.auth.* open class ApiClient( @@ -79,7 +76,7 @@ open class ApiClient( * @param username Username */ fun setUsername(username: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.username = username } @@ -90,7 +87,7 @@ open class ApiClient( * @param password Password */ fun setPassword(password: String) { - val auth = authentications.values.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBasicAuth } as HttpBasicAuth? ?: throw Exception("No HTTP basic authentication configured") auth.password = password } @@ -102,7 +99,7 @@ open class ApiClient( * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKey(apiKey: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName)} as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKey = apiKey } @@ -114,7 +111,7 @@ open class ApiClient( * @param paramName The name of the API key parameter, or null or set the first key. */ fun setApiKeyPrefix(apiKeyPrefix: String, paramName: String? = null) { - val auth = authentications.values.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? + val auth = authentications?.values?.firstOrNull { it is ApiKeyAuth && (paramName == null || paramName == it.paramName) } as ApiKeyAuth? ?: throw Exception("No API key authentication configured") auth.apiKeyPrefix = apiKeyPrefix } @@ -125,7 +122,7 @@ open class ApiClient( * @param accessToken Access token */ fun setAccessToken(accessToken: String) { - val auth = authentications.values.firstOrNull { it is OAuth } as OAuth? + val auth = authentications?.values?.firstOrNull { it is OAuth } as OAuth? ?: throw Exception("No OAuth2 authentication configured") auth.accessToken = accessToken } @@ -136,7 +133,7 @@ open class ApiClient( * @param bearerToken The bearer token. */ fun setBearerToken(bearerToken: String) { - val auth = authentications.values.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? + val auth = authentications?.values?.firstOrNull { it is HttpBearerAuth } as HttpBearerAuth? ?: throw Exception("No Bearer authentication configured") auth.bearerToken = bearerToken } @@ -167,8 +164,10 @@ open class ApiClient( } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { + contentType(Json) setBody(body) + } } } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index dc660734191a..525e161532b0 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -11,6 +11,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit @@ -146,9 +147,10 @@ open class ApiClient( } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { + this.contentType(Json) this.setBody(body) - + } } } diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/README.md b/samples/server/petstore/kotlin-server-modelMutable/README.md index efd909add4b4..b18cf5339859 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/README.md +++ b/samples/server/petstore/kotlin-server-modelMutable/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 6.2.1-SNAPSHOT. +Generated by OpenAPI Generator 6.1.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index efd909add4b4..b18cf5339859 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 6.2.1-SNAPSHOT. +Generated by OpenAPI Generator 6.1.0-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index e29800c9fc13..1023ef19b8b6 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt index a6bf8b43e3b5..940b7aabd5aa 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index 3b438eb54ccf..829fc212e92e 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.1.0-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION index ed829dbcddec..66672d4e9d31 100644 --- a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1-SNAPSHOT \ No newline at end of file +6.1.0-SNAPSHOT \ No newline at end of file From 4a8443f40cac2c99d0fb4e96b8abdd554ce7ff94 Mon Sep 17 00:00:00 2001 From: Marek Malik Date: Thu, 13 Oct 2022 10:30:18 +0200 Subject: [PATCH 2/6] update samples --- docs/generators/kotlin.md | 2 +- .../kotlin-allOff-discriminator/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 -- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 -- .../.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 6 +++--- .../kotlin-enum-default-value/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jackson/.openapi-generator/VERSION | 2 +- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../kotlin-jvm-ktor-gson/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 -- .../kotlin-jvm-ktor-jackson/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 -- .../.openapi-generator/VERSION | 2 +- .../petstore/kotlin-jvm-volley/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-modelMutable/.openapi-generator/VERSION | 2 +- .../kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 2 -- .../petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-retrofit2-rx3/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- .../kotlin-uppercase-enum/.openapi-generator/VERSION | 2 +- .../kotlin-server-modelMutable/.openapi-generator/VERSION | 2 +- .../server/petstore/kotlin-server-modelMutable/README.md | 2 +- .../kotlin-server/jaxrs-spec/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-server/ktor/.openapi-generator/VERSION | 2 +- samples/server/petstore/kotlin-server/ktor/README.md | 2 +- .../kotlin-springboot-delegate/.openapi-generator/VERSION | 2 +- .../src/main/kotlin/org/openapitools/api/PetApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/kotlin/org/openapitools/api/UserApi.kt | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-springboot-reactive/.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../.openapi-generator/VERSION | 2 +- .../kotlin-springboot-springfox/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-springboot/.openapi-generator/VERSION | 2 +- .../kotlin-vertx-modelMutable/.openapi-generator/VERSION | 2 +- .../server/petstore/kotlin/vertx/.openapi-generator/VERSION | 2 +- 50 files changed, 47 insertions(+), 57 deletions(-) diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 7f562302f280..adcceb6c46ba 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |generateRoomModels|Generate Android Room database models in addition to API models (JVM Volley library only)| |false| |groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |idea|Add IntellJ Idea plugin and mark Kotlin main and test folders as source folders.| |false| -|library|Library template (sub-template) to use|
**jvm-ktor**
Platform: Java Virtual Machine. HTTP client: Ktor 1.6.7. JSON processing: Gson, Jackson (default).
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**jvm-retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.6.7. JSON processing: Kotlinx Serialization: 1.2.1.
**jvm-volley**
Platform: JVM for Android. HTTP client: Volley 1.2.1. JSON processing: gson 2.8.9
|jvm-okhttp4| +|library|Library template (sub-template) to use|
**jvm-ktor**
Platform: Java Virtual Machine. HTTP client: Ktor 2.1.2. JSON processing: Gson, Jackson (default).
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**jvm-retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 2.1.2. JSON processing: Kotlinx Serialization: 1.2.1.
**jvm-volley**
Platform: JVM for Android. HTTP client: Volley 1.2.1. JSON processing: gson 2.8.9
|jvm-okhttp4| |modelMutable|Create mutable models| |false| |moshiCodeGen|Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info.| |false| |omitGradlePluginVersions|Whether to declare Gradle plugin versions in build files.| |false| diff --git a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index bcd41210b6ce..f56080266e4d 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -15,7 +15,6 @@ import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit -import kotlinx.serialization.json.Json import org.openapitools.client.auth.* @@ -144,7 +143,6 @@ open class ApiClient( this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { - this.contentType(Json) this.setBody(body) } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index bcd41210b6ce..f56080266e4d 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -15,7 +15,6 @@ import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit -import kotlinx.serialization.json.Json import org.openapitools.client.auth.* @@ -144,7 +143,6 @@ open class ApiClient( this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { - this.contentType(Json) this.setBody(body) } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index fd07e4229d10..f56080266e4d 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -11,10 +11,10 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit -import kotlinx.serialization.json.Json import org.openapitools.client.auth.* @@ -142,9 +142,9 @@ open class ApiClient( } this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } - if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) + if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { this.setBody(body) - + } } } diff --git a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-enum-default-value/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 3022cf488873..69c803dfbcf6 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -12,7 +12,6 @@ import io.ktor.client.request.parameter import io.ktor.client.request.request import io.ktor.client.request.setBody import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.contentType import io.ktor.http.HttpHeaders import io.ktor.http.HttpMethod @@ -157,7 +156,6 @@ open class ApiClient( this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { - contentType(Json) setBody(body) } } diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 3e9aec243d39..bb3a5290cf6e 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -12,7 +12,6 @@ import io.ktor.client.request.parameter import io.ktor.client.request.request import io.ktor.client.request.setBody import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.contentType import io.ktor.http.HttpHeaders import io.ktor.http.HttpMethod @@ -165,7 +164,6 @@ open class ApiClient( this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { - contentType(Json) setBody(body) } } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-jvm-volley/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 525e161532b0..967719d0e4c6 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -15,7 +15,6 @@ import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit -import kotlinx.serialization.json.Json import org.openapitools.client.auth.* @@ -148,7 +147,6 @@ open class ApiClient( this.method = requestConfig.method.httpMethod headers.filter { header -> !UNSAFE_HEADERS.contains(header.key) }.forEach { header -> this.header(header.key, header.value) } if (requestConfig.method in listOf(RequestMethod.PUT, RequestMethod.POST, RequestMethod.PATCH)) { - this.contentType(Json) this.setBody(body) } } diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server-modelMutable/README.md b/samples/server/petstore/kotlin-server-modelMutable/README.md index b18cf5339859..efd909add4b4 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/README.md +++ b/samples/server/petstore/kotlin-server-modelMutable/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 6.1.0-SNAPSHOT. +Generated by OpenAPI Generator 6.2.1-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/jaxrs-spec/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md index b18cf5339859..efd909add4b4 100644 --- a/samples/server/petstore/kotlin-server/ktor/README.md +++ b/samples/server/petstore/kotlin-server/ktor/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -Generated by OpenAPI Generator 6.1.0-SNAPSHOT. +Generated by OpenAPI Generator 6.2.1-SNAPSHOT. ## Requires diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 1023ef19b8b6..e29800c9fc13 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.1.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt index 940b7aabd5aa..a6bf8b43e3b5 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.1.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt index 829fc212e92e..3b438eb54ccf 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt @@ -1,5 +1,5 @@ /** - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.1.0-SNAPSHOT). + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.2.1-SNAPSHOT). * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot-springfox/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin-vertx-modelMutable/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION index 66672d4e9d31..ed829dbcddec 100644 --- a/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION +++ b/samples/server/petstore/kotlin/vertx/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0-SNAPSHOT \ No newline at end of file +6.2.1-SNAPSHOT \ No newline at end of file From fc73ac83f21afc0a1d843eafdabc5de8d1309f76 Mon Sep 17 00:00:00 2001 From: Marek Malik Date: Thu, 13 Oct 2022 10:37:53 +0200 Subject: [PATCH 3/6] fix multi-platform sample --- .../multiplatform/infrastructure/ApiClient.kt.mustache | 3 +-- .../kotlin/org/openapitools/client/infrastructure/ApiClient.kt | 3 +-- .../kotlin/org/openapitools/client/infrastructure/ApiClient.kt | 3 +-- .../kotlin/org/openapitools/client/infrastructure/ApiClient.kt | 3 +-- .../kotlin/org/openapitools/client/infrastructure/ApiClient.kt | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache index 43e73c0d5ce2..0501e0ffb5a5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache @@ -4,17 +4,16 @@ import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.serialization.kotlinx.json.* import io.ktor.client.request.* import io.ktor.client.request.forms.FormDataContent import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit +import kotlinx.serialization.json.Json import {{packageName}}.auth.* diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index f56080266e4d..5badde53bf3d 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -4,17 +4,16 @@ import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.serialization.kotlinx.json.* import io.ktor.client.request.* import io.ktor.client.request.forms.FormDataContent import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit +import kotlinx.serialization.json.Json import org.openapitools.client.auth.* diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index f56080266e4d..5badde53bf3d 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -4,17 +4,16 @@ import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.serialization.kotlinx.json.* import io.ktor.client.request.* import io.ktor.client.request.forms.FormDataContent import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit +import kotlinx.serialization.json.Json import org.openapitools.client.auth.* diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index f56080266e4d..5badde53bf3d 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -4,17 +4,16 @@ import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.serialization.kotlinx.json.* import io.ktor.client.request.* import io.ktor.client.request.forms.FormDataContent import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit +import kotlinx.serialization.json.Json import org.openapitools.client.auth.* diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 967719d0e4c6..2502a558ad3c 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -4,17 +4,16 @@ import io.ktor.client.HttpClient import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.contentnegotiation.ContentNegotiation -import io.ktor.serialization.kotlinx.json.* import io.ktor.client.request.* import io.ktor.client.request.forms.FormDataContent import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse -import io.ktor.http.ContentType.Application.Json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit +import kotlinx.serialization.json.Json import org.openapitools.client.auth.* From c48ed514ea58c92087a8f2d50a59e7583318a0a7 Mon Sep 17 00:00:00 2001 From: Marek Malik Date: Thu, 13 Oct 2022 20:03:05 +0200 Subject: [PATCH 4/6] revert docs --- docs/generators/kotlin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index adcceb6c46ba..7f562302f280 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -27,7 +27,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |generateRoomModels|Generate Android Room database models in addition to API models (JVM Volley library only)| |false| |groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |idea|Add IntellJ Idea plugin and mark Kotlin main and test folders as source folders.| |false| -|library|Library template (sub-template) to use|
**jvm-ktor**
Platform: Java Virtual Machine. HTTP client: Ktor 2.1.2. JSON processing: Gson, Jackson (default).
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**jvm-retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 2.1.2. JSON processing: Kotlinx Serialization: 1.2.1.
**jvm-volley**
Platform: JVM for Android. HTTP client: Volley 1.2.1. JSON processing: gson 2.8.9
|jvm-okhttp4| +|library|Library template (sub-template) to use|
**jvm-ktor**
Platform: Java Virtual Machine. HTTP client: Ktor 1.6.7. JSON processing: Gson, Jackson (default).
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**jvm-retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.6.7. JSON processing: Kotlinx Serialization: 1.2.1.
**jvm-volley**
Platform: JVM for Android. HTTP client: Volley 1.2.1. JSON processing: gson 2.8.9
|jvm-okhttp4| |modelMutable|Create mutable models| |false| |moshiCodeGen|Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info.| |false| |omitGradlePluginVersions|Whether to declare Gradle plugin versions in build files.| |false| From 5e8acbdbdfdaf0613ac7c5786b08956a366cae18 Mon Sep 17 00:00:00 2001 From: Marek Malik Date: Tue, 18 Oct 2022 11:59:53 +0200 Subject: [PATCH 5/6] update samples and fix missing import on multiplatfrom --- .../src/main/resources/kotlin-client/README.mustache | 4 ++-- .../multiplatform/infrastructure/ApiClient.kt.mustache | 1 + samples/client/petstore/kotlin-allOff-discriminator/README.md | 4 ++-- .../petstore/kotlin-array-simple-string-jvm-okhttp3/README.md | 4 ++-- .../petstore/kotlin-array-simple-string-jvm-okhttp4/README.md | 4 ++-- .../org/openapitools/client/infrastructure/ApiClient.kt | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 1 + .../petstore/kotlin-bigdecimal-default-okhttp4/README.md | 4 ++-- .../petstore/kotlin-default-values-jvm-okhttp3/README.md | 4 ++-- .../petstore/kotlin-default-values-jvm-okhttp4/README.md | 4 ++-- .../petstore/kotlin-default-values-jvm-retrofit2/README.md | 4 ++-- .../org/openapitools/client/infrastructure/ApiClient.kt | 1 + samples/client/petstore/kotlin-enum-default-value/README.md | 4 ++-- samples/client/petstore/kotlin-gson/README.md | 4 ++-- samples/client/petstore/kotlin-jackson/README.md | 4 ++-- samples/client/petstore/kotlin-json-request-string/README.md | 4 ++-- samples/client/petstore/kotlin-jvm-ktor-gson/README.md | 4 ++-- samples/client/petstore/kotlin-jvm-ktor-jackson/README.md | 4 ++-- .../client/petstore/kotlin-jvm-okhttp4-coroutines/README.md | 4 ++-- samples/client/petstore/kotlin-modelMutable/README.md | 4 ++-- samples/client/petstore/kotlin-moshi-codegen/README.md | 4 ++-- .../org/openapitools/client/infrastructure/ApiClient.kt | 1 + samples/client/petstore/kotlin-nonpublic/README.md | 4 ++-- samples/client/petstore/kotlin-nullable/README.md | 4 ++-- samples/client/petstore/kotlin-okhttp3/README.md | 4 ++-- .../petstore/kotlin-retrofit2-kotlinx_serialization/README.md | 4 ++-- samples/client/petstore/kotlin-retrofit2-rx3/README.md | 4 ++-- samples/client/petstore/kotlin-retrofit2/README.md | 4 ++-- samples/client/petstore/kotlin-string/README.md | 4 ++-- samples/client/petstore/kotlin-threetenbp/README.md | 4 ++-- samples/client/petstore/kotlin-uppercase-enum/README.md | 4 ++-- 31 files changed, 57 insertions(+), 52 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache index d6dca22f5fc6..d805869f5ae0 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache @@ -20,8 +20,8 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requires {{#jvm}} -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 {{/jvm}} {{#multiplatform}} * Kotlin 1.5.10 diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache index 0501e0ffb5a5..bbed97d77aed 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/infrastructure/ApiClient.kt.mustache @@ -10,6 +10,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.serialization.kotlinx.json.json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit diff --git a/samples/client/petstore/kotlin-allOff-discriminator/README.md b/samples/client/petstore/kotlin-allOff-discriminator/README.md index 6b1ed0fb3219..b8f74b274242 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/README.md +++ b/samples/client/petstore/kotlin-allOff-discriminator/README.md @@ -12,8 +12,8 @@ For more information, please visit [https://example.org](https://example.org) ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md index be47543f9633..49b1c94dab68 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md index be47543f9633..49b1c94dab68 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5badde53bf3d..529ae1e4d05f 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.serialization.kotlinx.json.json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5badde53bf3d..529ae1e4d05f 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.serialization.kotlinx.json.json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md index e1589aead68a..ccbdb1a4e4a9 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md index 96bddb2ac986..c1b435ada57c 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md index 96bddb2ac986..c1b435ada57c 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md index 904786dd56bb..be72f0dfcf6c 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5badde53bf3d..529ae1e4d05f 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-default-values-multiplatform/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.serialization.kotlinx.json.json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit diff --git a/samples/client/petstore/kotlin-enum-default-value/README.md b/samples/client/petstore/kotlin-enum-default-value/README.md index df4685a2021a..665d73528702 100644 --- a/samples/client/petstore/kotlin-enum-default-value/README.md +++ b/samples/client/petstore/kotlin-enum-default-value/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-gson/README.md b/samples/client/petstore/kotlin-gson/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-gson/README.md +++ b/samples/client/petstore/kotlin-gson/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jackson/README.md b/samples/client/petstore/kotlin-jackson/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-jackson/README.md +++ b/samples/client/petstore/kotlin-jackson/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-json-request-string/README.md b/samples/client/petstore/kotlin-json-request-string/README.md index eb18a4c21d8a..928a13052e77 100644 --- a/samples/client/petstore/kotlin-json-request-string/README.md +++ b/samples/client/petstore/kotlin-json-request-string/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/README.md b/samples/client/petstore/kotlin-jvm-ktor-gson/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-modelMutable/README.md b/samples/client/petstore/kotlin-modelMutable/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-modelMutable/README.md +++ b/samples/client/petstore/kotlin-modelMutable/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-moshi-codegen/README.md b/samples/client/petstore/kotlin-moshi-codegen/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/README.md +++ b/samples/client/petstore/kotlin-moshi-codegen/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 2502a558ad3c..35e549b98296 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -10,6 +10,7 @@ import io.ktor.client.request.forms.MultiPartFormDataContent import io.ktor.client.request.header import io.ktor.client.request.parameter import io.ktor.client.statement.HttpResponse +import io.ktor.serialization.kotlinx.json.json import io.ktor.http.* import io.ktor.http.content.PartData import kotlin.Unit diff --git a/samples/client/petstore/kotlin-nonpublic/README.md b/samples/client/petstore/kotlin-nonpublic/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-nonpublic/README.md +++ b/samples/client/petstore/kotlin-nonpublic/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-nullable/README.md b/samples/client/petstore/kotlin-nullable/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-nullable/README.md +++ b/samples/client/petstore/kotlin-nullable/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-okhttp3/README.md b/samples/client/petstore/kotlin-okhttp3/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-okhttp3/README.md +++ b/samples/client/petstore/kotlin-okhttp3/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md index 1bd530b89967..473c874b300b 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/README.md b/samples/client/petstore/kotlin-retrofit2-rx3/README.md index 1bd530b89967..473c874b300b 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/README.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2/README.md b/samples/client/petstore/kotlin-retrofit2/README.md index 1bd530b89967..473c874b300b 100644 --- a/samples/client/petstore/kotlin-retrofit2/README.md +++ b/samples/client/petstore/kotlin-retrofit2/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-string/README.md b/samples/client/petstore/kotlin-string/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-string/README.md +++ b/samples/client/petstore/kotlin-string/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-threetenbp/README.md b/samples/client/petstore/kotlin-threetenbp/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin-threetenbp/README.md +++ b/samples/client/petstore/kotlin-threetenbp/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-uppercase-enum/README.md b/samples/client/petstore/kotlin-uppercase-enum/README.md index 9b3bfe4e89ef..40a6b5fa1abb 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/README.md +++ b/samples/client/petstore/kotlin-uppercase-enum/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build From 6bcf1f193babe81edb891abefe071e771ab6a473 Mon Sep 17 00:00:00 2001 From: Marek Malik Date: Tue, 18 Oct 2022 13:56:47 +0200 Subject: [PATCH 6/6] add missing sample --- samples/client/petstore/kotlin/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/kotlin/README.md b/samples/client/petstore/kotlin/README.md index e8336e9f36b1..e3f2108bfcdc 100644 --- a/samples/client/petstore/kotlin/README.md +++ b/samples/client/petstore/kotlin/README.md @@ -11,8 +11,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.4.30 -* Gradle 6.8.3 +* Kotlin 1.6.10 +* Gradle 7.5 ## Build