7409 Commits

Author SHA1 Message Date
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
Bodo Graumann
896867b5e7
Use model as body param for generateAliasAsModel (#4569)
* generateAliasAsModel: Use model name as body param

* Update samples
2020-04-17 13:36:27 +08:00
tanmen
efae171054
[typescript-axios][client] Allow apiKey type Promise. (#5953)
* change apiKey type

* recreate sample
2020-04-16 14:04:43 +02:00
Hui Yu
41664b3ba8
[C][Client]Fix data lost when libcurl write-data callback function is called multiple times (#5828)
* [C][Client]Fix the defect of data lost when libcurl write-data callback function (configured by CURLOPT_WRITEFUNCTION) is called multiple times.

* [C][Client]Fix data lost when libcurl write-data callback function is called multiple times (Reset count)
2020-04-16 12:45:44 +08:00
Tomasz Prus
7a0242311f
[python/asyncio] fix passing proxy parameters to aiohttp (#5943) 2020-04-15 18:16:08 -07:00
Sebastien Rosset
91cfabdad2
[Python-experimental] Fix TypeError: unhashable type: 'list' (#5810)
* handle scenario when value is a list, fix TypeError: unhashable type: 'list'

* Add __hash__ function

* use list instead of set

* use list instead of set

* use list instead of set

* use list instead of set

* use list instead of set

* use list instead of set
2020-04-15 17:02:56 -07:00
William Cheng
d57ceb86bf
fix duplicated semi-colon in c# model (#5934) 2020-04-15 16:28:54 +08:00
chandra-gh
8a17ae6822
Update axios dependency to the new minor version 0.19.0 (#5867)
* Update axios dependency to 0.19.0

Axios (version 0.18.0) used by typescript-axios generator is more than two years old (released in Feb 2018). Axios 0.19.2 released earlier this year contains a lot of fixes and functionality, I recommend updating to 0.19.2.

* Ran ./bin/typescript-axios-petstore-all.sh to update package.json in ./samples

Co-authored-by: Chandra Yalangi <chandra.yalangi@appklenz.com>
2020-04-14 18:42:46 +02:00
William Cheng
747cd087b6
update dependency for java client (#5926) 2020-04-14 20:34:16 +08:00
Shinya Sugmoto
533d686bec
[Dart] Remove content type from header when content type is not specified (#5752)
* accept empty content type

* fixed test

* updated samples

* additional comment out
2020-04-14 18:19:34 +08:00
Sebastian
131bd4fd35
Fix for Result Model Name collision (#5923)
* Fix for Result Model Name collision

* Run Scripts

Co-authored-by: Sebastian Ohm <sebastian.ohm@ubimax.com>
2020-04-14 17:23:58 +08:00
Sebastien Rosset
8af6b7459c
[Java] Discriminator lookup should not be case insensitive by default (#5894)
* Add 'discriminatorCaseSensitive' property

* Discriminator value lookup should not be case insensitive

* fix typo

* run scripts

* execute ./bin/utils/export_docs_generators.sh

* fix discriminator mapping, add code comments
2020-04-13 18:54:00 +08:00
Bruno Coelho
7dd2d3c3eb
[swift5] fix warning (#5900) 2020-04-13 16:57:22 +08:00
Sebastien Rosset
d81c244f9a
[Java] Increase java compiler stack size to handle large files (#5901)
* increase java compiler stack size to handle large files

* increase java compiler stack size to handle large files
2020-04-13 13:56:20 +08:00
Chr1st0ph
cc09118ffc
[Java][Feign] Bug fix in @Param annotation (#5250)
* FIX-5249 fix @Param annotation for Feign-client code generation

Use paramName instead of baseName in order to make mapping in @Headers
section fit the param-value.

* update samples

* FIX-5249 fix @Param annotation for Feign-client code generation

Use paramName instead of baseName in order to make mapping in @Headers
section fit the param-value.

Co-authored-by: Christoph Preißner <christoph.preissner@blu-pa.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-13 09:59:35 +08:00
Jochen Schalanda
e82546f342
Update generated build files for REST Assured (#5873)
* REST Assured 4.3.0
* Jackson 2.10.3
* Gson 2.8.6, GSON-Fire 1.8.4
* Okio 1.17.5
* Joda-Time 2.10.5
* ThreeTenBP 1.4.3
* Added missing dependencies for Bean Validation
* Added missing dependencies for `@Generated` annotation
* Refresh REST Assured sample project
2020-04-12 23:36:18 +08:00
Artem Shubovych
62c346f8da
[enhancement] [jaxrs-spec] Add builders to models (#4930)
* Update formatting in jaxrs-spec POJOs

* Add generateBuilders option

* Update formatting in jaxrs-spec POJOs

* Disable the builders generation by default

* Ensure samples are up-to-date

* Revert newline change

* Run ensure-up-to-date

* update doc

* fix merge conflicts

Co-authored-by: Artem Shubovych <ashubovych@atlassian.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-12 17:27:34 +08:00
Gonzalo
6a158de431
Add date time format annotation on pojo for model query parameters (#5437)
* Add date time format annotation on pojo for model query parameters

* Regenetare samples

* update spring samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-12 09:39:16 +08:00
Shinya Sugmoto
800293ccf9
[Dart] Fix "basic" auth method and Add Bearer token support (#5743)
* added auth check and lint

* fixed basic auth condition

* Added bearer auth

* updated samples

* update dart petstore samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-12 09:38:15 +08:00
Shweta Shukla
58dc48da8d
Update modelGeneric.mustache (#5378)
* Update modelGeneric.mustache

If maxlength is specified for a property type enum it there should be .ToString() appended before length check

* ran the csharp petstore bar and updated the file

Co-authored-by: Shweta Shukla <shshukl@microsoft.com>
2020-04-11 22:45:30 +08:00
Sebastien Rosset
e9d35c5a2a
[Java-client] Add maven-compiler-plugin in pom.xml and enable linter checks by default (#5866)
* Add maven-compiler-plugin plugin in Java pom.xml and enable linter checks by default

* Add maven-compiler-plugin plugin in Java pom.xml and enable linter checks by default
2020-04-11 00:40:27 +08:00
William Cheng
b7dfd3b2a7
consolidate header selection functions (#5889) 2020-04-11 00:39:33 +08:00
William Cheng
5c2d1eafa2
[PS] better handle special variables (#5885)
* add variable

* fix reserved words
2020-04-10 21:46:27 +08:00
Bouillie
d221237309
[Csharp-client] Complex form parameters are not serialized as application/json (#5849)
* [csharp-client] Complex form parameters are now correctly serialized as json.

* Updated csharp samples

Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-10 15:09:12 +08:00
William Cheng
6c153bd079
[C#] dependency upgrade (#5870)
* Updating packages version (#5313)

* Add support to RestSharp version 106.10.1

Restsharp 106.10.1 needs the Content Lenght as a parameter to AddFile method

* Updating RestSharp Version

Updating RestSharp Version

* Update netcore_project.mustache

* Update netcore_testproject.mustache

* Update Project.mustache

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Execute task async obsolete

Use ExecuteAsync instead

* update csharp samples

Co-authored-by: William Cheng <wing328hk@gmail.com>

* [csharp] Library upgrade fix (#5848)

* On .net45 framework, Restsharp version is updated to 106.10.1 Otherwise, it stays on version 105.1.0

* Added additionalProperties for library versions and target frameworks

* Removed unused properties

* Added an additional property to test for a specific version of RestSharp

* Updated csharp samples

* Fixed nuspec.mustache to use library specific additional properties

* Updated csharp samples

* Updating CI/samples.ci csharp petstore test project file.

* Updated csharp.md

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* [csharp-client] Restored tests on csharp samples (#5879)

* Restored tests on csharp samples

* Restored a reference to the file used to test file uploads

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* update samples

Co-authored-by: Igor Quirino <iquirino91@gmail.com>
Co-authored-by: Bouillie <34162532+Bouillie@users.noreply.github.com>
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-10 15:08:34 +08:00
William Cheng
46f3b4a870
various enhancement to ps exp generator (#5875) 2020-04-09 22:28:58 +08:00
William Cheng
7342077cb1
[PS] Select Content-Type in the response (#5872)
* better return type handling

* update tempalte

* better documentation

* fix greater than
2020-04-09 20:06:26 +08:00
sunn
c73f3c5eb2
Updates to allow the setting of the dateTime format string (#5763) 2020-04-09 09:20:35 +02:00
William Cheng
d599527104
[PS][Experimental] Add validations to model (#5842)
* add validations to model

* better error message

* improve validation
2020-04-09 10:49:37 +08:00
William Cheng
31ecf7306b
stop error globally (#5858) 2020-04-08 21:53:51 +08:00
jburgess
2ff9be6f95
[codegen] Fix 'super.HashCode' for oneOf and allOf Implementations (retry) (#5830)
* Added hasVars after completion of all model post-processing (#5587)

* Post ensure-up-to-date

* Update to check the size of vars and not assume non-null
2020-04-07 16:42:20 +08:00
Nicholas Muesch
7efa65164a
Add openapi.yaml file to Java clients (#5765)
* Add openapi.yaml file to Java client

* Move supporting template file to Java root

* Update petstore clients
2020-04-07 16:07:08 +08:00
Michele Albano
5fd724fceb
C client generator improvements to support petstore. Solves #5836 (#5837)
* C client generator improvement to support:
openapi-generator/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Improvements to the C client generator:
- moved base64* from apiClient.c to binary.h/binary.c
- changed CR/LF to LF in binary.h/binary.c

* C client generator: better support for base64encode / base64decode
2020-04-07 11:40:57 +08:00
Natan Laverde
6cbc442b02
[C++] [Qt5] [Client] fixed cpp-client-qt5 HttpRequestWorker contentCompression variables initialization (#5834)
When contentCompression is not enabled, the variables isRequestCompressionEnabled and isResponseCompressionEnabled in HttpRequestWorker are not being initialized.
Without initialization the compress function could be called and the request content could be an empty QByteArray instead of original request body.
2020-04-06 08:53:41 +02:00
William Cheng
f1325e23ee
support enum in parameters (#5838) 2020-04-06 14:45:45 +08:00
William Cheng
d893ee883b
use allVars to cover all properties (#5835) 2020-04-06 10:54:49 +08:00
Michele Albano
e9c1346386
tests for models for C-libcurl generator (#5699)
* First try to generate unit tests for the models of the C-libcurl client. Models into models are not supported yet.

* Added unit tests for the modules of the C-libcurl client to the git repository.

* Support for objects having other objects as properties, for the C-libcurl client generator

* Proper formatting of generated code
2020-04-06 01:42:50 +08:00
William Cheng
42e87c8f33
rename hostsetting, validate base url (#5821) 2020-04-04 17:25:05 +08:00
Sebastien Rosset
242c2e8544
[Python-experimental] Documentation enhancement for oneOf schema and minor err msg improvement (#5791)
* Add documentation to generated code

* Improve error message

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Run sample scripts

* Address review comments

* Address review comments

* Fix problem in python error message
2020-04-03 20:49:23 -07:00
William Cheng
baeb1dd385
[PS][Experimental] Add tests for array of object in response (#5814)
* debugging array response

* fix find pet tests

* better tests to ignore order
2020-04-03 20:12:11 +08:00
William Cheng
281d154ff4
[PS][Experimental] add withHttpInfo support, fix "null" return (#5811)
* add with http support

* use full name in tests

* using full name in test

* skip type check
2020-04-03 15:47:04 +08:00
William Cheng
bc12ada4c0
use write verbose in auth, better api doc (#5804) 2020-04-03 10:14:06 +08:00
tanmen
7d35268414
[typescript-axios][client] Unnecessary imports occurs when using withSeparateModelsAndApi (#5797)
* add ts-ignore

* add petstore sample
2020-04-02 19:17:40 +02:00
Aleksandr Nekrasov
ea2fd0f1b6
fix scala-akka java8 serializers (#5742)
* fix scala-akka java8 serializers

* regenerate samples for akka-http
2020-04-02 12:18:21 +08:00
Bouillie
65eff3ba4c
[Csharp-client] Complex form parameters are not serialized as application/json (#5787)
* [csharp-client] Complex form parameters are now correctly serialized as json.
Reference: http://spec.openapis.org/oas/v3.0.3#special-considerations-for-multipart-content

* Updated bin/windows csharp sample generation scripts to point to the correct directories

* Updated csharp samples

Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-02 11:59:27 +08:00
Slavek Kabrda
3f445772ae
[go-experimental][go][client] Remove unreachable code in go client API methods (#5611)
* [go-experimental][go][client] Remove unreachable code in go client API methods

* Properly regenerate all samples
2020-04-02 11:15:31 +08:00
Josh Burton
04160dab3d
[dart-dio] Fixes --model-name-suffix having no effect (#5669)
Fixes #5409
2020-04-02 11:13:23 +08:00
William Cheng
f58ebf65d1
use Initialize instead of prepare (#5777) 2020-04-01 11:21:11 +08:00
William Cheng
24513091b0
use prepare instead of new (#5773) 2020-04-01 09:24:07 +08:00
Timur Platonov
01d07694fb
fix request.on_complete message when tempfile is nil (#5745)
* fix request.on_complete message when tempfile is nil

* update faraday client sample

* add openapi3 client samples
2020-04-01 00:10:31 +08:00