54 Commits

Author SHA1 Message Date
William Cheng
39fbf53150 create v5.3.0 2021-07-10 00:12:23 +08:00
William Cheng
02835b35bc
Prepare v5.2.1 (#9922)
* bump verions to 5.2.1-SNAPSHOT

* update samples

* update readme

* fix gradle properties
2021-07-09 22:42:31 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release (#9920)
* 5.2.0 release

* update samples

* update meta codegen
2021-07-09 17:06:55 +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
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
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
Bruno Coelho
c4c15cecb6
[kotlin][client] add sample for parcelizeModels (#9394) 2021-05-12 20:56:03 +08:00
William Cheng
37eaf70755 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-04-28 17:48:21 +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
William Cheng
47483e60cb update version to 5.2.0-SNAPSHOT, update samples 2021-03-21 00:10:10 +08:00
William Cheng
0dc62e8b79
Prepare v5.1.1 in the master (#9027)
* Prepare v5.1.1 in the master

* move dart dio next to configs/other
2021-03-20 23:05:11 +08:00
William Cheng
e023eaa821
Prepare v5.1.0 release (#9017)
* prepare v5.1.0 release

* update samples (dart-dio-next)
2021-03-20 16:45:05 +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
Jiri Kuncar
8cb4741248
[go][client] Fix example value for non string enums (#8900)
* [go][client] Fix example value for non string enums

* regenerated samples
2021-03-08 18:11:50 +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
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
William Cheng
3e81876e2c Merge remote-tracking branch 'origin/master' into 5.1.x 2021-02-06 17:52:32 +08:00
William Cheng
c7fcb39a2d
Prepare v5.0.1 release (#8627)
* release 5.0.1

* update samples
2021-02-06 16:37:22 +08:00
Bruno Coelho
45fc02350b
[kotlin] fix Date types usages (#8594)
* [kotlin] fix Date types usages
2021-02-02 20:55:51 -05:00
William Cheng
d97717ee24 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-28 15:52:44 +08:00
William Cheng
9286b43dfa
remove the bin folder under kotlin samples (#8520) 2021-01-24 14:20:40 +08:00
William Cheng
18bec1da28 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-08 21:06:47 +08:00
Luiz Felipe Stangarlin
319bd7eaa8
Add Ktorm schema generator (#7759)
* [ktorm] added support for ktorm

* [ktorm] fixed type mapping

* [ktorm] fixed foreign key

* [ktorm] added variable for the missing package import

* [ktorm] added correct templates

* [ktorm] added relationship metadata

* [ktorm] also support relationships 1:m

* [ktorm] relation to primitive naming fix

* [ktorm] updated mustache templates

* [ktorm] small fixes on templates, assigmentbuilder, docs, sql script syntax.

* fix issue, rename to ktorm-schema

* replace tabs with 4 spaces

* [ktorm] added primarykey automatic generation

* [ktorm] added tests

* [ktorm] added gradle to samples

* [ktorm] fix datatime type

* [ktorm] template fixes array and primarykey

* [ktorm][sample] regenerate

* [ktorm][sample] added manually files from kotlin-client

We inherit from baseTable, so we need those for now

* [ktorm] fix: relation column types hardcoded

* update samples

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-06 17:04:49 +08:00
William Cheng
25b0cbe2f1
Prepare 5.0.1 snapshot (#8249)
* update version to 5.0.1-SNAPSHOT

* update samples

* update meta codegen
2020-12-21 17:14:18 +08:00
William Cheng
345b68a107 prepare 5.1.0 snapshot release 2020-12-21 16:35:12 +08:00
William Cheng
d7d5e53f2b
Prepare v5.0.0 release (#8247)
* update to 5.0.0

* update samples
2020-12-21 13:04:11 +08:00
William Cheng
2578ef5e63
Prepare snapshot (v5.0.0) (#7986)
* Revert "prepare 5.0.0-beta3 release"

This reverts commit 3ebe774df37b43348bac1310a272de53a2d7040b.

* revert to snapshot

* update samples
2020-11-20 19:19:59 +08:00
William Cheng
2715f1371a
Prepare 5.0.0 beta3 (#7984)
* prepare 5.0.0-beta3 release

* update samples

* remove beta3 from readme
2020-11-20 15:18:58 +08: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
William Cheng
2fd23f505e
Prepare 5.0.0-SNAPSHOT (#7347)
* Revert "Prepare 5.0.0-beta2 release (#7345)"

This reverts commit 212b4f784742744b7b238607dcefb23ec9db64d7.

* update readme
2020-09-04 15:31:54 +08:00
William Cheng
212b4f7847
Prepare 5.0.0-beta2 release (#7345)
* update version

* update doc

* update samples
2020-09-04 13:03:45 +08:00
Bruno Coelho
98582d5780
[kotlin][client] fix warning Extension is shadowed by a member (#7286) 2020-08-26 11:21:40 +08:00
Bruno Coelho
f0157b8c0f
[kotlin][client] fix retrofit dependencies (#6836) 2020-07-03 00:03:17 +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
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
Jim Schubert
70ca93570e
[core][general] Add metadata file tracking to aid in "Golden Tests" regeneration (#6325) 2020-05-22 16:48:32 -04:00
William Cheng
505d6e7a1c update kotlin samples 2020-05-13 17:09:34 +08:00
William Cheng
5a9b0fcf9e update samples 2020-04-21 02:22:55 +08:00
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
William Cheng
a0ca253218
update samples (#5722) 2020-03-27 13:55:55 +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
William Cheng
100b01844a Merge remote-tracking branch 'origin/master' into 5.0.x 2020-02-04 15:31:10 +08:00