7409 Commits

Author SHA1 Message Date
Ricardo Zanini
e377eabbc5
Fix #8492 - Use Vertx reference instead of static class (#8501) 2021-01-28 15:26: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
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
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
Hugo Alves
a7a5937813
[JAVA][FEIGN]Implement unit tests for java-feign client (#8484)
* Implement unit tests for feign client

Implement tests
Migrate to junit 5

* Default feign client does not support PATCH verb

Default feign client does not support PATCH verb

* Remove test for GET endpoint with request body

* Configure junit in gradle build

* Configure logback for unit tests

* Add missing dependencies to sbt

* Fix gradle dependency

* Add logback to gradle unit test

* Regenerate samples

* Make junit test classes package private

* Make junit test classes package private

* Update samples

* Organize imports

* Organize imports
2021-01-23 10:33:16 +08:00
Peter Leibiger
90ed1290fa
[dart][dart-dio] Improve form param handling, respect required flag (#8369)
* [dart-dio] Improve form param handling, respect required flag

* simplify template
* respect required flag (only null check when not rquired)
* minor formatting

* Add additional nullable check
2021-01-22 17:58:27 +08:00
William Cheng
3d23b99242
minor fix to powershell api doc (#8496) 2021-01-21 21:21:40 +08:00
William Cheng
62eecabfa5
[csharp-netcore] add .Net 5.0 support (#8467)
* add net5.0 support to csharp-netcore client gen

* update doc

* update samples
2021-01-19 22:38:34 +08:00
Anh (Duke) Nguyen
8b2ac7b0ac
Fix README typo for Crystal (#8470)
* Fix README typo for Crystal

* Fix README typo for Crystal in Mustache template
2021-01-19 16:38:53 +08:00
Hugo Alves
ede2a2316c
[JAVA][Feign] Replace Apache oltu with scribejava (#8318)
* - Replace apache oltu with scribejava
- Implement the following authentication methods
  - ApiKey header
  - HTTP basic authentication
  - Oauth client credentials flow
  - Oauth Implicit flow
  - Oauth Pasword (deprecated)

* Create class hierarchy for Oauth flows implementation

* Add instructions of how to use the ApiClient to Readme.md

* Update samples

* Remove support for java 6 and 7

* Remove java 6 and 7 support from gradle

* Format pom.xml

* Remove empty line

* Update samples

* Remove oltu dependency from build.gradle and build.sbt.
Replace oltu with ScribeJava

Update samples

* Update samples

* Update samples
2021-01-19 12:41:25 +08:00
William Cheng
52065cc1c5 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-18 12:40:31 +08:00
William Cheng
53a5bfecfd Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-18 11:33:57 +08:00
Johannes Wienke
cd2a0db1ce
Fix counting for large API solutions in generated Python README (#8403)
* Fix counting for large API solutions

Let 2 follow 1.

* Update Python samples with new readme
2021-01-15 13:51:12 -08:00
Justin Black
c4dbd2cfa3
[python] Fixes file upload + download, adds tests (#8437)
* Adds tests for file upload and files upload

* Adds test_download_attachment

* Fixes test_upload_file

* Adds download_attachment endpoint

* Adds test_download_attachment

* Updates assert_request_called_with signature

* Samples regen

* Adds upload download file spec route and sample gen

* Fixes file upload for application/octet-stream, writes test_upload_download_file

* Changes if into elif

* Improves python code in api_client
2021-01-15 13:27:33 -08:00
Toby Murray
99144252f7
Migrate off deprecate Gradle configurations (#8436)
A bunch of gradle configurations have been deprecated, with drop in replacements. Relevant to this project:

compile -> implementation
testCompile -> testImplementation

They're visible by executing e.g. ./gradlew build --warning-mode all with supporting documentation here: https://docs.gradle.org/6.6.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
2021-01-15 22:32:50 +08:00
Ștefan Cenușă
dfcd86f35a
[typescript-axios] bump axios version to 0.21.1 to fix vulnerability (#8445)
* fix(typescript-axios): updated axios dependency to new minor version 0.21.1

* fix(typescript-axios): update samples
2021-01-14 20:03:20 +01:00
William Cheng
e2ad6dbc1b
[Go] Fix response body (#8439)
* fix go response body

* add missing import
2021-01-14 23:32:19 +08:00
William Cheng
22ac8faec7
Revert "[GO][Client] return GenericOpenAPIError instead of error in Execute() (#8137)" (#8427)
This reverts commit 1562afea3980484a7f1819c4f51b0d53a44a009f.
2021-01-14 13:59:21 +08:00
Ronny Pfannschmidt
6b6d1b1a97
[python] fix #8404: avoid shadowing the name Endpoint (#8405)
if a type was named Endpoint, its import for use in the api would shadow
the name Endpoint for the internal utility
2021-01-13 08:38:41 -08:00
Hui Yu
0284fcd5c7
[C][Client] Fix the memory leak when a JSON string of model fails to parse. (#8390) 2021-01-10 15:10:05 +08:00
Bruno Coelho
646bcc64ad
[Swift 5] code formatting (#8385)
* [swift] improve code formatting

* [swift] update sample projects

* Revert "[swift] improve code formatting"

This reverts commit 0cc280509cae1a9a581ea4ed92d8141dd0f35a5c.

* [swift] update sample projects
2021-01-10 13:50:19 +08:00
Justin Black
ce893a84ff
Fixes object serialization when there is an inline array property which contains a refed enum (#8387)
* Fixes object inline enum defintion with refed enum item

* Adds refed array model example w/ serialization + deserialization
2021-01-08 13:15:55 -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
Peter Leibiger
c43234711a
[dart-dio] Generate the correct serializers (#8357)
* only generate actually used serializers (anything used in body or response)
* generate previously missing serializers for collection types
* improve formatting
2021-01-07 22:28:37 +08:00
William Cheng
1df719801e
Add a new crystal client generator (beta) (#8304)
* add crytsal client generator

* update samples

* update doc

* regenerate spec

* regenerate spec

* various fixes

* test crystal in circleci

* test crystal client in drone ci

* Revert "test crystal client in drone ci"

This reverts commit 317f2cf2a09f902c08ced214e8e5802fa79c3de8.

* fix install

* fix installation

* test crystal in travis

* cache image

* add --cache-from

* update doc

* run petstore with mvn

* install crystal

* fix install crystal

* sudo mvn

* run server

* using mvnw

* fix form or body parameter

* remove crystal from circleci

* fix test

* remove cache-from

* update doc
2021-01-07 17:10:22 +08:00
Dor Dadush
c67dc5d7d5
Fix error message templates for some field names (#8321)
some fields may start with a "u" character which causes
Powershell to think it is a unicode escape sequence.
2021-01-07 16:58:58 +08:00
Guillaume TOURBIER
9bd2a45e72
typescript-angular: add providedIn for Angular 9+ (#8324)
* feat: add providedIn for Angular 9+

Adding new option, providedIn, for generator typescript-angular
Keep providedInRoot for backward compatibility but mark as deprecated
for Angular 9+

fix: #6432

* doc: providedIn

infos about providedIn
Mark providedInRoot as deprecated

* doc: run generate-samples for typescript

using typescript-angular-v9-provided-in-any.yaml

* refactor: runned ensure-up-to-date locally

* refactor: api.module.mustache rely on providedIn too

* doc: re-generate samples
2021-01-06 15:31:41 +01: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
Peter Leibiger
fc22de0522
[dart-dio] Fix failing integration tests (#8335)
This happened due to the merge of #6384 where implicit-dynamics were still allowed.
2021-01-05 22:08:55 +08:00
Dor Dadush
4cdf610be0
Fix fields null check in powershell model template (#8323)
If field is boolean, the value might be $False.
The current null checking does not allow $False to be set.
2021-01-05 21:56:06 +08:00
Hippolyte HENRY
a9c168c400
[ruby] Support aliasing of API keys (#8124)
* Allow aliasing of auth keys

* update sample and add config for feature

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-05 20:04:08 +08:00
Peter Leibiger
0c4a928ebc
[dart][dart-dio] Enable strong-mode and strict types (#8231)
* [dart-dio] Enable strong-mode and strict types

This will make it easier to eventually transition to NNBD. Also fix some formatting things.

* [dart-dio] Add implicit-casts: false to analysis options

* [dart-dio] Add dartanalyzer to integration tests

* raise minimum Dart version to 2.6 (to support spread collection)
* add header to all files for language version
* fix some missing imports that can be fixed (some remain due to missing inheritance support)
2021-01-05 09:43:17 +08:00
Josh Burton
604ac6d90f
[dart-dio] Serializes request bodies using a specific serializer so a… (#6384)
* Updates samples

* Handles primitive types
2021-01-05 09:40:32 +08:00