23 Commits

Author SHA1 Message Date
Jimmy Ma
4e89436177
[kotlin] Fix a leak in the ApiClient (#18997) 2024-06-23 17:17:05 +08:00
William Cheng
353320cb04
[kotlin] better oneOf, anyOf support (#18382)
* add validteJsonElement

* add oneOf support

* various fixes, add tests

* minor fixes

* minor fixes

* update data class

* remove comments

* array support, add test

* update api client constructor

* add anyOf support

* add new files

* fix merge

* update

* update

* update

* update
2024-05-31 12:22:27 +08:00
William Cheng
f191904297
Add auto-generated test files for kotlin client (#17916)
* add auto-generated test files for kotlin client

* undo changes to doc

* add auto-generated model test files in kotlin clients

* update tests
2024-02-21 18:29:23 +08:00
Stefan Koppier
d0e533d573
[kotlin-client][jvm-spring-*] Fixed URL encoding (#17493)
* [kotlin-client][jvm-spring-*] do URL encoding via the UrlBuilder instead of manual replacement

* [kotlin-client][jvm-spring-*] Fixed imports

* ensure up-to-date

* Fixed syntax problem

* Removed unnecessary toString()
2024-01-10 15:24:29 +08:00
Noor Dawod
a67e07e132
Stop using internal variable from okhttp3 (#17458) 2023-12-22 11:07:08 +00:00
Robert Oschwald
ec835fbd94
Update kotlin-client okHttp3 api.mustache fixes 16410 (#16411)
- populate body into the ServerException message
2023-08-25 19:06:43 +01:00
Simon Wegendt
778a53a406
[Kotlin Client] Implement octet-stream/binary (#16341)
* Implement octet-stream/binary for Kotlin client code generator

* Fix OkHttp3 generator flavor
2023-08-17 10:40:22 +01:00
Bruno Coelho
f31c2a4b17
[kotlin][client] Add new line at the end of all files (#16062)
* [kotlin][client] add new line at end of files

* [kotlin][client] add new line at end of files
2023-07-11 17:07:06 +08:00
Csaba Kozák
da9ad4a008
[kotlin][client] Small improvements (#15429)
* [kotlin][client] update Gradle wrapper in generated project

* [kotlin][client] Add @JsonClass(generateAdapter = false) to generated enums when using moshi library

This is needed, so the moshi generated R8 rules will include the enum classes:

https://github.com/square/moshi#enums

* [kotlin][client] Update generated samples
2023-05-09 16:28:54 +01:00
igokoro
b172f622b9
Do not use default locale in kotlin generated code (#14668)
Using default locale for non-user visible text transformations is not safe
and can result in bugs, in particular with Turkish locale.

More details in
https://mattryall.net/blog/the-infamous-turkish-locale-bug

Closes #14667
2023-03-14 16:47:15 +00:00
Bruno Coelho
d348754399
[kotlin][client] add info if endpoints requires authentication or not (#14445)
* [kotlin][client] add info if endpoints requires authentication or not

* [kotlin][client] update sample projects

* [kotlin][client] add info if endpoints requires authentication or not

* [kotlin][client] update sample projects
2023-01-13 10:29:27 +00:00
Antti Leppä
11c43c3c2b
Added Kotlin Vert.x client (#13594)
* Initial version of Kotlin Vert.x client

* Initial version of Kotlin Vert.x client

* Initial version of Kotlin Vert.x client

* Fix for parseDateToQueryString issue in vert.x kotlin client

* Moved common methods from api to ApiClient in kotlin vert.x client

* Fixed issue with absolute URLs

* bearer auth for oauth

* empty request headers fix

* missing import and typo

* added uri template dependency

* added api abstractions to client generator

* added full import form infrastructure

* removed fail on unknown properties to response body parsing

* fixed error response parsing

* replace vertx client name to more unique

* multiline content type

* optional responses added to template

* additional annotations for kotlin client

* Added additionalModelTypeAnnotations parameter support to AbstractKotlinCodegen

* Updated samples and documents

* Fixed issues with gson and moshi serializers with kotlin-jvm-vertx client

* Added sample configs for kotlin-jvm-vertx clients with gson, jackson and moshi

* Added samples for kotlin-jvm-vertx clients with gson, jackson and moshi

* Included kotlin-jvm-vertx samples to test build

* Updated samples

Co-authored-by: Katja Danilova <katja.danilova@protonmail.com>
2022-10-19 22:29:34 +08:00
Segev Finer
53873ff6d8
[kotlin] Fix empty body with POST/etc in OkHttp client (#13666) 2022-10-11 12:18:24 +01:00
Bruno Coelho
1235ccd391
[kotlin][client] move info to readme (#13649)
* [kotlin][client] move info to readme

* [kotlin][client] update sample projects
2022-10-11 11:07:36 +01:00
Bruno Coelho
b9d71581dd
[kotlin][client] fix file upload with okhttp (#13435)
* [kotlin][client] fix file upload with okhttp

* [kotlin][client] fix file upload with okhttp

* [kotlin][client] update sample projects

* [kotlin][client] fix file upload with okhttp3

* [kotlin][client] update sample projects
2022-09-17 22:08:07 +08:00
Segev Finer
9753086bcb
Fix #13369: kotlin-client with okhttp doesn't escape path parameters with slashes correctly (#13370)
* Fix #13369

* Regenarate samples

* Fix support for okhttp3
2022-09-09 16:31:31 +08:00
Sergey Prytkov
2a007b3465
Fix generation of default array values for kotlin client (#13243)
* Fix generation of default array values for kotlin client

* rerun generation scripts

* replace list of enum with list of string
2022-09-04 17:43:09 +08:00
Bruno Coelho
8d62e597ae
[kotlin][client] Kotlinx Serialization code formating (#12922)
* [kotlin][client] Kotlinx Serialization cleanup

* [kotlin][client] Kotlinx Serialization cleanup
2022-07-19 14:05:17 +01:00
Yartsev
75b883c5a5
OkHttpClient - fix enum properties in requests (#12661)
* OkHttpClient - fix enum properties in requests

* Has been committed the generated code

Co-authored-by: Mikhail Yartsev <mihail.yartsev@lamoda.ru>
2022-06-22 21:29:12 +01:00
Bruno Coelho
fe8187ba6d
[Kotlin][Client] replace java.nio.* to avoid crash on Android API 25 and bellow (#12529)
* [Kotlin][Client] replace java.nio.* to avoid crash on Android API 25 and bellow

* [Kotlin][Client] update sample projects

* [Kotlin][Client] update sample projects
2022-06-04 16:26:59 +08:00
julienlavigne
4cfc32e426
Kotlin-client: Pass OkHttpClient instance to the base class (ApiClient) (#12493)
* Pass client to the base clase

* Regen samples
2022-05-30 10:40:58 +01:00
CodeR
73b0762f36
OkHttpClient - replacing static client usage with client Injection #12444 (#12448)
Co-authored-by: Grigory Tihonov <grigory.tihonov@lamoda.ru>
2022-05-24 13:51:47 +01:00
Johan Sjöblom
8950a9a3c0
[BUG][Kotlin-client] Handling default values of parameters (#12255)
* Bugfix Kotlin-client: Handling default values of parameters

* Adding object
2022-04-29 15:26:29 +01:00