192 Commits

Author SHA1 Message Date
William Cheng
3909505c5b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-13 23:26:43 +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
William Cheng
b4f4d7434b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-02-12 18:48:20 +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
694b10e41c Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-28 16:47:55 +08: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
64ae0eed04 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-09 00:15:53 +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
4261252491 prepare 6.0.0 snapshot release 2020-12-21 16:39:40 +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
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
William Cheng
82e2448bf2 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2020-01-20 15:46: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