18059 Commits

Author SHA1 Message Date
Peter Leibiger
4f4f1d4128
[dart][dart-dio] Remove manual json encode/decode calls in API classes (#8812)
* [dart][dart-dio] Remove manual json encode/decode calls in API classes

Dio automatically adds a default transformer which does call `json.encode` and `json.decode` when the content-type is `application/json`. When the content-type is different, then it  is up to the consumer to configure the Dio instance correctly to support custom content-types.

Also tests!!!

* [dart] Constraint test library to < 1.16.0 as it requires Dart 2.12.0

* Fix more constraint problems for the new test project
2021-02-24 23:29:41 +08:00
Martin Delille
b5c665472c
Qt client handle deprecated (#8766)
* Qt client handle deprecated

* Update sample

* update VERSION

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-24 11:46:07 +08:00
William Cheng
91805936e6
[maven plugin] fix security issues (#8795)
* use Files.createTempFile in maven plugin to avoid security issues

* error check when creating a folder
2021-02-24 11:45:44 +08:00
William Cheng
c31e6e79d0
[online] use Files.createTempFile to address security concerns (#8788)
* use Files.createTempFile to address security concerns

* Update modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java

Co-authored-by: Jonathan Leitschuh <Jlleitschuh@wpi.edu>

Co-authored-by: Jonathan Leitschuh <Jlleitschuh@wpi.edu>
2021-02-24 00:33:06 +08:00
William Cheng
c653051997
Revert "[Ruby] force users to specify the temp folder path to address security concerns (#8730)" (#8807)
This reverts commit 18a6f5a941f3b5777977693f3b59ac5d200928a8.
2021-02-24 00:31:43 +08:00
Gabriel Féron
a7c6eccced
Rust: Add support for lists (and sets) of enum values (#8693)
* Add support for arrays of enums for Rust

* Rust: Use HashSet if uniqueItems is true
2021-02-23 19:02:01 +08:00
William Cheng
9c4c624eb7
Add monitoring to detect tabs in the templates (#8738)
* add monitoring for tabs in the templates

* rename script

* add detect_tab_in_templates.sh

* rearrange tests

* add kotlin folders

* move test to circleci

* restore .travis.yml

* fix grep
2021-02-23 19:00:59 +08:00
Francesco Guardiani
4bf09833f4
[Java][Vert.x] Make ApiHandler reusable (#8720)
* Fix #8710

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Reintroduced default constructor

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Deprecated

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2021-02-23 15:38:57 +08:00
William Cheng
42d3dbd5d1
Fix bugs to ensure unique parameter names (#8762)
* fix unique parameter naming

* add tests
2021-02-23 14:49:44 +08:00
agilob
e7f50f66a3
Make all loggers non-static (#8799)
* Make all loggers non-static

Reduces memory usage on startup by between 2 and 4 MB

* Fix compile error in some autogenerated? module
2021-02-23 14:46:56 +08:00
Ronny Pfannschmidt
eb3d6d2f16
[python][template] move _path_to_item of simple init to avoid name error (#8737)
* [python][template] move _path_to_item of simple init up so its avaliable for missing default errors

* update generated examples
2021-02-22 21:00:14 -08:00
William Cheng
19f43b5330
use Files.createTempFile in asciidoc tests if possible (#8794) 2021-02-23 11:57:05 +08:00
William Cheng
1b6cabb97d
[Java] use Files.createTempFile instead (#8787)
* use Files.createTempFile

* fix import

* add missing import
2021-02-23 11:40:37 +08:00
William Cheng
d85f61ff0c
[TS] Revert changes in nestjs readme (#8793)
* revert changes to nestjs readme

* update samples
2021-02-23 11:33:32 +08:00
William Cheng
00c7ebab66
use Files.createTempFile (#8791) 2021-02-23 11:33:10 +08:00
William Cheng
764a3b044c
replace tab with spaces, minor code format change (#8774) 2021-02-22 19:46:11 +08:00
William Cheng
e6b44349ba
Add a link to the blog post by cloud-viadee (#8786) 2021-02-22 15:18:00 +08:00
Daniel Friesen
047a71c574
[typescript-axios] Support array query arguments (#8772)
* [typescript-axios] Support array query arguments

typescript-axios does not correctly output query arguments when you use `explode: true` for a parameter.

fixes #7966
fixes #7973

* Fix mistake in query parameter setting
2021-02-21 17:27:46 +01:00
Kamil Piotrowski
a9e797c6ca
Add additional AWS v4 signature parameters to go client generator (#8706) 2021-02-21 22:07:22 +08:00
James Gilliland
f3c164d1ad
[PHP] Use a valid php type for maps (#8718)
* Use a valid php type for maps

* Convert type hint to correct format

Align map array format to that expected by phpdoc and associated tools.
2021-02-21 18:07:45 +08:00
William Cheng
c636f7e08d
update jackson to 2.12.1 (#8783) 2021-02-21 17:53:23 +08:00
William Cheng
e432dfa59a update gradle.properties to fix appveyor build issue 2021-02-21 14:47:37 +08:00
William Cheng
e9d4886e70
replace tab with spaces, minor code format change (#8775) 2021-02-21 12:14:52 +08:00
sullis
695efdba71
enable Dependabot v2 (#8642) 2021-02-21 11:55:29 +08:00
William Cheng
ea428d6048
update jackson dependencies to address security issues (#8778) 2021-02-21 11:40:24 +08:00
Govind
04bd1ece23
fix for 8760 (#8761) 2021-02-20 11:54:48 +08:00
William Cheng
9c20050bdc
Add an option to skip operation examples (#8731)
* add flag to skip operation examples

* reset to false
2021-02-20 11:51:21 +08:00
William Cheng
ba4aae5074
[Go] bug fix (breaking), minor code format enhancement (#8715)
* go minor code format enhnacement

* fix required vars in the model new

* remove comma
2021-02-20 11:50:27 +08:00
William Cheng
ee12a6f7ee
revise invalid spec error message (#8735) 2021-02-20 11:49:31 +08:00
William Cheng
18a6f5a941
[Ruby] force users to specify the temp folder path to address security concerns (#8730)
* address security issue when downloading files in the ruby client

* update samples

* fix double quote
2021-02-20 11:49:10 +08:00
William Cheng
095019a6d8
replace tabs with 4-space (#8757) 2021-02-19 23:06:20 +08:00
William Cheng
d19bfebeda
replace tabs with 4-space in dart templates (#8740) 2021-02-19 18:02:54 +08:00
Anthony Whitaker
bb712013f8
Fix misleading warning message for missing output directory. (#8742)
Change warning message to info.
Add name of directory checked to message.

Resolves #4627
2021-02-19 11:48:54 +08:00
William Cheng
bed5ab17ef
Remove flash templates (#8741) 2021-02-19 10:55:44 +08:00
William Cheng
d5a9b53bdc
replace tabs with 4-space (#8739) 2021-02-19 10:54:55 +08:00
Martin Delille
df5050f3b0
[cpp-qt5-client] Fix qt5.15 check (#8711)
* Fix qt5.15 check

* Fix check fix
2021-02-18 11:54:10 +08:00
Peter Leibiger
c916df9381
[dart][dart-dio] Nullable support/improvements (#8727)
* [dart-dio] Disable nullable fields by default

This is not in line with the OAS and will prevent future Dart nullabilty features (NNBD) from being useful as all types would be optional.
Users can still opt-in for this.

* [dart-dio] Properties are nullable when not required AND not nullable

* [dart][dart-dio] Support nullable/required fields

* properties in built_value need to be nullable when they are nullable in OAS or when they are not required in OAS
* built_value does not support serializing `null` values by default as it is based on a serialization format based on iterables/lists and not maps
* dart-dio uses the built_value json plugin to convert the built_value format to regular json
* by generating a custom serializer for each class we can add support for serializing `null` values if the property is required AND nullable in OAS
* this is a breaking change as not all properties in the models are nullable by default anymore

* Implement required/nullable for dart

* Changes for set types and enum names after rebase

* Add some comments and fix built_value fields with default being nullable

* More rebase changes and regenerate docs
2021-02-17 21:44:21 +08:00
Peter Leibiger
7704ff3d08
[dart][dart-dio] Allow API key authentication with multiple API keys (#8728)
Remove the break stopping after the first key.
2021-02-17 21:40:27 +08:00
William Cheng
55292dd22b
Add ASP.NET Core 5.0 support (#8717)
* add aspnet core 5.0 support

* skip overwriting Org.OpenAPITools.csproj

* update doc

* update doc
2021-02-17 18:58:13 +08:00
Oleh Kurpiak
135c8f45a4
[Java][native] extend native ApiClient (#8557) 2021-02-16 21:47:44 +08:00
Peter Leibiger
683dcb8889
[dart][dart-dio] Raise min Dart to 2.7.0 & update built_value constraint (#8684)
* raise min Dart version to 2.7.0 / Flutter 1.12.0
* update constraints for built_value to support new major versions with null safety
2021-02-16 18:00:59 +08:00
Peter Leibiger
608242b4d8
[dart][dart-dio] Improve prefixing of inner enums with classname (#8685)
* [dart][dart-dio] Improve prefixing of inner enums with classname

* prevent further name conflicts by correctly naming the enum, until now there could potentially occur conflicts e.g. 2x `MapTestInnerEnum` by renaming the `items` child property
* correctly set `enumName` to match `datatypeWithEnum`

* Unrelated test regeneration
2021-02-16 17:59:54 +08:00
Patrick McGleenon
3c4015b897
[REQ] [GO] Added enumClassPrefix option to go-gin-server. Used same appro… (#8681)
* [REQ] Added enumClassPrefix option to go-gin-server.  Used same approach as #7008 (go-server)

	modified:   docs/generators/go-gin-server.md
	modified:   modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java
	modified:   modules/openapi-generator/src/main/resources/go-gin-server/model.mustache

* Fixed CI error in docs
2021-02-16 17:54:00 +08:00
goexplore
cd0ca65732
[aspnetcore] Improve model inheritance support by including JsonSubTypes to properly handle serialization (#8384)
* Add JsonSubTypes to templates

* Add JsonSubTypes to templates

Co-authored-by: Anders Gilje <agilje@slb.com>
2021-02-16 09:20:47 +08:00
William Cheng
53285e5aa5 update samples 2021-02-16 08:15:04 +08:00
David Hontecillas
51c8fd1520
Fix generated go client cannot upload file (#8393)
* go client send **io.File body

* run generate-samples for Go upload fix
2021-02-16 08:08:27 +08:00
Benjamin Klatt
b294165548
New blog post about OpenAPI Generator added (#8712)
* FIX #8583 [BUG][JAVA] AbstractOpenApiSchema package

Fixed package declaration in AbstractOpenApiSchema.mustache template

* New blog post added
2021-02-16 07:56:57 +08:00
sforst
99b36b9b3a
[typescript-fetch] handle uniqueItems correctly in model and api (#8695)
* [typescript-fetch] handle uniqueItems correctly in model and api

uniqueItems produces Set instead of Array as type, but the corresponding code did not treat Set correctly

use `Array.from` and `new Set` to convert from Set to Array and vice versa, if uniqueItems is true.

related to https://github.com/OpenAPITools/openapi-generator/issues/8258, but only fixes typescript-fetch

* [typescript-fetch] update samples
2021-02-14 17:12:00 +08:00
William Cheng
69cf4921c6
Add Gumtree to the user list (#8696)
* update headers

* add gumtree to user list
2021-02-14 11:34:40 +08:00
Reinhard-PTV
1006d2f21e
[java native][dotnetcore] Implement QueryParameter deepObject style for client generators java native and dotnetcore. (#8563) 2021-02-14 11:03:08 +08:00