11973 Commits

Author SHA1 Message Date
Justin Black
6cc270633b
[python] Fixes additional_properties_type for models (#8802)
* Fixes additionalProperties values for models, updates docs, adds tag test of it, fixes frit and gmfruit tests

* Moves this.setDisallowAdditionalPropertiesIfNotPresent higher

* Makes setting additional_properties_model_instances contingent on the presence of addprosp in schema, updates sample spec composed schemas to remove addprops False form two

* Fixes oneOf anyOf allOf instantiation logic

* Removes Address from Cat definition

* Adds required vars for apple and banana, removes required vars from composed schema init sig

* Updates composed schema vars to be set on self and all composed instances

* Removes get_unused_args, get_var_name_to_model_instances, and get_additional_properties_model_instances

* Fixes fruit + deserilization tests, creates ComposedSchemaWithPropsAndNoAddProps

* Fixes FruitReq tests

* Fixes GmFruit tests

* Fixes discard_unknown_keys tests

* Samples updated

* Removes additionalproperties False in Child

* Samples updated

* Improves handling of v2 and v3 specs for isFreeFormObject, v2 sample spec updated with link to bug

* Adds cli option disallowAdditionalPropertiesIfNotPresent to python

* Adds getAdditionalProperties method so the value for addProps will be correct

* Reverts file

* Reverts file

* Updates python doc

* Reverted anytype_3 definition

* Updates test_deserialize_lizard

* Updates test_deserialize_dict_str_dog

* Updates testDog

* Updates testChild

* Adds v2 python_composition sample

* Adds needed files for python testing

* Adds existing tests into the new python sample

* Fixes test_dog

* Removes addProps false form Dog

* Fixes testChild

* Updates how additionalProperties are set

* Fixes empty_map type

* Type generation fixed for v2 and v3 specs

* Refactors getTypeString, updates artifactids in pom.xml files

* Adds new python sample to CI testing I think

* Fixes artifactId collision, regenrates docs
2021-03-31 08:48:12 -07:00
Peter Leibiger
47e292c0e7
[dart][dart-dio] Remove sample formatting from dart-dio-next (#9121) 2021-03-31 16:45:47 +08:00
William Cheng
628e3d1914
remove pthread (#9130) 2021-03-31 15:56:50 +08:00
William Cheng
de5651adac
[C#] fix integer enum without format (#9136)
* fix inner enum integer without format

* add line break, update samples

* remove line break

* add line break

* update SHA
2021-03-31 15:11:10 +08:00
Luca Mazzanti
e1ef00903e
[csharp][netcore-httpclient] Reuse HttpClient, Allow use of external HttpClient. Patch to previous PR. (#9109)
* [csharp][netcore-httpclient] Reuse HttpClient, Allow use of external HttpClient.

* Updated samples

* Removed local variables no more useful

* Added InvalidOperationException when used a configuration not supported for the constructor

* Updated samples
2021-03-30 18:10:08 +08:00
Justin Black
ae099330b9
Feature fixed, samples regenerated (#9131) 2021-03-29 23:42:14 -07:00
William Cheng
a35e9b590c Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-03-30 13:18:35 +08:00
William Cheng
99ddd6d2f2 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-30 11:41:09 +08:00
Jakob
0af45b3823
[Java] add jackson annotations to setters (#9041)
* [Java] add jackson annotations to setters

Closes #6856

* [Java] fix conflictiong setter with JsonNullable
2021-03-30 11:17:15 +08:00
William Cheng
becb424455
[PHP] minor code enhancement (#9009)
* minor code enhancement

* remove unused files
2021-03-30 11:13:30 +08:00
William Cheng
f898bfc7d6
better default value handling in go generators (#9106) 2021-03-30 11:09:21 +08:00
Peter Leibiger
f66fbf6969
[dart][dart-dio] Update dependencies (#9122)
* [dart-dio] Update dio

* [dart-dio] Update to dio 4.0.0

* [dart-dio] Fix dependency problems with Dart 2.12 SDK during build

* Revert changes to analyzer

This only fails locally, not sure why. CI only shows a warning.

* Fix compile error after http_mock update
2021-03-30 00:17:37 +08:00
cal
7816ea076e
[cleanup] erefactor/EclipseJdt - Invert equals arguments if parameter is constant string (#9111)
EclipseJdt cleanup 'InvertEquals' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-29 23:58:52 +08:00
cal
6daecb88c2
[cleanup] erefactor/EclipseJdt - Use primitive parse methods instead of wrapper. (#9113)
EclipseJdt cleanup 'ParsePrimitive' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-29 21:02:51 +08:00
Peter Leibiger
6c8bc1ec88
[core] Allow using lists as globalProperty in config files (#8339) 2021-03-29 20:56:11 +08:00
cal
d913b14d45
[cleanup] erefactor/EclipseJdt - Make inner class static (#9112)
EclipseJdt cleanup 'MakeInnerClassStatic' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-29 20:54:41 +08:00
William Cheng
a078b1d826 Merge branch '5.2.x' into 6.0.x 2021-03-29 12:56:33 +08:00
cal
67d7f60f6a
[cleanup] erefactor/EclipseJdt - Convert 'for' loops to enhanced (#9110)
EclipseJdt cleanup 'ConvertForLoopToEnhanced' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-29 12:13:26 +08:00
William Cheng
8d372fa66a
better null check for response (#9105) 2021-03-29 12:05:17 +08:00
William Cheng
ab6c6962c2
add enum suffic support to rust client (#9107) 2021-03-29 11:40:26 +08:00
linnefromice
70616b541e
[Ruby] remove duplicated supportingFiles.add (#9108)
* remove duplicated supportingFiles

* modify examples - remove duplicated supportingFiles
2021-03-29 11:31:24 +08:00
William Cheng
9fb97c6c29
postpone require models with parent (#9103) 2021-03-29 11:07:57 +08:00
Justin Black
fe52529f05
[python] fix custom model template feature (#9118)
* Removes colliding __init__model.mustache in PythonClientCodegen.java

* Removes unused files

* Regenerates samples
2021-03-28 11:28:25 -07:00
Blackclaws
45654d28ed
[csharp][netcore-httpclient] Reuse HttpClient, Allow use of external HttpClient, Fix Socket Exhaustion, Alternative With Constructor Injection (#9085)
* Do not allow not reusing HttpClient, fix socket exhaustion issues, add Readme on how to add your own client

* Add Readme change

* Alternative version via constructor injection

* Update samples

* Update usage in ExecAsync

* Clean Constructor

* Add Warning to constructor, Update Samples

* Add warning, fix last constructor, update samples

* Change client to private in constructor injection

* Add disposable to ApiClient

* Do not dispose handler if we did not create it

* Update samples

* Add disable switch and update samples and documentation
2021-03-27 15:20:58 +08:00
William Cheng
b7f389aacb
minor code improvement (#9091) 2021-03-27 14:57:26 +08:00
Prakhar Gupta
b1837693b1
[JAVA][jaxrs-spec] Added custom methods to add/remove elements from Java Collections (#6468) 2021-03-27 13:59:49 +08:00
Jakub Surdej
711ce5431a
Add method allowing to apply middleware to request (#7403)
Prepare custom auth function template to be optional one

Rename auth function to middleware

Move middleware execution below operations with context

Generate samples for go

Modify new line characters in template not to affect default one

Generate samples with modified template
2021-03-27 13:53:30 +08:00
Phillip Verheyden
fa624ef38c
Use prepare script instead of prepack (#7807)
Including the generated JS client library code as a git repository did not work when executing npm install. It complained about not being able to find 'babel'. Apparently when referencing a dependency from git, both prepare and prepack are executing to build the 'dist' directory, but prepack does will not include any devDependencies. Therefore we need to switch this to prepare instead.
2021-03-27 13:45:11 +08:00
William Cheng
e6f56626ed
Revert "Enable useOneOfInterfaces for the ruby generator (#8061)" (#9104)
This reverts commit 23bc2aaf6b95bce55e5c3264065e2597eab2ea00.
2021-03-27 13:43:31 +08:00
Jacob Burroughs
23bc2aaf6b
Enable useOneOfInterfaces for the ruby generator (#8061)
Tested against https://ftc-events.firstinspires.org/swagger/v2.0/swagger.json

Used to generate un-runnable code, now it works
2021-03-27 13:42:48 +08:00
tomred-net
38b49e77af
fix #8755 [BUG] Java (jersey2) ApiClient debug cannot be enabled (#8756)
* fix #8755 [BUG] Java (jersey2) ApiClient debug cannot be enabled

* fix #8755 updating samples
2021-03-27 10:01:39 +08:00
avbenavides
2525639875
Update client.mustache (#8970)
Bash Client Escapes parameters with a 't' to %09 and leaves tabs unescaped
Fixes https://github.com/OpenAPITools/openapi-generator/issues/7303
2021-03-27 09:59:53 +08:00
leonluc-dev
7e6ce69c64
[ASPNETCORE 3.x] Microsoft.AspNetCore.Authorization directive no longer requires useSwashbuckle condition (#8368)
* Update controller.mustache

Moved using directive for Microsoft.AspNetCore.Authorization outside of useSwashbuckle tag to prevent compilation errors with Authorize tag if Swashbuckle is disabled.

* Updated aspnetcore-3.x samples
2021-03-27 09:56:37 +08:00
William Cheng
5abf020be3
use interrupted exception instead of just exception (#9092) 2021-03-26 21:41:24 +08:00
William Cheng
854296634a
better logging (#9090) 2021-03-26 18:21:59 +08:00
William Cheng
16b141e402 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-26 10:20:36 +08:00
William Cheng
e71ae12e14
Restore interrupted state (#9084) 2021-03-26 09:42:27 +08:00
William Cheng
402cf9a3a2
Fix integer enum in csharp generators (#9035)
* fix integer enum in csharp generators

* add comment
2021-03-25 21:30:42 +08:00
cal
6a26ac8e20
[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines (#9077)
EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-25 21:24:24 +08:00
cal
97e27f2b36
[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines (#9076)
EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-25 21:23:29 +08:00
cal
9419de573e
[cleanup] erefactor/EclipseJdt - Remove unused imports (#9075)
EclipseJdt cleanup 'RemoveUnusedImport' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-25 21:21:21 +08:00
cal
6e0ca448dd
[cleanup] erefactor/EclipseJdt - Remove unused imports (#9068)
EclipseJdt cleanup 'RemoveUnusedImport' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-25 16:42:41 +08:00
William Cheng
fea1377603
Use InterruptedException, IOException instead of just Exception (#9063)
* use InterruptedException, IOException instead of just Exception

* undo changes to the license
2021-03-25 13:30:30 +08:00
cal
7813398e7e
[cleanup] erefactor/EclipseJdt - Remove unused imports (#9067)
EclipseJdt cleanup 'RemoveUnusedImport' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-25 10:52:22 +08:00
cal
862e9cb79a
[cleanup] erefactor/EclipseJdt - Remove unused imports (#9066)
EclipseJdt cleanup 'RemoveUnusedImport' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-25 10:51:53 +08:00
cal
ee2f585f37
[cleanup] erefactor/EclipseJdt - Remove unused imports (#9058)
EclipseJdt cleanup 'RemoveUnusedImport' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-24 20:48:14 +08:00
cal
8043a8b9f4
[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines (#9057)
EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-24 20:47:39 +08:00
cal
b7c5d38011
[cleanup] erefactor/EclipseJdt - Remove redundant semicolons (#9056)
EclipseJdt cleanup 'RemoveRedundantSemicolons' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-03-24 20:46:31 +08:00
vnq
74e5c3ccd3
[php-symfony] remove nested Valid constraint (#8994)
* Fix constraint Valid cannot be nested

* Update PetController.php

* Update UserController.php
2021-03-24 13:30:42 +08:00
Kam
f137f3331a
Add possibility to generate only files needed for sources compilation (#9012) 2021-03-24 13:27:25 +08:00