12694 Commits

Author SHA1 Message Date
Noor Dawod
91e64f47fc
[DART2] A couple of bug fixes (#7969)
* Fixed a couple of problems with current implementation.

1) When encoding non-String header values, the client will forwar to parameterToString() for encoding.
2) fromJson() now accepts a dynamic value since the type transformer accepts a dynamic value.

* Updated Pet Store files.

* Proper spacing between blocks.

* Adjust spacing.

* Make fromJson() as a static function, thus not instantiating a new object if JSON is null.

* Adjust doc for fromJson() function.
2020-11-23 16:07:38 +08:00
William Cheng
aed8086d0e
fix string comparision in go generator (#7998) 2020-11-22 20:55:21 +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
dd26e406b5
Fix duplicated mappedModels (#7924)
* fix duplicated mapped models

* replace discriminatorExplicitMappingVerbose with legacyDiscriminatorBehavior in comments

* use mappingName for comparison

* improve template

* fix tests

* update comments

* update ts samples
2020-11-20 11:57:48 +08:00
William Cheng
cf8ea9120a
fix additional properties without variables (#7978) 2020-11-20 11:54:39 +08:00
William Cheng
c02fc812fe
add warning about unsupported libraries in python client generator (#7981) 2020-11-20 11:54:16 +08:00
William Cheng
5e02a5bd45
Set generateAliasAsModel to false in tests (#7979)
* set generateAliasAsModel false in tests

* add missing import
2020-11-20 10:56:05 +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
Justin Black
c08f14500e
Revert "Do not use cached properties for additionalProperties (#7955)" (#7971)
This reverts commit 057647cf1ee0793f2987e89f8a588aa3db3ceb5d.
2020-11-17 21:08:55 -08:00
Justin Black
057647cf1e
Do not use cached properties for additionalProperties (#7955)
* Fixes additionalProperties, do not use cached properties for additonalProperties

* Regnerates samples
2020-11-16 11:26:54 -08:00
Alexis Cote
36aba267a0
[typescript-fetch] Allow to generate client without runtime checks (#7894)
* Add CLI options to remove runtime checks (serialization/deserialization).

* Update templates to support the new parameter

- Generates all the models in a same file to avoid import complexity
- Extract interfaces creator templates to reuse them

* Fix formatting and generate client examples

* Add documentation
2020-11-16 14:17:29 +01:00
Alexander Rashed
54d6257865
Fix parameter uniqueness for form- and body-params (#7577)
If a form-parameter had the same name as another (header-, query-,
path-, or cookie-)parameter, a conflict could be caused (for example
in the typescript generator). This fix executes the same uniqueness-
check and renaming for form- and body-parameters as it is done for
all other parameters.

@see issue #7575

Co-authored-by: Alexander Rashed <alexander.rashed@ntsretail.com>
2020-11-16 21:16:53 +08:00
patst
023e6dd9ed
typescript-angular: Angular 11 support (#7937)
* #7935 typescript-angular: support angular 11

* regenerate angular 11 sample project

* Update ngVersion to 11.0.0 in typescript-angular.md
2020-11-14 08:23:13 +01:00
berlysia
920eafc9c1
[typescript-fetch] add samples of nullable enum (#7754)
* [typescript-fetch] add sample

* [typescript-fetch] add sample for nullable enums
2020-11-13 13:17:35 +01:00
Thomas Hervé
777031f24f
Fix a few issues with go examples generation (#7873)
* Fix a few issues with go examples generation

This fixes a bunch of issues seen when generating go examples, namely
 - Numbers aren't casted to the right type
 - The time import is missing
 - Enums are treated as regular models

* Rebuild more samples

* Use examples properly

* Handle multiple instances in the same doc

* Fix wrong array closure

* Handle model arrays

* Fix file and enum namespace

* Regenerate samples

* Handle maps of complex types

* Handle oneOf

* Fix padding

* Fix enum doc

* Removes links to basic types in arrays

* Remove links to basic types in maps

* Fix enum links

* Minor indent fix

* Handle review comments
2020-11-12 23:36:40 +08:00
Daniel Varnai
3b84e8bb55
Fix missing parenthesis (#7923) 2020-11-12 11:13:50 +01:00
Jeff Brower
ec13288c02
Fix NPE in CodegenIgnoreProcessor.java (fixes #3356) (#7846)
Fixes NullPointerException when using an override ignore file with no parent.
2020-11-11 10:22:51 -05:00
William Cheng
eab26d493b
Better decimal support in Scala generators (#7876)
* fix decimal mapping in scala generators

* add mapping for decimal, number in scala generators

* update doc

* use scala.math.BigDecimal
2020-11-10 11:29:50 +08:00
William Cheng
f8766d591c
[C#][Nancyfx] fix incorrect import (#7907)
* fix incorrect import

* remove importMapping
2020-11-10 09:33:34 +08:00
William Cheng
b1b64cb356
throw exception for invalid framework (#7901) 2020-11-10 09:33:07 +08:00
Rocky Warren
81e0e8dfa8
[typescript-axios]: Check configuration is defined in api.ts so it compiles with strict flag (#7892)
* Check configuration is defined

* Update samples
2020-11-09 20:56:08 +01:00
Nicholas Muesch
eceac6a63c
Skip validation if input_value is None (#7845) 2020-11-08 12:27:58 -08:00
William Cheng
eacf61de7e
fix decimal mapping (#7875) 2020-11-08 11:46:33 +08:00
Justin Black
08fb59009a
Removes secondaryParam and hasMore (#7882)
* Removes secondaryParam and hasMore

* Fixes tests

* Only uses bodyParam in groovy template
2020-11-07 11:04:12 +08:00
Ghufran Zahidi
05515040d5
[csharp-netcore]Fixed the null serialization issue for dotnet47 (#7884)
* Fixed the null serialization issue for dotnet47

* c# codeing style

* Updated the sample for csharp netcore

* corrected the typos
2020-11-06 16:15:38 +08:00
Justin Black
bc76d8e58d
Adds vars and requiredVars to Schema classes (#7893)
* Adds vars to all schema classes, adds partial test

* Adds tests and addVarsRequiredVarsAdditionaProps

* Adds CodegenProperty test

* Adds requiredVars

* Adds vars and requiredVars cloning for CodegenProperty
2020-11-05 19:22:50 -08:00
William Cheng
b5473d2fda
[c#][netcore] Skip readonly properties in serialization (#7883)
* skip readonly in serialization (c# netcore)

* minor wording change
2020-11-06 10:15:11 +08:00
debugman
01d0b5d478
added serialize option in to_dict function in python generated model (#7555)
* added to_json_dict in python generated model

* update to_dict

* updated to_dict

Co-authored-by: sunkaicheng <sunkaicheng@bigo.sg>
2020-11-05 09:42:35 -08:00
Tomasz Prus
b3bc926b1d
[python] check output content-type only if preload_content is set (#7847) 2020-11-04 08:41:00 -08:00
William Cheng
739249917c
fix null json payload in net47 (#7870) 2020-11-04 17:19:05 +08:00
Noor Dawod
aff1af7be5
[Dart2] Fix a bug when asking to upload a MultipartFile as body. (#7736)
* Fix a bug when asking to upload a MultipartFile as body.

* Make finalizing MultipartFileRequest simpler.

* Restrict creating a MultipartFileRequest when not part of a multipart-form.

* Simplified the upload to use a StreamedRequest.

* Wrap all requests with try-catch.
2020-11-04 09:35:42 +08:00
Florian Kamella
2f30960349
[JAXRS-CXF] Improve handling of additional properties in JavaCXFClientCodegen (#7866) 2020-11-04 09:32:57 +08:00
Pedro Fonseca
e3121af4b4
[typescript-axios] serialize complex type in multipart/form-data as JSON (#7658) (#7816)
Complex types need to be serialized as JSON to avoid FormData.append() from converting them into strings through .toString().
2020-11-03 17:28:14 +01:00
Jean-François Côté
998e0fdaa2
[Play Framework] Update Play Framework Generator to latest version (#7860)
* First iteration to support new mechanism that needs to have the handle of the result.

* Most of the samples now build except "async". Also, everything is messed up.. need to understand the mustache way to handle this.

* New version to support play 2.8

* Fix conflict

* Fix error when multiple file in forms
2020-11-03 10:48:29 +08:00
Matthew Eppelsheimer
ebf2f2e30f
Fix use of eslint-config-airbnb-base (#7844)
Closes #7843
2020-11-03 10:36:18 +08:00
Ghufran Zahidi
d179574b4e
Fixed the HttpSigning issue for query string (#7859) 2020-11-02 21:32:37 +08:00
William Cheng
9377dbca56
Add "decimal" support (#7808)
* rename BigDecimal to decimal

* add isDecimal

* fix tests

* minor fixes

* fix mapping, update doc

* update test spec

* update c# samples
2020-11-02 21:31:32 +08:00
William Cheng
ca6fcaf92a
beter code format for protobuf java files (#7857) 2020-11-02 19:42:52 +08:00
guidoussin
4f2f80766e
Fix support for AllOf in protobuf-schema (#7813)
Co-authored-by: Guillaume Doussin <guillaume.doussin@amadeus.com>
2020-11-02 18:28:52 +08:00
Christophe Bornet
ca3fcd882e
[Kotlin] Fix Spring Kotlin generation of array/map models (#7829)
* Fix Spring Kotlin generation of array/map models

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-10-31 17:38:37 +08:00
Thibault Duperron
4f1934c3c7
[Spring] Use default jackson-databind (#7744)
* [Spring] Use default jackson-databind

fix #7743

* Samples
2020-10-31 16:52:18 +08:00
Tomohiro Suwa
46b36c2e65
[Ruby][faraday] fix download_file (#7842)
* Fix download_file

* Generate samples with f1df6acdee6

* fixup! Fix download_file

* Generate samples with 3e3ea88b0dec7763c8
2020-10-31 16:20:31 +08:00
Hui Yu
8f06876a2a
[C][Client]Fix coredump in multi-thread environment (#7835) 2020-10-30 10:57:14 +08:00
William Cheng
70323adf9f
[C#] support .NET framework 4.7 (#7833)
* add net47 support to the csharp generator

* update doc, fix appveyor
2020-10-29 22:41:08 +08:00
William Cheng
d5212ac834
add anytype mapping to object in dart (#7822) 2020-10-29 10:59:31 +08:00
William Cheng
a8bd859397
use System.Environment.OSVersion in .net standard (#7831) 2020-10-29 10:54:09 +08:00
William Cheng
0e994eabf7
use WriteRawValue instead of WriteRaw (#7830) 2020-10-29 10:53:50 +08:00
Dalibor Karlović
b43103a029
Tweaks for PHP client Markdown files suggested by markdownlint (#7779) 2020-10-28 14:52:21 +08:00
Steve B
ea2cdd23c2
[python] add socket_options to configuration for the rest client (#7795)
* [python] add socket_options to configuration for the rest client

* (python-experimental) add socket_options to configuration for the rest client

This mirrors work done on the python generator

* (python-experimental) add test to cover socket_options is passed on from configuration

Co-authored-by: steve brazier <steve.brazier@trioptima.com>
2020-10-27 18:22:28 -07:00