Skip to content

Commit b1b556a

Browse files
wing328pkubowicz
andauthored
[kotlin] Add integration test for query params (#22695)
* [kotlin] Add integration test for query params This is a test for a regression from #22512 where param values were written as a list. * add test implementation for kotlin spring client * add sha tests --------- Co-authored-by: Piotr Kubowicz <piotr.kubowicz@gmail.com>
1 parent 7671288 commit b1b556a

File tree

53 files changed

+91
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+91
-58
lines changed

bin/utils/test_file_list.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@
6262
sha256: b2093528aac971193f2863a70f46eea45cf8bda79120b133a614599e80d8b46d
6363
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
6464
sha256: 1d3fb01f65e98290b1d3eece28014c7d3e3f2fdf18e7110249d3c591cc4642ab
65+
- filename: "samples/client/petstore/kotlin-jvm-spring-3-restclient/src/test/kotlin/org/openapitools/integration/PetApiTest.kt"
66+
sha256: 82a6be39c1ed3dada96dfa1833a6709834cb3f9f9d50a19cbd9d49699e46df4f
67+
- filename: "samples/client/petstore/kotlin-jvm-spring-3-restclient/src/test/kotlin/org/openapitools/integration/UserApiTest.kt"
68+
sha256: bc64fb94857a3598e1332f1278307c3078ea9ec4b4aa75690e6eda86e9729a8d

modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,16 @@ kotlin {
108108
explicitApi()
109109
}
110110
{{/explicitApi}}
111-
{{#jvm-spring-webclient}}{{#useSpringBoot3}}
111+
{{#jvm-spring-webclient}}
112+
{{#useSpringBoot3}}
112113
113114
kotlin {
114115
jvmToolchain {
115116
languageVersion.set(JavaLanguageVersion.of(17))
116117
}
117118
}
118-
{{/useSpringBoot3}}{{/jvm-spring-webclient}}
119+
{{/useSpringBoot3}}
120+
{{/jvm-spring-webclient}}
119121
{{#jvm-spring-restclient}}
120122
121123
kotlin {
@@ -219,7 +221,6 @@ dependencies {
219221
{{/jackson}}
220222
implementation "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
221223
{{/jvm-retrofit2}}
222-
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
223224
{{#jvm-vertx}}
224225
implementation "io.vertx:vertx-web-client:$vertx_version"
225226
implementation "io.vertx:vertx-core:$vertx_version"
@@ -229,6 +230,10 @@ dependencies {
229230
implementation "io.vertx:vertx-lang-kotlin-coroutines:$vertx_version"
230231
{{/useCoroutines}}
231232
{{/jvm-vertx}}
233+
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
234+
{{#jvm-spring}}
235+
testImplementation "org.springframework.boot:spring-boot-test:$spring_boot_version"
236+
{{/jvm-spring}}
232237
}
233238
{{#kotlinx_serialization}}
234239

samples/client/echo_api/kotlin-jvm-okhttp/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ test {
5252
useJUnitPlatform()
5353
}
5454

55-
5655
dependencies {
5756
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
5857
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

samples/client/echo_api/kotlin-jvm-spring-3-restclient/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ test {
5353
useJUnitPlatform()
5454
}
5555

56-
5756
kotlin {
5857
jvmToolchain {
5958
languageVersion.set(JavaLanguageVersion.of(17))
@@ -67,6 +66,7 @@ dependencies {
6766
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.0"
6867
implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version"
6968
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
69+
testImplementation "org.springframework.boot:spring-boot-test:$spring_boot_version"
7070
}
7171

7272
java {

samples/client/echo_api/kotlin-jvm-spring-3-webclient/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,12 @@ test {
5353
useJUnitPlatform()
5454
}
5555

56-
5756
kotlin {
5857
jvmToolchain {
5958
languageVersion.set(JavaLanguageVersion.of(17))
6059
}
6160
}
6261

63-
6462
dependencies {
6563
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
6664
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
@@ -69,6 +67,7 @@ dependencies {
6967
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
7068
implementation "io.projectreactor:reactor-core:3.7.11"
7169
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
70+
testImplementation "org.springframework.boot:spring-boot-test:$spring_boot_version"
7271
}
7372

7473
java {

samples/client/echo_api/kotlin-model-prefix-type-mappings/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ test {
5353
useJUnitPlatform()
5454
}
5555

56-
5756
dependencies {
5857
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
5958
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"

samples/client/others/kotlin-integer-enum/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ test {
5252
useJUnitPlatform()
5353
}
5454

55-
5655
dependencies {
5756
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
5857
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

samples/client/others/kotlin-jvm-okhttp-non-ascii-headers/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ test {
5252
useJUnitPlatform()
5353
}
5454

55-
5655
dependencies {
5756
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
5857
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

samples/client/others/kotlin-jvm-okhttp-parameter-tests/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ test {
5252
useJUnitPlatform()
5353
}
5454

55-
5655
dependencies {
5756
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
5857
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

samples/client/others/kotlin-jvm-okhttp-path-comments/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ test {
5252
useJUnitPlatform()
5353
}
5454

55-
5655
dependencies {
5756
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
5857
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

0 commit comments

Comments
 (0)