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
William Cheng
3e58b0908c
Merge remote-tracking branch 'origin/5.2.x' into 6.0.x
2021-04-28 18:08:24 +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
95d356ab6b
Merge remote-tracking branch 'origin/5.2.x' into 6.0.x
2021-03-21 01:10:46 +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
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
William Cheng
3bf8ca7484
[python] Renames python generators ( #7965 )
...
* python->python-legacy, python-experimental->python
* test with openjdk8
* test with openjdk11
* comment out rm
* move kotlin tests to circleci
* move kotlin tests
* move tests to circleci
* fix circleci
* rearrange test
* move tests
* use wrapper
Co-authored-by: Justin Black <justin.a.black@gmail.com>
2020-11-18 14:34:00 +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
60ceded171
[ci][cli] Moving ensures script to config-based batch generation of samples ( #6509 )
...
* Ensure CLI-level generator settings are available in additional properties
* Initial conversion to yaml configs
Configs prefix with 1- need to be manually evaluated.
* Add "other" configs not in ensure-up-to-date
* Add other/openapi3 files
* Cleanup all generation scripts
* Clean up: add missed configs and fix some openapi 3 diffs
* Move generate-samples script, error on batch failures
* Temporarily disable elm which requires skip validation of spec
* CI updates (todo: run all generators through appveyor or move to github workflows)
* Add success count to batch generation command output
* [samples] Regenerate
* Remove bin/windows
* Generate swift5 samples in bitrise
* Expand user input glob pattern
* Regenerate samples
* Update PR template
* Support config based generateAliasAsModel
* [samples] Regenerate
* [rust] Generate as alias for all samples configs
* [csharp] Move test staged file changes to in-directory
* Include "live" test files and ignore test cache files from samples.ci
* Remove concept of samples.ci staging
Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.
Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.
* Re-add meta generator scripts
* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines
* [csharp] Regenerate sample
* Set generateAliasAsModel CodegenConfigurator#toContext
This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.
* [rust] Regenerate samples
* Re-enable elm
* [java] Support OffsetDateTime example, fail ensures script on any generation error
* [samples] Regenerate
* Fix jersey2-java8 ignore file
* Fix elm spec validation
* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-09 18:28:58 +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