Beppe Catanese
68b944e6e6
Preserve order of securitySchemes ( #14536 )
...
* Remove alphabetical sort
* Update integration testing expectations
* Regenerate files
2023-02-10 22:20:19 +08: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
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos ( #13915 )
...
* Fix typos
* Remove repeated words
* Minor grammar fixes
2022-11-07 21:30:24 +08: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
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
706791f43f
[Bug][Kotlin-client] Can now handle path param of type list ( #12244 )
...
* Bugfix Kotlin-client: Can now handle path param of type list for jvm-volley and multiplatform. Also cleaning up generated code
* Adding samples to github workflow. Deleting old workflow
* Tweaking setup of jvm-volley
* Updating samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-05-05 01:04:20 +08: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
Anton Koscejev
7851dfe148
[kotlin][client] fix encoding of individual parts of a multipart request ( #11911 )
...
* [kotlin][client] fix encoding (and Content-Type headers) of individual parts of a multipart request
* [kotlin][client] fix incorrect handling of binary downloads
* [kotlin][client] update samples
2022-04-14 01:52:01 +08:00
Bruno Coelho
00ef435018
[swift5][client] create comment to warn about android api version ( #11830 )
2022-03-09 00:03:02 +08:00
Bruno Coelho
c305c71715
[DefaultCodegen] generate unknown default case ( #11078 )
...
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] replace Swift custom implementation with the DefaultCodegen implementation
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] update docs
* [DefaultCodegen] fix Swift enum case name
* [DefaultCodegen] generate unknown default case
* [DefaultCodegen] generate unknown default case
2021-12-21 15:40:13 +08:00
Bruno Coelho
eb224db540
[kotlin][client] remove old Date usage ( #11082 )
...
* [kotlin][client] remove old Date usage
* [kotlin][client] remove old Date usage
2021-12-14 16:03:12 +08:00
William Cheng
fbb61658df
[kotlin][client] rename ApiInfrastructureResponse to ApiResponse ( #11094 )
...
* rename ApiInfrastructureResponse to ApiResponse
* mark ApiResponse as reserved word
* update samples, docs
* fix typo
2021-12-12 16:32:08 +08:00
Bruno Coelho
3247903caa
[kotlin][client] update request exceptions ( #11065 )
2021-12-11 21:48:59 +08:00
Guus Bloemsma
0236f84c11
[kotlin-client] Allowing vendor types for json ( #10758 )
...
* Using the first serializable 'consumes' mediaType
Using all deserializable 'produces' mediaTypes
Matching json vendor types as json
* updating the generated samples
2021-12-11 21:48:00 +08:00
Simon Wegendt
af2ca38ab7
[Kotlin] [OkHttp4] detailed requests ( #10201 )
...
* #10199 : Extract from generated function per operation one that returns headers and other info
* add autogenerated output
* fix suspend generation
* fix return statement generation for coroutine variant
2021-11-16 22:34:26 +08:00
Bruno Coelho
57afa97166
[kotlin][client] add base url key ( #10633 )
...
* [kotlin][client] add base url key
* [kotlin][client] update sample projects
* [kotlin][client] add base url key
2021-11-02 23:32:42 +08:00
Surya Asriadie
0936b43dfd
[Kotlin] Fix default value for kotlin class ( #10407 )
...
* Fix default value for kotlin class
* fix style: remove trailing line
* fix ktorm schema
2021-09-17 01:12:41 +08:00
Bruno Coelho
0211f7b82e
[kotlin][client] add support for okhttp requests with empty body ( #10369 )
...
* [kotlin][client] add support for okhttp requests with empty body
* [kotlin][client] add support for okhttp requests with empty body
2021-09-14 11:33:06 +08:00
Guus Bloemsma
490c747c2b
[kotlin-client] OkHttp call is now non-blocking ( #10303 )
...
* suspend method is now non-blocking
* added required imports
* generated the samples
* suspend method is now non-blocking
* added required imports
* generated the samples
* Cancelling the call when the coroutine is cancelled
Only use coroutines when requested
Not adding potentially unavailable imports
Co-authored-by: Guus Bloemsma <Guus.Bloemsma@Rabobank.nl>
2021-09-03 11:56:31 +08:00
Noor Dawod
e39e4bcd6e
Kotlin client/spacings indentations ( #9853 )
...
* Bump jimschubert/query-tag-action from 1 to 2
Bumps [jimschubert/query-tag-action](https://github.com/jimschubert/query-tag-action ) from 1 to 2.
- [Release notes](https://github.com/jimschubert/query-tag-action/releases )
- [Commits](https://github.com/jimschubert/query-tag-action/compare/v1...v2 )
Signed-off-by: dependabot[bot] <support@github.com>
* Adjust spacings, bring back suppresses to silence IntelliJ IDEs.
* Suppress few warnings since we know we are using them in the code.
* toLowerCase() is deprecated.
* Wrap enum values in backticks to guard against reserved names, bring back encode/decode for each enum.
* Wrap property names in backticks to guard against reserved names.
* Regenerate samples.
* Do not warn about unused imports.
* Regenerate samples.
* Updated petstore code.
* Add missing reserved Kotlin operators and special keywords.
* Revert adding backticks.
* Regenerate pet store shop code.
* Remove unused suppression.
* Use 3 braces to wrap name.
* Regenerate pet store shop code.
* Remove get from reserved words.
* Revert back removal of description.
* Regenerate source code for Petstore.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-02 17:38:22 +08:00
Bruno Coelho
8a714f48d3
[Kotlin][Client] improve imports ( #10052 )
2021-07-29 18:02:20 +08: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
e600f7d149
[kotlin][client] silence deprecation warning ( #9656 )
...
* [kotlin][client] silence deprecated warning when used internally
* [kotlin][client] update sample projects
2021-06-08 23:17:20 +08:00
Bruno Coelho
0f51662650
[kotlin][client] small improvements ( #9640 )
...
* [kotlin][client] standardize adapter type names
* [kotlin][client] remove unused class
* [kotlin][client] fix IDE warning
* [kotlin][client] improve import layout
* [kotlin][client] update sample projects
2021-06-02 11:07:26 +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
163d13e415
[kotlin][client] fix Android crash on API level 25 and bellow ( #9578 )
...
* [kotlin][client] fix Android crash on API level
* [kotlin][client] update sample project
* Try to fix CI
* [kotlin][client] add flag to control android api level supported
* [kotlin][client] update docs
* [kotlin][client] update docs
2021-05-26 18:24:52 +08:00
Kazuki Chigita
1ff436a86a
[REQ] [kotlin-client] Add uriAdapter for moshiBuilder ( #9494 )
...
* Apply UriAdapter to moshiBuilder
* Add UriAdapter for supportingFiles
* Fix test
* Apply ./bin/generate-samples.sh
2021-05-20 23:05:22 +08:00
William Cheng
da37e980d3
[Kotlin]] add support for binary response ( #9284 )
...
* Support File responses for Kotlin client
* Regen samples
* Reset version
* Fix file class check
* Add imports
* use Files.createTempFile instead
* better tmp file naming
Co-authored-by: Mischa Spiegelmock <me@mish.dev>
2021-04-17 18:25:32 +08:00
Cody Mikol
b5dac42959
feat(adapter): add BigDecimal kotlin support ( #8880 )
...
* feat(adapter): add BigDecimal kotlin support
this allows the kotlin client generator to support
BigDecimal values
Fixes #7196
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-04-16 22:24:10 +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
7a435ac1bb
[Kotlin][Client] create request config method ( #8617 )
...
* [kotlin][client] create an api method to create the RequestConfig
* [kotlin][client] generate sample projects
* [kotlin] add docs to RequestConfig method
* [kotlin][client] generate sample projects
* [kotlin] improve docs on the RequestConfig method
* [kotlin][client] generate sample projects
2021-02-10 00:13:25 +08:00
Bruno Coelho
45fc02350b
[kotlin] fix Date types usages ( #8594 )
...
* [kotlin] fix Date types usages
2021-02-02 20:55:51 -05:00
Ella
bb00d88283
[kotlin] Fix optional header params in openhttp client ( #7341 )
...
This commit adjusts the kotlin openhttp api template to ignore null headers when building the request rather than convert them to "null" string
2020-09-16 22:09:38 -04:00
Bruno Coelho
98582d5780
[kotlin][client] fix warning Extension is shadowed by a member ( #7286 )
2020-08-26 11:21:40 +08:00
Nikita Karnaukh
53eff43184
[Kotlin][Client] Fix url path for Retrofit, Fix optionals for @Query @Body, Set List as default collection for Kotlin data class ( #6456 )
...
* Replace typeMapping kotlin.Array with kotlin.collections.List, because its doesn't work with Kotlin Data Classes(required manually implementing hashCode&equals)
Replace typeMapping kotlin.Array<kotlin.Byte> with efficient primitive implementation kotlin.ByteArray
Replace instantiationTypes array to kotlin.collections.ArrayList, for extending Array we should provide element count to its constructor.
* Fixed path(removed slash on begin path) for Jvm Kotlin Retrofit
* Fixed handling optional bodyParams for Jvm Kotlin Retrofit
* Fix kotlin tests
* Fixed code format for detekt inspections #2
* revert formatting
* Added ability to generate optional @Query params.
* Update Kotlin docs.
* Update Kotlin openapi3 client samples
* Update Kotlin client samples
* Update Kotlin openapi3 client samples after merge with master
* Revert hardcoding List instead Array
* Set List as default collectionType
* Update Kotlin samples
* Fixed Kotlin multiplatform api template. fix mapper for Array type.
Fixed Kotlin multiplatform api template Code style.
* Update Kotlin multiplatform sample
* Fix Kotlin multiplatform template code style
* Update Kotlin multiplatform sample
* Fix Kotlin multiplatform converting Array to List in Api.
* Update Kotlin multiplatform sample #3
* Fix Kotlin tests
* Fix Kotlin jackson Application.kt
* Fix Kotlin tests #2
* Fix merge conflict with master
* Generate samples after merge with master
* Generate samples after merge with master #2
* Generate samples after merge with master #3
* Generate samples after merge with master #4
* update kotlin samples
* update all samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-16 10:33:34 +08:00
William Cheng
505d6e7a1c
update kotlin samples
2020-05-13 17:09:34 +08:00
Bruno Coelho
ae66c335b9
[kotlin][client] make base path globally configurable ( #5450 )
...
* [kotlin][client] make base path configurable
* [kotlin][client] update pet project
* [kotlin][client] set default base path
* [kotlin][client] set default base path
* [kotlin][client] set default base path
2020-03-24 18:18:04 +08:00
Matt Traynham
6400ce2330
[kotlin][client] Add Jackson to interface properties and remove extra line feed ( #5459 )
...
* [kotlin][client] Ensure Jackson annotations are consistent with interface vars
* [kotlin][client] Rebuild samples
* [kotlin][client] Some kotlin client enhancements
- Don't use JsonFormat for Date objects, this should be controlled via
a custom serializer/deserializer or a turning on and off serialization
features of Jackson. I've updated the jacksonObjectMapper config to
write the dates as strings, which I think was intended in the original
commit.
https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATES_AS_TIMESTAMPS
https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/cfg/MapperConfig.html#getDateFormat--
- Dont' use @JsonFormat(shape = JsonFormat.Shape.OBJECT) for enums.
This causes Enums to be formatted as objects with an internal "value"
field. In reality, OpenAPI enums are just strings without properties
and should be treated as a string.
https://www.baeldung.com/jackson-serialize-enums#2-enum-as-json-object
- Add's Kotlin use site annotation @get: to JsonProperty for parent interface
properties. Otherwise Kotlin will warn:
"This annotation is not applicable to target 'member property without
backing field or delegate'"
- Add's JsonTypeInfo annotations to interfaces for inheritance. This
was copied verbatim from the kotlin-spring generator.
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache
* [kotlin][client] Rebuild kotlin samples
2020-03-24 10:05:46 +08:00
Bruno Coelho
f402126460
[Kotlin][client] fix file upload ( #5548 )
...
* [kotlin] fix file upload
* [kotlin] fix file upload
* [kotlin] fix file upload
* [kotlin][client] fix jackson integration
* [kotlin] fix file upload
* [kotlin] fix file upload
2020-03-11 01:04:53 +08:00
Herve DARRITCHON
f6ef4fbec7
[kotlin][client] Add Jackson as serialization library ( #5236 )
...
* [kotlin][client] Add Jackson as serialization library
* [kotlin][client] Add kotlin-client-jackson.sh to kotlin-client-all.sh
* update kotlin client samples
* update doc
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-02-25 23:41:09 +08:00
Bruno Coelho
ffb196151f
[kotlin][client] improve debug experience ( #5286 )
...
* [kotlin][client] remove null message on server error
* [kotlin][client] avoid breaking change
* [kotlin][client] add response to client and server exceptions
* [kotlin][client] improve message on ClientException and ServerException
2020-02-16 11:00:14 -05:00
Matt Traynham
26c9c64634
[kotlin][client] Add inheritance to Kotlin Client templates ( #4453 )
...
* Add inheritance to Kotlin Client templates
* Correct white spacing issues
* Rebuild kotlin client samples
2020-02-01 22:12:11 -05:00