From e2346b18e37def85a866a8f69a2e443363945ca6 Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Sat, 29 Feb 2020 01:22:11 -0500 Subject: [PATCH 1/4] Remove kotlin-reflect dependency when using CodeGen --- .../resources/kotlin-client/build.gradle.mustache | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 31b844fd30cc..23379c05bdab 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -35,9 +35,9 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" {{#moshi}} {{^moshiCodeGen}} + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" {{/moshiCodeGen}} compile "com.squareup.moshi:moshi-adapters:1.9.2" @@ -55,9 +55,21 @@ dependencies { compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" {{/jackson}} {{#jvm-okhttp3}} + {{^moshi}} + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + {{/moshi}} + {{#moshi}}{{#modeCodeGen}} + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + {{/modeCodeGen}}{{/moshi}} compile "com.squareup.okhttp3:okhttp:3.12.6" {{/jvm-okhttp3}} {{#jvm-okhttp4}} + {{^moshi}} + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + {{/moshi}} + {{#moshi}}{{#modeCodeGen}} + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + {{/modeCodeGen}}{{/moshi}} compile "com.squareup.okhttp3:okhttp:4.2.2" {{/jvm-okhttp4}} {{#threetenbp}} From 1cd7221a7dff3871ebbc8ec210cb5e7010f8b04f Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Mon, 2 Mar 2020 10:34:13 -0500 Subject: [PATCH 2/4] Update Kotlin tests --- .../petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-gson/build.gradle | 3 ++- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-json-request-string/build.gradle | 1 + .../kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-moshi-codegen/build.gradle | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- .../kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-nonpublic/build.gradle | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- .../petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-nullable/build.gradle | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- .../petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-okhttp3/build.gradle | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- .../petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-string/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-string/build.gradle | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin-threetenbp/build.gradle | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- samples/client/petstore/kotlin/build.gradle | 1 + .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +------- 28 files changed, 29 insertions(+), 69 deletions(-) diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/build.gradle b/samples/client/petstore/kotlin-gson/build.gradle index b47c93982424..d96117b408de 100644 --- a/samples/client/petstore/kotlin-gson/build.gradle +++ b/samples/client/petstore/kotlin-gson/build.gradle @@ -29,8 +29,9 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.google.code.gson:gson:2.8.6" + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 7876fe75504d..ce93ee9b4808 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.gson.toJson(value, T::class.java).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-string/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle index 56be0bd0dd87..9a4f4c340693 100644 --- a/samples/client/petstore/kotlin-json-request-string/build.gradle +++ b/samples/client/petstore/kotlin-json-request-string/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/build.gradle b/samples/client/petstore/kotlin-moshi-codegen/build.gradle index 3790ead27946..ca8c84f14de4 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/build.gradle +++ b/samples/client/petstore/kotlin-moshi-codegen/build.gradle @@ -30,10 +30,10 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-adapters:1.9.2" compile "com.squareup.moshi:moshi:1.9.2" kapt "com.squareup.moshi:moshi-kotlin-codegen:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d3ecd7b31f8..feb9aeebbf67 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle index 56be0bd0dd87..9a4f4c340693 100644 --- a/samples/client/petstore/kotlin-nonpublic/build.gradle +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index c591f98d389a..c302931cf288 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ internal open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/build.gradle b/samples/client/petstore/kotlin-nullable/build.gradle index 56be0bd0dd87..9a4f4c340693 100644 --- a/samples/client/petstore/kotlin-nullable/build.gradle +++ b/samples/client/petstore/kotlin-nullable/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d3ecd7b31f8..feb9aeebbf67 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/build.gradle b/samples/client/petstore/kotlin-okhttp3/build.gradle index 662c2a62ce34..a89177b0a606 100644 --- a/samples/client/petstore/kotlin-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-okhttp3/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:3.12.6" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 1588da740d4a..941ad2843489 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -171,12 +171,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index 56be0bd0dd87..9a4f4c340693 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d3ecd7b31f8..feb9aeebbf67 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index 886101b0fbef..ebf3a9f32375 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" compile "org.threeten:threetenbp:1.4.0" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d3ecd7b31f8..feb9aeebbf67 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index bfbf77eb7fad..58592f031f65 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index 56be0bd0dd87..9a4f4c340693 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -32,6 +32,7 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5d3ecd7b31f8..feb9aeebbf67 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,12 +173,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } From 58678d972de5bded1d2a423c3f1799ef0764f8b6 Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Tue, 3 Mar 2020 13:13:02 -0500 Subject: [PATCH 3/4] Regenerated unit test samples --- .../petstore/kotlin-gson/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- samples/client/petstore/kotlin-jackson/build.gradle | 3 ++- .../kotlin-json-request-string/.openapi-generator/VERSION | 2 +- .../kotlin-moshi-codegen/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- .../kotlin-multiplatform/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-nonpublic/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- .../petstore/kotlin-nullable/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- .../petstore/kotlin-okhttp3/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- .../petstore/kotlin-retrofit2/.openapi-generator/VERSION | 2 +- .../petstore/kotlin-string/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- .../petstore/kotlin-threetenbp/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- samples/client/petstore/kotlin/.openapi-generator/VERSION | 2 +- .../org/openapitools/client/infrastructure/ApiClient.kt | 8 +++++++- 20 files changed, 69 insertions(+), 20 deletions(-) diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index ce93ee9b4808..7876fe75504d 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.gson.toJson(value, T::class.java).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-jackson/build.gradle b/samples/client/petstore/kotlin-jackson/build.gradle index 13a4b1407681..942e6bded3b7 100644 --- a/samples/client/petstore/kotlin-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jackson/build.gradle @@ -29,10 +29,11 @@ test { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.fasterxml.jackson.module:jackson-module-kotlin:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" + compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" + compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index feb9aeebbf67..5d3ecd7b31f8 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index c302931cf288..c591f98d389a 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ internal open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index feb9aeebbf67..5d3ecd7b31f8 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 941ad2843489..1588da740d4a 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -171,6 +171,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index feb9aeebbf67..5d3ecd7b31f8 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index feb9aeebbf67..5d3ecd7b31f8 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION index 58592f031f65..bfbf77eb7fad 100644 --- a/samples/client/petstore/kotlin/.openapi-generator/VERSION +++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.3-SNAPSHOT \ No newline at end of file +4.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index feb9aeebbf67..5d3ecd7b31f8 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -173,6 +173,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } From 038c75b648f26d53f4ff53228acb8ef6839b4434 Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Tue, 3 Mar 2020 13:17:11 -0500 Subject: [PATCH 4/4] Remove newline in generated build.gradle files --- .../resources/kotlin-client/build.gradle.mustache | 12 ++++++++---- samples/client/petstore/kotlin-gson/build.gradle | 1 - samples/client/petstore/kotlin-jackson/build.gradle | 1 - .../petstore/kotlin-json-request-string/build.gradle | 1 - .../petstore/kotlin-moshi-codegen/build.gradle | 1 - .../client/petstore/kotlin-nonpublic/build.gradle | 1 - samples/client/petstore/kotlin-nullable/build.gradle | 1 - samples/client/petstore/kotlin-okhttp3/build.gradle | 1 - samples/client/petstore/kotlin-string/build.gradle | 1 - .../client/petstore/kotlin-threetenbp/build.gradle | 1 - samples/client/petstore/kotlin/build.gradle | 1 - 11 files changed, 8 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 23379c05bdab..82a624d47005 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -58,18 +58,22 @@ dependencies { {{^moshi}} compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" {{/moshi}} - {{#moshi}}{{#modeCodeGen}} + {{#moshi}} + {{#modeCodeGen}} compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - {{/modeCodeGen}}{{/moshi}} + {{/modeCodeGen}} + {{/moshi}} compile "com.squareup.okhttp3:okhttp:3.12.6" {{/jvm-okhttp3}} {{#jvm-okhttp4}} {{^moshi}} compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" {{/moshi}} - {{#moshi}}{{#modeCodeGen}} + {{#moshi}} + {{#modeCodeGen}} compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - {{/modeCodeGen}}{{/moshi}} + {{/modeCodeGen}} + {{/moshi}} compile "com.squareup.okhttp3:okhttp:4.2.2" {{/jvm-okhttp4}} {{#threetenbp}} diff --git a/samples/client/petstore/kotlin-gson/build.gradle b/samples/client/petstore/kotlin-gson/build.gradle index d96117b408de..ce9cb568dd7b 100644 --- a/samples/client/petstore/kotlin-gson/build.gradle +++ b/samples/client/petstore/kotlin-gson/build.gradle @@ -31,7 +31,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "com.google.code.gson:gson:2.8.6" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-jackson/build.gradle b/samples/client/petstore/kotlin-jackson/build.gradle index 942e6bded3b7..c76aad33ca32 100644 --- a/samples/client/petstore/kotlin-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jackson/build.gradle @@ -33,7 +33,6 @@ dependencies { compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-json-request-string/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle index 9a4f4c340693..56be0bd0dd87 100644 --- a/samples/client/petstore/kotlin-json-request-string/build.gradle +++ b/samples/client/petstore/kotlin-json-request-string/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-moshi-codegen/build.gradle b/samples/client/petstore/kotlin-moshi-codegen/build.gradle index ca8c84f14de4..6b949799c398 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/build.gradle +++ b/samples/client/petstore/kotlin-moshi-codegen/build.gradle @@ -33,7 +33,6 @@ dependencies { compile "com.squareup.moshi:moshi-adapters:1.9.2" compile "com.squareup.moshi:moshi:1.9.2" kapt "com.squareup.moshi:moshi-kotlin-codegen:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle index 9a4f4c340693..56be0bd0dd87 100644 --- a/samples/client/petstore/kotlin-nonpublic/build.gradle +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-nullable/build.gradle b/samples/client/petstore/kotlin-nullable/build.gradle index 9a4f4c340693..56be0bd0dd87 100644 --- a/samples/client/petstore/kotlin-nullable/build.gradle +++ b/samples/client/petstore/kotlin-nullable/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-okhttp3/build.gradle b/samples/client/petstore/kotlin-okhttp3/build.gradle index a89177b0a606..662c2a62ce34 100644 --- a/samples/client/petstore/kotlin-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-okhttp3/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:3.12.6" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index 9a4f4c340693..56be0bd0dd87 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" } diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index ebf3a9f32375..886101b0fbef 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" compile "org.threeten:threetenbp:1.4.0" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index 9a4f4c340693..56be0bd0dd87 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -32,7 +32,6 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "com.squareup.moshi:moshi-kotlin:1.9.2" compile "com.squareup.moshi:moshi-adapters:1.9.2" - compile "com.squareup.okhttp3:okhttp:4.2.2" testCompile "io.kotlintest:kotlintest-runner-junit5:3.1.0" }