[kotlin-client] update Kotlin and libraries versions (#21866)

This commit is contained in:
Csaba Kozák
2025-09-15 20:01:29 +02:00
committed by GitHub
parent b7749712b8
commit 5c04b754ab
381 changed files with 2365 additions and 2840 deletions

1
.gitignore vendored
View File

@@ -16,6 +16,7 @@ modules/openapi-generator-gradle-plugin/bin/
.classpath .classpath
lib/* lib/*
build/* build/*
.kotlin
generated-files/* generated-files/*
generated-sources/* generated-sources/*
generated-code/* generated-code/*

View File

@@ -642,7 +642,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
typeMapping.put("Date", "LocalDate"); typeMapping.put("Date", "LocalDate");
typeMapping.put("Time", "LocalTime"); typeMapping.put("Time", "LocalTime");
importMapping.put("Instant", "kotlinx.datetime.Instant"); importMapping.put("Instant", "kotlin.time.Instant");
importMapping.put("LocalDate", "kotlinx.datetime.LocalDate"); importMapping.put("LocalDate", "kotlinx.datetime.LocalDate");
importMapping.put("LocalTime", "kotlinx.datetime.LocalTime"); importMapping.put("LocalTime", "kotlinx.datetime.LocalTime");
} }
@@ -887,7 +887,6 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
// multiplatform specific supporting files // multiplatform specific supporting files
supportingFiles.add(new SupportingFile("infrastructure/Base64ByteArray.kt.mustache", infrastructureFolder, "Base64ByteArray.kt")); supportingFiles.add(new SupportingFile("infrastructure/Base64ByteArray.kt.mustache", infrastructureFolder, "Base64ByteArray.kt"));
supportingFiles.add(new SupportingFile("infrastructure/Bytes.kt.mustache", infrastructureFolder, "Bytes.kt"));
supportingFiles.add(new SupportingFile("infrastructure/HttpResponse.kt.mustache", infrastructureFolder, "HttpResponse.kt")); supportingFiles.add(new SupportingFile("infrastructure/HttpResponse.kt.mustache", infrastructureFolder, "HttpResponse.kt"));
supportingFiles.add(new SupportingFile("infrastructure/OctetByteArray.kt.mustache", infrastructureFolder, "OctetByteArray.kt")); supportingFiles.add(new SupportingFile("infrastructure/OctetByteArray.kt.mustache", infrastructureFolder, "OctetByteArray.kt"));

View File

@@ -21,11 +21,11 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
## Requires ## Requires
{{#jvm}} {{#jvm}}
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
{{/jvm}} {{/jvm}}
{{#multiplatform}} {{#multiplatform}}
* Kotlin 1.5.10 * Kotlin 2.2.20
{{/multiplatform}} {{/multiplatform}}
## Build ## Build

View File

@@ -3,34 +3,34 @@ version '{{artifactVersion}}'
{{^omitGradleWrapper}} {{^omitGradleWrapper}}
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
{{/omitGradleWrapper}} {{/omitGradleWrapper}}
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
{{#jvm-ktor}} {{#jvm-ktor}}
ext.ktor_version = '2.3.9' ext.ktor_version = '3.2.3'
{{/jvm-ktor}} {{/jvm-ktor}}
{{#jvm-retrofit2}} {{#jvm-retrofit2}}
ext.retrofitVersion = '2.10.0' ext.retrofitVersion = '3.0.0'
{{/jvm-retrofit2}} {{/jvm-retrofit2}}
{{#useRxJava3}} {{#useRxJava3}}
ext.rxJava3Version = '3.1.8' ext.rxJava3Version = '3.1.11'
{{/useRxJava3}} {{/useRxJava3}}
{{#jvm-vertx}} {{#jvm-vertx}}
ext.vertx_version = "4.5.6" ext.vertx_version = "5.0.4"
{{/jvm-vertx}} {{/jvm-vertx}}
{{#jvm-spring}} {{#jvm-spring}}
{{#useSpringBoot3}} {{#useSpringBoot3}}
ext.spring_boot_version = "3.2.5" ext.spring_boot_version = "3.5.5"
{{/useSpringBoot3}} {{/useSpringBoot3}}
{{^useSpringBoot3}} {{^useSpringBoot3}}
ext.spring_boot_version = "2.7.18" ext.spring_boot_version = "2.7.18"
{{/useSpringBoot3}} {{/useSpringBoot3}}
{{/jvm-spring}} {{/jvm-spring}}
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -41,12 +41,15 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
{{/kotlinx_serialization}} {{/kotlinx_serialization}}
classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version" classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version"
{{#moshiCodeGen}}
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.2.20-2.0.3"
{{/moshiCodeGen}}
} }
} }
apply plugin: 'kotlin' apply plugin: 'kotlin'
{{#moshiCodeGen}} {{#moshiCodeGen}}
apply plugin: 'kotlin-kapt' apply plugin: 'com.google.devtools.ksp'
{{/moshiCodeGen}} {{/moshiCodeGen}}
{{#parcelizeModels}} {{#parcelizeModels}}
apply plugin: 'kotlin-parcelize' apply plugin: 'kotlin-parcelize'
@@ -118,35 +121,46 @@ kotlin {
} }
} }
{{/jvm-spring-restclient}} {{/jvm-spring-restclient}}
{{#kotlinx-datetime}}
kotlin {
sourceSets {
all {
languageSettings {
optIn("kotlin.time.ExperimentalTime")
}
}
}
}
{{/kotlinx-datetime}}
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
{{^doNotUseRxAndCoroutines}} {{^doNotUseRxAndCoroutines}}
{{#useCoroutines}} {{#useCoroutines}}
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"
{{/useCoroutines}} {{/useCoroutines}}
{{/doNotUseRxAndCoroutines}} {{/doNotUseRxAndCoroutines}}
{{#moshi}} {{#moshi}}
{{^moshiCodeGen}} {{^moshiCodeGen}}
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
{{/moshiCodeGen}} {{/moshiCodeGen}}
{{#moshiCodeGen}} {{#moshiCodeGen}}
implementation "com.squareup.moshi:moshi:1.15.1" implementation "com.squareup.moshi:moshi:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
kapt "com.squareup.moshi:moshi-kotlin-codegen:1.15.1" ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.2"
{{/moshiCodeGen}} {{/moshiCodeGen}}
{{/moshi}} {{/moshi}}
{{#gson}} {{#gson}}
implementation "com.google.code.gson:gson:2.10.1" implementation "com.google.code.gson:gson:2.13.2"
{{/gson}} {{/gson}}
{{#jackson}} {{#jackson}}
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0"
{{/jackson}} {{/jackson}}
{{#kotlinx_serialization}} {{#kotlinx_serialization}}
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0"
{{/kotlinx_serialization}} {{/kotlinx_serialization}}
{{#jvm-ktor}} {{#jvm-ktor}}
implementation "io.ktor:ktor-client-core:$ktor_version" implementation "io.ktor:ktor-client-core:$ktor_version"
@@ -161,29 +175,29 @@ dependencies {
{{/jackson}} {{/jackson}}
{{/jvm-ktor}} {{/jvm-ktor}}
{{#jvm-okhttp4}} {{#jvm-okhttp4}}
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
{{/jvm-okhttp4}} {{/jvm-okhttp4}}
{{#jvm-spring-webclient}} {{#jvm-spring-webclient}}
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
implementation "io.projectreactor:reactor-core:3.6.5" implementation "io.projectreactor:reactor-core:3.7.11"
{{/jvm-spring-webclient}} {{/jvm-spring-webclient}}
{{#jvm-spring-restclient}} {{#jvm-spring-restclient}}
implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version" implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version"
{{/jvm-spring-restclient}} {{/jvm-spring-restclient}}
{{#threetenbp}} {{#threetenbp}}
implementation "org.threeten:threetenbp:1.6.8" implementation "org.threeten:threetenbp:1.7.2"
{{/threetenbp}} {{/threetenbp}}
{{#kotlinx-datetime}} {{#kotlinx-datetime}}
implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.5.0" implementation "org.jetbrains.kotlinx:kotlinx-datetime:0.7.1"
{{/kotlinx-datetime}} {{/kotlinx-datetime}}
{{#jvm-retrofit2}} {{#jvm-retrofit2}}
{{#hasOAuthMethods}} {{#hasOAuthMethods}}
implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2"
{{/hasOAuthMethods}} {{/hasOAuthMethods}}
implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" implementation "com.squareup.okhttp3:logging-interceptor:5.1.0"
{{#useRxJava3}} {{#useRxJava3}}
implementation "io.reactivex.rxjava3:rxjava:$rxJava3Version" implementation "io.reactivex.rxjava3:rxjava:$rxJava3Version"
implementation "com.squareup.retrofit2:adapter-rxjava3:2.10.0" implementation "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"
{{/useRxJava3}} {{/useRxJava3}}
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
{{#gson}} {{#gson}}

View File

@@ -4,7 +4,7 @@ distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
{{/jvm-volley}} {{/jvm-volley}}
{{^jvm-volley}} {{^jvm-volley}}
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
{{/jvm-volley}} {{/jvm-volley}}
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -11,7 +11,7 @@ import com.google.gson.stream.JsonWriter
import com.google.gson.stream.JsonToken.NULL import com.google.gson.stream.JsonToken.NULL
import java.io.IOException import java.io.IOException
{{/gson}} {{/gson}}
import kotlinx.datetime.Instant import kotlin.time.Instant
{{#moshi}} {{#moshi}}
{{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class InstantAdapter { {{#nonPublicApi}}internal {{/nonPublicApi}}{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class InstantAdapter {

View File

@@ -23,7 +23,8 @@ import org.threeten.bp.LocalDateTime
import org.threeten.bp.OffsetDateTime import org.threeten.bp.OffsetDateTime
{{/threetenbp}} {{/threetenbp}}
{{#kotlinx-datetime}} {{#kotlinx-datetime}}
import kotlinx.datetime.Instant import kotlin.time.Instant
import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalTime import kotlinx.datetime.LocalTime
{{/kotlinx-datetime}} {{/kotlinx-datetime}}
import java.util.UUID import java.util.UUID
@@ -67,6 +68,7 @@ import java.util.concurrent.atomic.AtomicLong
.add(OffsetDateTimeAdapter()) .add(OffsetDateTimeAdapter())
{{#kotlinx-datetime}} {{#kotlinx-datetime}}
.add(InstantAdapter()) .add(InstantAdapter())
.add(LocalDateAdapter())
.add(LocalTimeAdapter()) .add(LocalTimeAdapter())
{{/kotlinx-datetime}} {{/kotlinx-datetime}}
.add(LocalDateTimeAdapter()) .add(LocalDateTimeAdapter())
@@ -94,6 +96,7 @@ import java.util.concurrent.atomic.AtomicLong
.registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter()) .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
{{#kotlinx-datetime}} {{#kotlinx-datetime}}
.registerTypeAdapter(Instant::class.java, InstantAdapter()) .registerTypeAdapter(Instant::class.java, InstantAdapter())
.registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
.registerTypeAdapter(LocalTime::class.java, LocalTimeAdapter()) .registerTypeAdapter(LocalTime::class.java, LocalTimeAdapter())
{{/kotlinx-datetime}} {{/kotlinx-datetime}}
.registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter()) .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())

View File

@@ -27,7 +27,7 @@ import io.vertx.ext.web.client.WebClient
import io.vertx.uritemplate.UriTemplate import io.vertx.uritemplate.UriTemplate
{{#useCoroutines}} {{#useCoroutines}}
import io.vertx.kotlin.coroutines.await import io.vertx.kotlin.coroutines.coAwait
import io.vertx.kotlin.coroutines.dispatcher import io.vertx.kotlin.coroutines.dispatcher
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
@@ -119,7 +119,7 @@ import {{packageName}}.infrastructure.*
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse) throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
} }
} }
}{{#useCoroutines}}.await(){{/useCoroutines}} }{{#useCoroutines}}.coAwait(){{/useCoroutines}}
} }
/** /**

View File

@@ -1,17 +1,17 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins { plugins {
kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}} kotlin("multiplatform"){{^omitGradlePluginVersions}} version "2.2.20" // kotlin_version{{/omitGradlePluginVersions}}
kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.1.21" // kotlin_version{{/omitGradlePluginVersions}} kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "2.2.20" // kotlin_version{{/omitGradlePluginVersions}}
} }
group = "{{groupId}}" group = "{{groupId}}"
version = "{{artifactVersion}}" version = "{{artifactVersion}}"
val kotlin_version = "2.1.21" val kotlin_version = "2.2.20"
val coroutines_version = "1.10.2" val coroutines_version = "1.10.2"
val serialization_version = "1.8.1" val serialization_version = "1.9.0"
val ktor_version = "3.1.3" val ktor_version = "3.2.3"
repositories { repositories {
mavenCentral() mavenCentral()
@@ -43,7 +43,7 @@ kotlin {
api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
{{#kotlinx-datetime}} {{#kotlinx-datetime}}
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1")
{{/kotlinx-datetime}} {{/kotlinx-datetime}}
} }
} }
@@ -79,21 +79,25 @@ kotlin {
api("io.ktor:ktor-client-js:$ktor_version") api("io.ktor:ktor-client-js:$ktor_version")
} }
} }
{{#kotlinx-datetime}}
all {
languageSettings {
optIn("kotlin.time.ExperimentalTime")
}
}
{{/kotlinx-datetime}}
} }
} }
tasks { tasks {
register("iosTest") { register<Exec>("iosTest") {
val device = project.findProperty("device")?.toString() ?: "iPhone 8" val device = project.findProperty("device")?.toString() ?: "iPhone 8"
dependsOn("linkDebugTestIosX64") dependsOn("linkDebugTestIosX64")
group = JavaBasePlugin.VERIFICATION_GROUP group = JavaBasePlugin.VERIFICATION_GROUP
description = "Execute unit tests on ${device} simulator" description = "Execute unit tests on ${device} simulator"
doLast { val binary = kotlin.targets.getByName<KotlinNativeTarget>("iosX64").binaries.getTest("DEBUG")
val binary = kotlin.targets.getByName<KotlinNativeTarget>("iosX64").binaries.getTest("DEBUG") commandLine("xcrun", "simctl", "spawn", device, binary.outputFile)
exec {
commandLine("xcrun", "simctl", "spawn", device, binary.outputFile)
}
}
} }
register("test") { register("test") {
dependsOn("allTests") dependsOn("allTests")

View File

@@ -3,13 +3,14 @@ package {{packageName}}.infrastructure
import kotlinx.serialization.* import kotlinx.serialization.*
import kotlinx.serialization.descriptors.* import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.* import kotlinx.serialization.encoding.*
import kotlin.io.encoding.Base64
@Serializable(Base64ByteArray.Companion::class) @Serializable(Base64ByteArray.Companion::class)
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class Base64ByteArray({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: ByteArray) { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class Base64ByteArray({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: ByteArray) {
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object : KSerializer<Base64ByteArray> { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object : KSerializer<Base64ByteArray> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value))
override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString()))
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@@ -24,6 +25,6 @@ import kotlinx.serialization.encoding.*
} }
override fun toString(): String { override fun toString(): String {
return "Base64ByteArray(${hex(value)})" return "Base64ByteArray(${value.toHexString()})"
} }
} }

View File

@@ -1,104 +0,0 @@
package {{packageName}}.infrastructure
import io.ktor.utils.io.core.*
import kotlinx.io.Source
import kotlinx.io.readByteArray
import kotlin.experimental.and
private val digits = "0123456789abcdef".toCharArray()
private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
private const val BASE64_MASK: Byte = 0x3f
private const val BASE64_PAD = '='
private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) }
private fun String.toCharArray(): CharArray = CharArray(length) { get(it) }
private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 }
private fun Int.toBase64(): Char = BASE64_ALPHABET[this]
private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK
internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64()
internal fun String.decodeBase64Bytes(): ByteArray =
buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray()
/**
* Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes.
*
* Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt
*/
internal fun hex(bytes: ByteArray): String {
val result = CharArray(bytes.size * 2)
var resultIndex = 0
val digits = digits
for (element in bytes) {
val b = element.toInt() and 0xff
result[resultIndex++] = digits[b shr 4]
result[resultIndex++] = digits[b and 0x0f]
}
return result.concatToString()
}
/**
* Decode bytes from HEX string. It should be no spaces and `0x` prefixes.
*
* Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt
*/
internal fun hex(s: String): ByteArray {
val result = ByteArray(s.length / 2)
for (idx in result.indices) {
val srcIdx = idx * 2
val high = s[srcIdx].toString().toInt(16) shl 4
val low = s[srcIdx + 1].toString().toInt(16)
result[idx] = (high or low).toByte()
}
return result
}
/**
* Encode [ByteReadPacket] in base64 format.
*
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
*/
private fun Source.encodeBase64(): String = buildString {
val data = ByteArray(3)
while (remaining > 0) {
val read = readAvailable(data)
data.clearFrom(read)
val padSize = (data.size - read) * 8 / 6
val chunk = ((data[0].toInt() and 0xFF) shl 16) or
((data[1].toInt() and 0xFF) shl 8) or
(data[2].toInt() and 0xFF)
for (index in data.size downTo padSize) {
val char = (chunk shr (6 * index)) and BASE64_MASK.toInt()
append(char.toBase64())
}
repeat(padSize) { append(BASE64_PAD) }
}
}
/**
* Decode [ByteReadPacket] from base64 format
*
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
*/
@Suppress("DEPRECATION")
private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket {
val data = ByteArray(4)
while (remaining > 0) {
val read = readAvailable(data)
val chunk = data.foldIndexed(0) { index, result, current ->
result or (current.fromBase64().toInt() shl ((3 - index) * 6))
}
for (index in data.size - 2 downTo (data.size - read)) {
val origin = (chunk shr (8 * index)) and 0xff
writeByte(origin.toByte())
}
}
}

View File

@@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.*
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class OctetByteArray({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: ByteArray) { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}class OctetByteArray({{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}val value: ByteArray) {
{{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object : KSerializer<OctetByteArray> { {{^nonPublicApi}}{{#explicitApi}}public {{/explicitApi}}{{/nonPublicApi}}companion object : KSerializer<OctetByteArray> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString())
override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray())
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@@ -24,6 +24,6 @@ import kotlinx.serialization.encoding.*
} }
override fun toString(): String { override fun toString(): String {
return "OctetByteArray(${hex(value)})" return "OctetByteArray(${value.toHexString()})"
} }
} }

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -16,7 +16,6 @@ class CustomTests : ShouldSpec({
parsedResult.body shouldContain """ parsedResult.body shouldContain """
Content-Disposition: form-data; name="my-file" Content-Disposition: form-data; name="my-file"
Content-Length: 0
""".trimIndent() """.trimIndent()
} }
@@ -27,8 +26,7 @@ class CustomTests : ShouldSpec({
parsedResult.body shouldContain """ parsedResult.body shouldContain """
Content-Disposition: form-data; name="my-file"; filename="test.txt" Content-Disposition: form-data; name="my-file"; filename="test.txt"
Content-Type: text/plain Content-Type: text/plain
Content-Length: 12
testing only testing only
""".trimIndent() """.trimIndent()
} }
@@ -40,15 +38,13 @@ class CustomTests : ShouldSpec({
parsedResult.body shouldContain """ parsedResult.body shouldContain """
Content-Disposition: form-data; name="files"; filename="test.txt" Content-Disposition: form-data; name="files"; filename="test.txt"
Content-Type: text/plain Content-Type: text/plain
Content-Length: 12
testing only testing only
""".trimIndent() """.trimIndent()
parsedResult.body shouldContain """ parsedResult.body shouldContain """
Content-Disposition: form-data; name="files"; filename="otherTestFile.txt" Content-Disposition: form-data; name="files"; filename="otherTestFile.txt"
Content-Type: text/plain Content-Type: text/plain
Content-Length: 17
Another test file Another test file
""".trimIndent() """.trimIndent()

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,14 +2,14 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spring_boot_version = "3.2.5" ext.spring_boot_version = "3.5.5"
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -61,8 +61,8 @@ kotlin {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0"
implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version" implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,14 +2,14 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spring_boot_version = "3.2.5" ext.spring_boot_version = "3.5.5"
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -62,9 +62,9 @@ kotlin {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.20.0"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.1" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0"
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version" implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
implementation "io.projectreactor:reactor-core:3.6.5" implementation "io.projectreactor:reactor-core:3.7.11"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,14 +2,14 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.retrofitVersion = '2.10.0' ext.retrofitVersion = '3.0.0'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,9 +55,9 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"
implementation "com.google.code.gson:gson:2.10.1" implementation "com.google.code.gson:gson:2.13.2"
implementation "com.squareup.okhttp3:logging-interceptor:4.12.0" implementation "com.squareup.okhttp3:logging-interceptor:5.1.0"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion" implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -13,8 +13,8 @@ For more information, please visit [https://example.org](https://example.org)
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -56,8 +56,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3" implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -13,8 +13,8 @@ For more information, please visit [https://example.org](https://example.org)
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -12,8 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.7.21 * Kotlin 2.2.20
* Gradle 7.5 * Gradle 8.14
## Build ## Build

View File

@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0' version '1.0.0'
wrapper { wrapper {
gradleVersion = '8.7' gradleVersion = '8.14.3'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
} }
buildscript { buildscript {
ext.kotlin_version = '1.9.23' ext.kotlin_version = '2.2.20'
ext.spotless_version = "6.25.0" ext.spotless_version = "7.2.1"
repositories { repositories {
maven { url "https://repo1.maven.org/maven2" } maven { url "https://repo1.maven.org/maven2" }
@@ -55,8 +55,8 @@ test {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "com.squareup.moshi:moshi-kotlin:1.15.1" implementation "com.squareup.moshi:moshi-kotlin:1.15.2"
implementation "com.squareup.moshi:moshi-adapters:1.15.1" implementation "com.squareup.moshi:moshi-adapters:1.15.2"
implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "com.squareup.okhttp3:okhttp:5.1.0"
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
} }

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -15,7 +15,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt

View File

@@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.5.10 * Kotlin 2.2.20
## Build ## Build

View File

@@ -1,17 +1,17 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins { plugins {
kotlin("multiplatform") version "2.1.21" // kotlin_version kotlin("multiplatform") version "2.2.20" // kotlin_version
kotlin("plugin.serialization") version "2.1.21" // kotlin_version kotlin("plugin.serialization") version "2.2.20" // kotlin_version
} }
group = "org.openapitools" group = "org.openapitools"
version = "1.0.0" version = "1.0.0"
val kotlin_version = "2.1.21" val kotlin_version = "2.2.20"
val coroutines_version = "1.10.2" val coroutines_version = "1.10.2"
val serialization_version = "1.8.1" val serialization_version = "1.9.0"
val ktor_version = "3.1.3" val ktor_version = "3.2.3"
repositories { repositories {
mavenCentral() mavenCentral()
@@ -38,7 +38,7 @@ kotlin {
api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-client-content-negotiation:$ktor_version")
api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1")
} }
} }
@@ -73,21 +73,23 @@ kotlin {
api("io.ktor:ktor-client-js:$ktor_version") api("io.ktor:ktor-client-js:$ktor_version")
} }
} }
all {
languageSettings {
optIn("kotlin.time.ExperimentalTime")
}
}
} }
} }
tasks { tasks {
register("iosTest") { register<Exec>("iosTest") {
val device = project.findProperty("device")?.toString() ?: "iPhone 8" val device = project.findProperty("device")?.toString() ?: "iPhone 8"
dependsOn("linkDebugTestIosX64") dependsOn("linkDebugTestIosX64")
group = JavaBasePlugin.VERIFICATION_GROUP group = JavaBasePlugin.VERIFICATION_GROUP
description = "Execute unit tests on ${device} simulator" description = "Execute unit tests on ${device} simulator"
doLast { val binary = kotlin.targets.getByName<KotlinNativeTarget>("iosX64").binaries.getTest("DEBUG")
val binary = kotlin.targets.getByName<KotlinNativeTarget>("iosX64").binaries.getTest("DEBUG") commandLine("xcrun", "simctl", "spawn", device, binary.outputFile)
exec {
commandLine("xcrun", "simctl", "spawn", device, binary.outputFile)
}
}
} }
register("test") { register("test") {
dependsOn("allTests") dependsOn("allTests")

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View File

@@ -13,8 +13,10 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@@ -25,7 +27,8 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -3,13 +3,14 @@ package org.openapitools.client.infrastructure
import kotlinx.serialization.* import kotlinx.serialization.*
import kotlinx.serialization.descriptors.* import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.* import kotlinx.serialization.encoding.*
import kotlin.io.encoding.Base64
@Serializable(Base64ByteArray.Companion::class) @Serializable(Base64ByteArray.Companion::class)
class Base64ByteArray(val value: ByteArray) { class Base64ByteArray(val value: ByteArray) {
companion object : KSerializer<Base64ByteArray> { companion object : KSerializer<Base64ByteArray> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING) override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("Base64ByteArray", PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(value.value.encodeBase64()) override fun serialize(encoder: Encoder, value: Base64ByteArray): Unit = encoder.encodeString(Base64.encode(value.value))
override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(decoder.decodeString().decodeBase64Bytes()) override fun deserialize(decoder: Decoder): Base64ByteArray = Base64ByteArray(Base64.decode(decoder.decodeString()))
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@@ -24,6 +25,6 @@ class Base64ByteArray(val value: ByteArray) {
} }
override fun toString(): String { override fun toString(): String {
return "Base64ByteArray(${hex(value)})" return "Base64ByteArray(${value.toHexString()})"
} }
} }

View File

@@ -1,104 +0,0 @@
package org.openapitools.client.infrastructure
import io.ktor.utils.io.core.*
import kotlinx.io.Source
import kotlinx.io.readByteArray
import kotlin.experimental.and
private val digits = "0123456789abcdef".toCharArray()
private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
private const val BASE64_MASK: Byte = 0x3f
private const val BASE64_PAD = '='
private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) }
private fun String.toCharArray(): CharArray = CharArray(length) { get(it) }
private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 }
private fun Int.toBase64(): Char = BASE64_ALPHABET[this]
private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK
internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64()
internal fun String.decodeBase64Bytes(): ByteArray =
buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readByteArray()
/**
* Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes.
*
* Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt
*/
internal fun hex(bytes: ByteArray): String {
val result = CharArray(bytes.size * 2)
var resultIndex = 0
val digits = digits
for (element in bytes) {
val b = element.toInt() and 0xff
result[resultIndex++] = digits[b shr 4]
result[resultIndex++] = digits[b and 0x0f]
}
return result.concatToString()
}
/**
* Decode bytes from HEX string. It should be no spaces and `0x` prefixes.
*
* Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt
*/
internal fun hex(s: String): ByteArray {
val result = ByteArray(s.length / 2)
for (idx in result.indices) {
val srcIdx = idx * 2
val high = s[srcIdx].toString().toInt(16) shl 4
val low = s[srcIdx + 1].toString().toInt(16)
result[idx] = (high or low).toByte()
}
return result
}
/**
* Encode [ByteReadPacket] in base64 format.
*
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
*/
private fun Source.encodeBase64(): String = buildString {
val data = ByteArray(3)
while (remaining > 0) {
val read = readAvailable(data)
data.clearFrom(read)
val padSize = (data.size - read) * 8 / 6
val chunk = ((data[0].toInt() and 0xFF) shl 16) or
((data[1].toInt() and 0xFF) shl 8) or
(data[2].toInt() and 0xFF)
for (index in data.size downTo padSize) {
val char = (chunk shr (6 * index)) and BASE64_MASK.toInt()
append(char.toBase64())
}
repeat(padSize) { append(BASE64_PAD) }
}
}
/**
* Decode [ByteReadPacket] from base64 format
*
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
*/
@Suppress("DEPRECATION")
private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket {
val data = ByteArray(4)
while (remaining > 0) {
val read = readAvailable(data)
val chunk = data.foldIndexed(0) { index, result, current ->
result or (current.fromBase64().toInt() shl ((3 - index) * 6))
}
for (index in data.size - 2 downTo (data.size - read)) {
val origin = (chunk shr (8 * index)) and 0xff
writeByte(origin.toByte())
}
}
}

View File

@@ -8,8 +8,8 @@ import kotlinx.serialization.encoding.*
class OctetByteArray(val value: ByteArray) { class OctetByteArray(val value: ByteArray) {
companion object : KSerializer<OctetByteArray> { companion object : KSerializer<OctetByteArray> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING) override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("OctetByteArray", PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(hex(value.value)) override fun serialize(encoder: Encoder, value: OctetByteArray): Unit = encoder.encodeString(value.value.toHexString())
override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(hex(decoder.decodeString())) override fun deserialize(decoder: Decoder): OctetByteArray = OctetByteArray(decoder.decodeString().hexToByteArray())
} }
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
@@ -24,6 +24,6 @@ class OctetByteArray(val value: ByteArray) {
} }
override fun toString(): String { override fun toString(): String {
return "OctetByteArray(${hex(value)})" return "OctetByteArray(${value.toHexString()})"
} }
} }

View File

@@ -1,100 +0,0 @@
package org.openapitools.client.infrastructure
import io.ktor.utils.io.core.*
import kotlin.experimental.and
private val digits = "0123456789abcdef".toCharArray()
private const val BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
private const val BASE64_MASK: Byte = 0x3f
private const val BASE64_PAD = '='
private val BASE64_INVERSE_ALPHABET = IntArray(256) { BASE64_ALPHABET.indexOf(it.toChar()) }
private fun String.toCharArray(): CharArray = CharArray(length) { get(it) }
private fun ByteArray.clearFrom(from: Int) = (from until size).forEach { this[it] = 0 }
private fun Int.toBase64(): Char = BASE64_ALPHABET[this]
private fun Byte.fromBase64(): Byte = BASE64_INVERSE_ALPHABET[toInt() and 0xff].toByte() and BASE64_MASK
internal fun ByteArray.encodeBase64(): String = buildPacket { writeFully(this@encodeBase64) }.encodeBase64()
internal fun String.decodeBase64Bytes(): ByteArray = buildPacket { writeText(dropLastWhile { it == BASE64_PAD }) }.decodeBase64Bytes().readBytes()
/**
* Encode [bytes] as a HEX string with no spaces, newlines and `0x` prefixes.
*
* Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt
*/
internal fun hex(bytes: ByteArray): String {
val result = CharArray(bytes.size * 2)
var resultIndex = 0
val digits = digits
for (element in bytes) {
val b = element.toInt() and 0xff
result[resultIndex++] = digits[b shr 4]
result[resultIndex++] = digits[b and 0x0f]
}
return result.concatToString()
}
/**
* Decode bytes from HEX string. It should be no spaces and `0x` prefixes.
*
* Taken from https://github.com/ktorio/ktor/blob/master/ktor-utils/common/src/io/ktor/util/Crypto.kt
*/
internal fun hex(s: String): ByteArray {
val result = ByteArray(s.length / 2)
for (idx in result.indices) {
val srcIdx = idx * 2
val high = s[srcIdx].toString().toInt(16) shl 4
val low = s[srcIdx + 1].toString().toInt(16)
result[idx] = (high or low).toByte()
}
return result
}
/**
* Encode [ByteReadPacket] in base64 format.
*
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
*/
private fun ByteReadPacket.encodeBase64(): String = buildString {
val data = ByteArray(3)
while (remaining > 0) {
val read = readAvailable(data)
data.clearFrom(read)
val padSize = (data.size - read) * 8 / 6
val chunk = ((data[0].toInt() and 0xFF) shl 16) or
((data[1].toInt() and 0xFF) shl 8) or
(data[2].toInt() and 0xFF)
for (index in data.size downTo padSize) {
val char = (chunk shr (6 * index)) and BASE64_MASK.toInt()
append(char.toBase64())
}
repeat(padSize) { append(BASE64_PAD) }
}
}
/**
* Decode [ByteReadPacket] from base64 format
*
* Taken from https://github.com/ktorio/ktor/blob/424d1d2cfaa3281302c60af9500f738c8c2fc846/ktor-utils/common/src/io/ktor/util/Base64.kt
*/
private fun ByteReadPacket.decodeBase64Bytes(): Input = buildPacket {
val data = ByteArray(4)
while (remaining > 0) {
val read = readAvailable(data)
val chunk = data.foldIndexed(0) { index, result, current ->
result or (current.fromBase64().toInt() shl ((3 - index) * 6))
}
for (index in data.size - 2 downTo (data.size - read)) {
val origin = (chunk shr (8 * index)) and 0xff
writeByte(origin.toByte())
}
}
}

View File

@@ -16,7 +16,6 @@ src/commonMain/kotlin/org/openapitools/client/auth/OAuth.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/ApiClient.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/Base64ByteArray.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/Bytes.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/HttpResponse.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/OctetByteArray.kt
src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt src/commonMain/kotlin/org/openapitools/client/infrastructure/PartConfig.kt

View File

@@ -12,7 +12,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
## Requires ## Requires
* Kotlin 1.5.10 * Kotlin 2.2.20
## Build ## Build

View File

@@ -1,17 +1,17 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins { plugins {
kotlin("multiplatform") version "2.1.21" // kotlin_version kotlin("multiplatform") version "2.2.20" // kotlin_version
kotlin("plugin.serialization") version "2.1.21" // kotlin_version kotlin("plugin.serialization") version "2.2.20" // kotlin_version
} }
group = "org.openapitools" group = "org.openapitools"
version = "1.0.0" version = "1.0.0"
val kotlin_version = "2.1.21" val kotlin_version = "2.2.20"
val coroutines_version = "1.10.2" val coroutines_version = "1.10.2"
val serialization_version = "1.8.1" val serialization_version = "1.9.0"
val ktor_version = "3.1.3" val ktor_version = "3.2.3"
repositories { repositories {
mavenCentral() mavenCentral()
@@ -38,7 +38,7 @@ kotlin {
api("io.ktor:ktor-client-content-negotiation:$ktor_version") api("io.ktor:ktor-client-content-negotiation:$ktor_version")
api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") api("io.ktor:ktor-serialization-kotlinx-json:$ktor_version")
api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2") api("org.jetbrains.kotlinx:kotlinx-datetime:0.7.1")
} }
} }
@@ -73,21 +73,23 @@ kotlin {
api("io.ktor:ktor-client-js:$ktor_version") api("io.ktor:ktor-client-js:$ktor_version")
} }
} }
all {
languageSettings {
optIn("kotlin.time.ExperimentalTime")
}
}
} }
} }
tasks { tasks {
register("iosTest") { register<Exec>("iosTest") {
val device = project.findProperty("device")?.toString() ?: "iPhone 8" val device = project.findProperty("device")?.toString() ?: "iPhone 8"
dependsOn("linkDebugTestIosX64") dependsOn("linkDebugTestIosX64")
group = JavaBasePlugin.VERIFICATION_GROUP group = JavaBasePlugin.VERIFICATION_GROUP
description = "Execute unit tests on ${device} simulator" description = "Execute unit tests on ${device} simulator"
doLast { val binary = kotlin.targets.getByName<KotlinNativeTarget>("iosX64").binaries.getTest("DEBUG")
val binary = kotlin.targets.getByName<KotlinNativeTarget>("iosX64").binaries.getTest("DEBUG") commandLine("xcrun", "simctl", "spawn", device, binary.outputFile)
exec {
commandLine("xcrun", "simctl", "spawn", device, binary.outputFile)
}
}
} }
register("test") { register("test") {
dependsOn("allTests") dependsOn("allTests")

Some files were not shown because too many files have changed in this diff Show More