17 Commits

Author SHA1 Message Date
William Cheng
4ca8f9c384
Update kotlin client dependencies to newer versions (#18211)
* update kotlin client dependencies to newer versoins

* update
2024-03-23 21:21:20 +08:00
William Cheng
7d154c988c
[kotlin-client] add spotless plugin (#16645)
* add spotless plugin to kotlin client

* add spotless plugin to kotlin client

* use 6.13.0
2023-09-23 12:32:25 +08:00
William Cheng
362b596fce
update kotlin client dependencies (#16273) 2023-08-08 10:06:08 +08:00
Nick Ufer
16a7fb8acd
[KOTLIN] feat: adds maven-publish to 'kotlin' client generator (#14344)
* [KOTLIN] feat: adds maven-publish to 'kotlin' client generator

* [KOTLIN] chore: regenerate samples
2023-01-02 09:20:41 +00:00
Matthias Ernst
e93906eaea
[kotlin] Update kotlin to 1.7.21 and ktor to 2.1.3 (#14128) 2022-11-28 16:37:59 +00:00
mm's
ef6d383433
Feature/update kotlin dependecies template (#12966)
* update Kotlin & Ktor versions

* update samples

* fix gradle version

* update the ktor client templates and project samples

* update the ktor client templates and project samples

* revert multiplatform upgrade

* update kotlin multiplatform

* upload kotlin Multiplatform samples

* fix gson ktor sample

* update samples

* fix: unused imports

* fix imports of ApiClient

* update kotlin samples
2022-09-04 23:27:24 +08:00
Bruno Coelho
87dc75780a
[kotlin][client] add support for unknown default case with Kotlinx Serialization (#12930)
* [kotlin][client] Kotlinx Serialization cleanup

* [kotlin][client] Kotlinx Serialization cleanup

* [kotlin][client] add support for unknown default case with Kotlinx Serialization

* [kotlin][client] add support for unknown default case with Kotlinx Serialization

* [kotlin][client] add support for unknown default case with Kotlinx Serialization

* [kotlin][client] improve Kotlinx Serialization naming

* [kotlin][client] improve Kotlinx Serialization naming
2022-07-26 09:42:19 +01:00
Robin Trietsch
8eba70dd3d
[BUG][Kotlin] Add support for collection of generic classes (Jackson / Gson / Moshi) (#9918)
* Cherry picked commits from add-support-for-collection-of-generic-classes

* Regenerated samples

* Missing work by @adamsz-lume

* Try to fix maven plugin error

Co-authored-by: Bruno Coelho <4brunu@gmail.com>
2021-07-24 23:04:14 +08:00
Bruno Coelho
463ae10c4a
[kotlin][client] update dependencies (#9629)
* [kotlin][client] update dependencies

* [kotlin][client] update sample projects

* [kotlin][client] fix update dependencies
2021-06-01 10:09:48 +08:00
Sascha Peilicke
173a349e04
Kotlin: Fix kotlinx_serialization code generation (#9576)
And update to Kotlin 1.5.0 and kotlinx.serialization 1.2.1. Fix nested
enum annotation '@Serializable' instead of '@KSerializable' when
'kotlinx_serialization' is used. Fix missing JsonMediaType in
ApiClient.kt (#9242). Add 'kotlinx_serialization' serialization library
to documentation. Use explicity type in RequestConfig to keep type
information for JSON serialization.

Resolves #9242
2021-05-31 21:48:39 +08:00
Bruno Coelho
c4c15cecb6
[kotlin][client] add sample for parcelizeModels (#9394) 2021-05-12 20:56:03 +08:00
Nikita Karnaukh
d657e95021 [Kotlin][Client] Added Kotlinx Serialization for JVM/Retrofit2/OkHttp3&4 (#6916)
* Added supporting kotlin.serialization for jvm

* Added Serializable annotations for java types(date,time,url,uri etc.)

* Added SafeEnumSerializer

* Added StringBuilderAdapter for kotlin.serialization
Fix adapter naming
Fix Retrofit ApiClient.kt for kotlin.serialization

* Added StringBuilderAdapter for kotlin.serialization

* Switch sample to retrofit2-kotlin-serialization

* Add sample for retrofit2-kotlin.serialization

* update sample

* update sample

* update sample #3

* Fix enum quotes for kotlin.serialization

* update samples

* update pom.xml

* add pom.xml to child module

* fix kotlin-multiplatform freeCompilerArgs

* refactoring, add useSafeEnum option, remove safeEnum for kotlin.multiplatform

* update kotlin samples

* fix import kotlinx.serialization.Required

* Update kotlinx.serialization 1.0.0-rc-2, kotlin 1.4.10, retrofit-kotlinx-converter 0.7.0

* Update gradle wrapper 6.7-rc-3

* fix SafeEnum import

* fix Json initialization,
fix SafeEnumSerializer

* update samples

* update kotlinx.serialization to 1.0.0

* Update gradle to 6.7 in kotlin samples

* fixed adding @Contextual for collections with non-primitive type elements

* remove unused SafeEnum imports, refactored

* update kotlin readme

* update kotlin project template Readme.md

* update samples for kotlin

* simplify template for class properties

* remove @Contextual from kotlin-multiplatform

* update kotlin multiplatform dependencies

* refactoring templates

* revert all changes for multiplatform

* fix tests

* revert multiplatform #2

* update samples after merge, fix missed isListContainer->isArray

* fixed redundant space before @Contextual

* Fixed enum template, Class were missed in generated samples

* fix enum template toString value->serialName

* fixed isEnum case for collections

* update samples

* removed useSafeEnum option, kotlinx serialization has out of box approach with coerceInputValues option for same behavior

* generate samples

* update kotlinx.serialization 1.0.1

* update samples

* Added pom.mustache template for kotlin-client samples with fixed execution of gradle wrapper instead standalone installed gradle on CI

* update samples with new pom.xml

* reverted enum value property name

* fixed kotlin-multiplatform pom.xml

* update kotlin-threetenbp sample

* update kotlin-string sample

* update kotlin-string sample

* fix adding kotlinx.serialization classpath to build.gradle

* generate samples

* add supporting kotlinx_serialization kotlinx.serialization.Serializable with java.io.Serializable at the same time

* update retrofit2-kotlinx-serialization-converter:0.8.0

* update kotlinx_serialization sample with retrofit2-kotlinx-serialization-converter:0.8.0

* apply suggest from @blendthink

* added proguard-rules.pro file for kotlinx.serialization on Android projects

* fix pom.mustache

* update gradle wrapper to 6.8.3

* update kotlin samples

* fix kotlin readme template, update kotlin samples

* update kotlin samples

* update kotlin sample
delete petstore/kotlin unit tests

* revert deletion kotlin client tests
remove adding pom.xml to kotlin client samples

* add support kotlinx serialization for okhttp3/4

* update kotlin client samples
2021-03-19 18:12:23 +08:00
Bruno Coelho
23de86a434
[kotlin][client] update dependencies (#8673)
* [kotlin] update pom.xml

* [kotlin] update pom.xml

* [kotlin][client] update dependencies

* [kotlin][client] restore gradle

* [kotlin][client] try to fix CI

* Revert "[kotlin][client] restore gradle"

This reverts commit 20a2947447f5646ca4850304a26bdf76e630a497.

* [kotlin][client] try to fix CI

* [kotlin][client] try to fix CI

* [kotlin][client] try to fix CI

* install gradle

* [kotlin][client] try to fix CI

* [kotlin][client] try to fix CI

* [kotlin][client] disable integration tests

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-11 22:32:29 +08:00
Bruno Coelho
f0157b8c0f
[kotlin][client] fix retrofit dependencies (#6836) 2020-07-03 00:03:17 +08:00
Alexander Karkossa
2128f2875e
Enhancement/kotlin/apiclient and auth (#6585)
* Add multiple auth methods to ApiClient. ApiClient more configurable

* Fixed missing close tag for isMultipart in api.mustache

* Generated samples ./bin/kotlin-client-all.sh

* Generated samples./bin/openapi3/kotlin-client-petstore-all.sh

* Use of better way to add supporting files based on conditions

* Fixed missing check for retrofit generating auth files

* Generated samples

Co-authored-by: Alexander Karkossa <alexander.karkossa@dataport.de>
2020-06-11 22:09:13 +08:00
William Cheng
04af5e0445 Merge remote-tracking branch 'origin/master' into 4.3.x 2020-01-20 15:04:34 +08:00
Bruno Coelho
9d53ee4b69 [kotlin][client] make Request date converter toJson as default (#4884)
* Fix for Issue #2205

Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime.
Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue.

For more info please refer to: https://github.com/OpenAPITools/openapi-generator/issues/2205

* fix java feign parameter request name (#4883)

* update sprign cloud feign sample

* [JAVA][SPRING][2195] added missing getter for enum value (#2346)

* [2195] added missing getter for enum value

* updated samples

* re-generate spring samples

* Removed @JsonValue from toString and regenerated samples

* re-generate spring samples

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* update samples

* [kotlin][client] make Request date converter toJson as default

* [kotlin][client] update windows scripts

* [kotlin][client] update docs

* [kotlin][client] update scripts

* [kotlin][client] update scripts

Co-authored-by: Filipe Manuel Couto Pinheiro <filipemcpinheiro@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Lukáš Vasek <bilaak@gmail.com>
Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2020-01-02 13:46:49 +08:00