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
Bruno Coelho
ae790ea74e
[kotlin][client] remove tabs usage ( #6526 )
...
* [kotlin] remove tabs
* [kotlin][client] update pet projects
2020-06-04 21:29:08 +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
Sebastien Rosset
d61dcc17e0
[gradle] consistent use of maven url in gradle files ( #5045 )
...
* wrap maven url with uri function
* consistent use of maven url in gradle files
2020-01-19 14:57:38 -05:00
Jim Schubert
ea55968737
Evaluating https issues in CircleCI (on top of CiscoM31-maven-h… ( #5034 )
...
* replace http with https. Replace http://central.maven.org with https://repo1.maven.org
* replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0
* Force HTTPS for mavenCentral gradle DSL
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2020-01-18 18:53:05 -05: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
William Cheng
bad78a30c8
Merge remote-tracking branch 'origin/4.3.x' into 5.0.x
2019-12-20 23:26:19 +08:00
William Cheng
4fb503bcac
Merge remote-tracking branch 'origin/master' into 4.3.x
2019-12-20 23:21:21 +08:00
Bruno Coelho
3eaafce569
[kotlin][client] Use OffsetDateTime to represente date-time received by the server ( #4835 )
...
* [kotlin] add OffsetDateTime support
* [kotlin] serializer add missing import
* [kotlin] update pet projects and fix tests
* [kotlin] update docs
* [kotlin] update pet projects
* [kotlin] update date-time
* [kotlin] update pet project
* [kotlin] update windows script
2019-12-20 23:20:02 +08:00
William Cheng
165a9e0508
Merge remote-tracking branch 'origin/4.3.x' into 5.0.x
2019-12-20 20:52:27 +08:00
William Cheng
531dc30917
Merge remote-tracking branch 'origin/master' into 4.3.x
2019-12-20 20:38:49 +08:00
Bruno Coelho
9feaae8572
[kotlin][client] make serializer configurable ( #4740 )
...
* [kotlin][client] make serializer configurable
* [kotlin] update pet projects
2019-12-20 18:08:16 +08:00
Bruno Coelho
b6fd1b0ade
[kotlin][client] expose http status code on errors ( #4742 )
...
* [kotlin][client] expose http status code on errors
* [kotlin] update pet projects
* [kotlin] update pet projects
2019-12-20 18:06:35 +08:00
Bruno Coelho
265ad2297b
[kotlin] add options sortParamsByRequiredFlag and sortModelPropertiesByRequiredFlag ( #4707 )
...
* [kotlin] add option to sortParamsByRequiredFlag
* [kotlin] add option to sortParamsByRequiredFlag
* [kotlin][client] sort parameters in the models
* [kotlin] update docs
* [kotlin][client] simplify sortParamsByRequiredFlag implementation
* [kotlin] experiment with sortnmodel properties by name
* [kotlin] introduce sortModelPropertiesByRequiredFlag
* [kotlin] update docs
* [kotlin] update kotlin
* [kotlin] fix tests
* [kotlin] update docs
* Revert "[kotlin] update docs"
This reverts commit 88ad825de5b4c090fe04398bdfde2e9d3252742f.
* [kotlin] update docs and petstores
* [kotlin] update docs
* [kotlin] update pet projects
2019-12-20 17:42:48 +08:00
Alexander Eggers
bb93a3b1e2
[Kotlin][Client] Request date converter ( #4750 )
...
* Added new cli option to define the request date converter
* Fixed a few build errors
* Update api.mustache
* Fixed api mustache
* Removed unused import
* Fixing mustache templates
* Tweaking mustache templates
* Added sample and new bat file
TODO create new openapi 2.0 source file to simulate the datestring via schema.
* Tweaking mustache templates
* Updated templates and samples
* Fixed build error
* Updated samples
* Fixed path
2019-12-18 10:22:29 +08:00
William Cheng
adbed055dd
CI improvements ( #4791 )
...
* run all script in circleci
* test kotlin clients
* add new files
* undo chanages to circleci script
* update samples
* update bitwise config
* fix typo
2019-12-15 18:39:04 +08:00
Alexander Eggers
02f5cb1a65
[Kotlin][Client] Added new option to enable moshi code generator ( #4781 )
...
* Added new option to enable moshi code generator
* Tweaking Serializer template
2019-12-14 14:39:16 +08:00
William Cheng
466a67c9bc
Merge remote-tracking branch 'origin/4.3.x' into 5.0.x
2019-12-12 17:27:49 +08:00
William Cheng
5f5401bca6
Merge remote-tracking branch 'origin/master' into 4.3.x
2019-12-12 17:24:57 +08:00
facundomedica
2277934d5e
[Kotlin] fix basic authentication compilation issue ( #4772 )
...
* Fix #4771
* update samples
2019-12-12 17:18:07 +08:00
William Cheng
11c7007429
Prepare v4.2.3 ( #4663 )
...
* update version
* update doc
* update samples
2019-12-02 15:26:01 +08:00
William Cheng
fffe7c8a83
update samples
2019-11-23 00:24:50 +08:00
William Cheng
ac8b96b972
update samples without batch mode
2019-11-21 17:13:30 +08:00
William Cheng
f07b3e0521
Prepare 4.2.2-SNAPSHOT ( #4497 )
...
* update to 4.2.2-SNAPSHOT
* update doc
* update samples
* skip ocaml test
* update version
* fix version
2019-11-15 21:34:25 +08:00
Alexander Eggers
34c715e4ce
[Kotlin][Client] Add option to make all api method return a nullable model ( #4422 )
...
* Added new additional parameter to allow nullable api return types
* Tweaking samples and .bat files
I've added new .bat files for the kotlin-client to alllow windows-devs to re-generate required samples via windows-shell (for CI).
2019-11-12 22:15:54 -05:00