9299 Commits

Author SHA1 Message Date
William Cheng
ca225e4827 update samples 2021-02-02 21:15:02 +08:00
William Cheng
5b99d8724c Merge remote-tracking branch 'origin/master' into 5.1.x 2021-02-02 21:04:15 +08:00
Peter Leibiger
1b440e191c
[dart-dio] Improve API & API-Client field initialization (#8589) 2021-02-02 18:46:51 +08:00
Peter Leibiger
769b0e0e38
[feature][dart] Add support for uniqueItems/sets (#8375)
* [dart][dart-dio] Add support for set types

* copy `uniqueItems` usage from 2.0 fake spec to `3.0`
* add support for sets in parameters, responses and properties

* Regenerate all other samples

* Fix broken tests due to invalid cast

* Update documentation

* Regenerate samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-02 18:42:45 +08:00
Peter Leibiger
26f21bb6a0
[dart-dio] Add missing isRedirect parameter to response (#8588) 2021-02-01 22:29:20 +08:00
William Cheng
19f21acd85
Fix handling of 1xx and 3xx in Rust Reqwest (#8574)
* Remove redundant Rust use statement

* Return errors only for 4xx and 5xx in Rust reqwest

Since 1xx and 3xx are perfectly valid status codes the client might
need to handle.

see: https://docs.rs/reqwest/0.11.0/reqwest/struct.StatusCode.html#method.is_informational

* Regenerate samples

Co-authored-by: Gabriel Féron <feron.gabriel@gmail.com>
2021-02-01 16:29:01 +08:00
William Cheng
6dee98784a
Fix auto-generated R doc (#8584)
* fix auto-generated R doc

* better example for enum value
2021-02-01 13:30:31 +08:00
William Cheng
370d0e82f8 update samples 2021-01-31 14:27:46 +08:00
Matthew Dowdell
b4154be8d0
[Rust Server] Add support for Bearer token authentication (#7840)
* [rust-server] Add support for Bearer auth

- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.

* Update docs

* Update readme for bearer tokens
2021-01-30 12:07:46 +00:00
Richard Whitehouse
4ea4ceb0ff
[Rust Server] Serializable responses (#8516)
* [Rust Server] Make responses serializable

* Update samples
2021-01-30 11:49:42 +00:00
Richard Whitehouse
c15a4375e2
[Rust Server] Cargo Metadata Configuration (#8519)
* [Rust Server] Support Cargo Metadata Configuration

This adds support for publish, repository, documentation and homepage metadata.

* [Rust Server] Test Cargo Metadata configuration
2021-01-30 11:49:18 +00:00
Igor Sirotin
328cadb070
[Qt5][C++] Fixed QByteArray::toUtf8 with FILE as request body. Included <stdexcept>. (#8550)
* Multiple cpp-qt5-client bugfixes.

* Added '#include <stdexcept>' where std::runtime_error is used
* Fixed request with FILE body: QByteArray doesn't have ::toUtf8()
* Updated related samples

* Fixed isByteArray section

* updated docs

* Docs changes reverted
2021-01-30 11:35:52 +08:00
Peter Leibiger
5135967c91
[dart] Fix typo added in 57126a19 (#8581) 2021-01-30 11:32:33 +08:00
adpoliak
a4312412fc
[PYTHON] use customized default Configuration() objects if configured by the programmer (#8500) 2021-01-29 16:24:10 -08:00
William Cheng
1f8ceb9a1e update samples 2021-01-29 22:08:32 +08:00
Oleh Kurpiak
f0b9e21b6b
[Java] fix generation for JavaTimeFormatter (#8348)
* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter

* [Java] fix generation for JavaTimeFormatter
2021-01-29 11:22:37 +08:00
NANASHI0X74
57126a1900
Add getters for private default Headers and authentications (#8509)
* add getters for default headermap and auths

* regenerate samples, make shebangs portable

* Revert making shebangs portable

This reverts commit ec60f603598abf0f57dfdb6ca55b4d5c1ee25edf.

Co-authored-by: nanashi0x74 <rian.lindenberger@mpq.se>
2021-01-29 10:58:07 +08:00
Petr Tůma
061552f5d4
[feature][python-flask] Add CORS support to python-flask server (#8472)
* Add CORS support to python-flask server generator

* Documentation update and CORS support for other generators using the same base class

* Trivial sample changes
2021-01-29 10:54:02 +08:00
Frank Lehmann
64f5dc8077
[swift5] URLSession: Fix memory leak of SessionDelegate (#8558)
* Remove unused stored reference of delegate. URLSession keeps a strong reference anyway.

* Fix cleanup

* Update samples
2021-01-29 10:52:39 +08:00
Justin Black
2553d056dc
Removes nulltype from python, updates samples (#8555)
* Removes nulltype from python, updates samples

* Removes nulltype from the python requirements

* Removes nulltype import in models, moves requiredVars to optionalVars when approprieate
2021-01-28 09:30:36 -08:00
William Cheng
a96febaba8 update samples 2021-01-28 17:41:48 +08: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
f887441591 update samples 2021-01-28 16:47:09 +08:00
William Cheng
d97717ee24 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-28 15:52:44 +08:00
Ricardo Zanini
e377eabbc5
Fix #8492 - Use Vertx reference instead of static class (#8501) 2021-01-28 15:26:42 +08:00
MarcelTon
5b82ed9407
[BUG][Java]Fixed defaultValue escaping in Vert.x server template (#5321)
* Fixed defaultValue escaping in Vert.x server template

* Ran all java/vertx scripts in bin folder (java-vertx-*, java-petstore-vertx) and committed result.

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-28 14:00:37 +08:00
Chris Coltsman
a2a88cb8f0
Spring codegen - fix equals and hashCode methods for byte array and binary (#8345)
* Spring codegen - fix equals and hashCode methods for byte array and binary

- they should be compared using Arrays.equals
- they're hash code generated using Arrays.hashCode

* Corrected checkstyle issues

* Revert changes for binary types
2021-01-28 13:04:03 +08:00
Francesco Guardiani
0b2aa21f5d
Bumped Vert.x template to Vert.x 4 GA (#8528)
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2021-01-27 19:44:42 +08:00
Frank Lehmann
f6019f00a1
[swift5] Fix #8511 (request closure not being called) (#8537)
* Remove weak self to fix too early deallocations

* Update samples

* Remove podfile lock

* Run pod install on samples/client/test/swift5/default/TestClientApp/

* Revert "Run pod install on samples/client/test/swift5/default/TestClientApp/"

This reverts commit 5ad327c70789a6ab50e372a5bbc2cfa3b0a7f883.
2021-01-27 11:17:42 +08:00
William Cheng
7654356df2
Migrate elixir samples to use OAS v3 (#8538)
* use 3.0 spec for testing

* add new files

* add 200 responses

* update samples, better code format for jaxrs
2021-01-27 11:14:58 +08:00
William Cheng
f6c617d09f
Add typescript-nestjs client generator (#8522)
* #3336 add nestjs generator

* #3336 add nestjs generator

* #3336 add nestjs generator

* #3336 add nestjs generator

* remove extra files from building

* Revert "remove extra files from building"

This reverts commit 7f80f961ef0cd0e50b9d2bb856a3703d5b821640.

* fix merge

* fix tests

* Add missing test client options provider for nestjs

* cleanup PRS

* fix compilation error

* remove groovy bin files;

* fix tests

* add samples

* update doc

* update samples

Co-authored-by: Victor Frank <vfrank@lumeris.com>
2021-01-26 09:34:33 +01:00
翠 / green
fb1b62816f
[typescript-axios] reduce file size (#8283)
* [typescript-axios] reduce file size

* [typescript-axios] regenerate-samples
2021-01-26 12:23:09 +08:00
William Cheng
84813be309
remove supportJava6 option (#8514) 2021-01-26 10:27:09 +08:00
Michael Ramstein
0ae54911c3
[Elixir] Adds workaround for httpc for post/put/patch requests (#5682)
* Ensures empty body is always present for post/put/patch

* Generate samples
2021-01-26 10:25:21 +08:00
SBNTT
a127aab497
--http-user-agent arg support in javascript generator (#8531)
* add User-Agent header in Javascript generator

* add User-Agent header in Javascript-apollo generator

* update samples
2021-01-26 09:50:16 +08:00
Bruno Coelho
17bb3750c4
[swift 5] fix objc integration (#8534)
* [swift 5] fix objc integration

* [swift 5] fix combine integration
2021-01-25 20:53:42 +08:00
Peter Leibiger
201acbd3de
[dart] Fix switch on enums not possible (#8512)
All enum instances are `const` so `equals/hashCode` is not needed.
Removing this allows to `switch/case` on enum instances.
2021-01-25 18:31:19 +08:00
kannkyo
c7a711697c
Support json data in csv (#8461) 2021-01-25 18:17:15 +08:00
kannkyo
bdfe3706f7
Support securityDefinitions (#8459) 2021-01-25 18:13:29 +08:00
Antonio
cb530d4e75
Add .t in spec generation of Elixir structs (#8159)
* Add .t in spec generation of object types

* update samples

* Adds workaround for free-form maps with propper typespec

* Adds missing typsspec definition for structs

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Michael Ramstein <mr@cyon.ch>
2021-01-25 16:13:23 +08:00
basyskom-dege
58f486651e
[Qt5][C++] Removed deprecated functions to support Qt6 (#8234)
* removed depricated functions

* using preprocessor variable. Updated samples

* added version check for random functions

* added another version check to Json functions

* Update modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpFileElement.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpFileElement.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.cpp.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Update modules/openapi-generator/src/main/resources/cpp-qt5-client/HttpRequest.h.mustache

Co-authored-by: Martin Delille <martin@delille.org>

* Apply suggestions from code review

Changed version check to Qt 5.15 to remove the warning of the deprecated functions when compiling with Qt 5.15

Co-authored-by: Martin Delille <martin@delille.org>

Co-authored-by: Martin Delille <martin@delille.org>
2021-01-25 15:32:43 +08:00
Bruno Coelho
3a56e3818f
[Swift 5] remove old swift sample (#8280)
* [swift] remove old swift sample

* [swift] update bitrise.yml

* [swift] update unit tests
2021-01-25 13:34:10 +08:00
Kuzma
57227e510f
Remove servers urls with trailing slash (#7940)
* remove trailing slash

* update sample app

* added tests

* bug fix

* Adds test in DefaultGeneratorTest

* Reverts python files

* Does not modify a value of /

* Stops skipping / use case

* update samples

Co-authored-by: Justin Black <justin.a.black@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-25 13:32:39 +08:00
Christophe Bornet
06ad7a51ef
[Kotlin-Spring] Fix properties default value (#8373)
* [Kotlin-Spring] Fix properties default value

* Fix kotlin enum default

* Update go sample
2021-01-24 22:43:58 +08:00
William Cheng
9286b43dfa
remove the bin folder under kotlin samples (#8520) 2021-01-24 14:20:40 +08:00
Richard Whitehouse
5f2ca61862
[Core, Rust Server] anyOf / oneOf support for Rust Server (#6690)
* [Core] Inline Model Resolution of Enums

Enums need to be named types, so handle them as part of inline model resolution

* [Rust Server] Handle models starting with a number correctly

* [Rust Server] Additional trace

* [Rust Server] Add support for oneOf/anyOf

* [Rust Server] Update supported features

* [Rust Server] General template tidy up

* [Rust Server] Implement IntoHeaderValue for wrapped data types

* [Rust Server] Convert from string correctly

* [Rust Server] Test for anyOf/oneOf

* Update samples

* Update docs
2021-01-23 21:32:51 +00:00
William Cheng
0068932470
fix Parcelable option (#8513) 2021-01-23 14:16:41 +08:00
Jean-François Côté
030b75b012
[Play Framework] Update the bean validation to use version 2.0. (#8354)
* Update the bean validation to use version 2.0. For a reason I don't know, it was not working anymore with version 1.

* better format

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-23 10:58:36 +08:00
SBNTT
96da7aaf9d
--http-user-agent arg support in dart generator (#8508)
* add User-Agent header

* set User-Agent header only if httpUserAgent is defined

* add User-Agent header in dart-dio generator

* update samples
2021-01-23 10:39:21 +08:00
Frank Lehmann
eecd30c2da
[swift5] Fix target SDKs for Combine option (#8476)
* Update min sdks when Combine is used

* Update samples

* Revert "Update min sdks when Combine is used"

This reverts commit e88b8abaa787ebf8cffc6b8360ea22437ae20069.

* Wrap import combine with canImport directive

* Update samples

* Wrap functions using Combine with canImport because of compiler error on archive

* Update samples

* Remove unnecessary newline and update samles
2021-01-23 10:35:37 +08:00