12694 Commits

Author SHA1 Message Date
Guy King
23c9627b98
Resolve response type name conflict in angular typescript lib (#9216)
* fix: rename var

* fix: run pr checklist scripts

* fix: correct response type var name for http client

* chore: run build scripts

* test: ci and correct name?
2021-04-08 21:57:23 +02:00
Esteban Gehring
fa4462ef11
Revert "Resolve responseType name conflict in Angular Typescript lib (#9202)" (#9214)
This reverts commit 9dda4aa2e8a48bf5237ec51705039493a0822614.
2021-04-08 18:52:54 +02:00
mazrean
01ff635139
[Go] Fix golang comment typos (#9207)
* fix go comment typo insensitive

* fix go comment typo response

* update samples
2021-04-08 09:59:31 +08:00
Guy King
9dda4aa2e8
Resolve responseType name conflict in Angular Typescript lib (#9202)
* fix: rename var

* fix: run pr checklist scripts
2021-04-07 19:35:20 +02:00
Peter Leibiger
065c0281fa
[dart] Improve types & imports (#9167)
* [dart] Improve types & imports

* don't use importMapping as it is intended for something different that is not possible in dart
* introduce imports map for dart specific features
* always import `dart:core`
* get rid of additionalReservedWords
* fix `--type-mappings` not working
* use required type mappings in samples
* no longer define additional reserved words  as it is impossible to list all anyways, they can now be configured via type-mapping parameter
* simplify dio imports

* Don't use guava for map instantiation

* Update docs
2021-04-07 00:33:35 +08:00
HexagonSun
acedd1cfba
[typescript-angular] Provide return value for all code paths (#9174) (#9176)
In order to avoid a compiler error when using `noImplicitReturns `, we
change the mustache template to use provide a return value for the if-
and else branch.

Fixes #9174.
2021-04-06 07:21:11 +02:00
Makoto Aoyama
c3b7ecff21
Add Hashable for Struct (#9166)
* Add hashable for struct

* Remove x-swift-hashable

* Run the shell script ./bin/generate-samples.sh
2021-04-06 10:50:23 +08:00
Peter Leibiger
29c131e781
[dart][dart-dio] Update dependencies (#9178)
* finally use released versions for http mocking
2021-04-05 23:39:18 +08:00
Thibault Duperron
4462d35195
Link filehash with execution id (#7848)
Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-04-05 21:11:27 +08:00
Yuri Orlov
659b00a4f9
use standard constant for UTF8 charset in generated java api clients (#7828) 2021-04-05 20:02:28 +08:00
William Cheng
5dae270c3e
[Go][server] parse bool in query parameter (#9171)
* Add bool query in example

* Add parseBoolParameter

* test with boolean parameter

* add endpiont for testing boolean

* remove bool parameter test

Co-authored-by: Stéphane Guillemot <gmtstephane@gmail.com>
2021-04-05 16:45:38 +08:00
William Cheng
c79d056935
Allow to specify response headers (needed for redirecting clients) (#9170)
* Allow to specify response headers (needed for redirecting clients) (#8148)

Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>

* add addResponseHeaders option

* enable addResponseHeaders

* fix comma

Co-authored-by: randomswdev <randomswdev@users.noreply.github.com>
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
2021-04-05 16:27:41 +08:00
Hippolyte HENRY
f8202df9aa
[go] Add constructor and IsValid method to enum types (#8224)
* Add constructor and IsValid method to enum types

* Add samples
2021-04-04 17:32:17 +08:00
lerminou
7cf6ee1957
[php-symfony] fix double quoting string defaults values (#9126)
quoting for default values is already done in:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java#L533
2021-04-04 10:40:16 +08:00
Martin Delille
c9716fcebb
Include QVariant helpers header (#9161) 2021-04-04 10:06:57 +08:00
Justin Black
fc58adee31
Fixes serialization of array items in model_to_dict [python] (#9153)
* Adds tests of endpoint with inline and refed model

* Regen samples

* Samples regenerated
2021-04-01 13:34:19 -07:00
sforst
7bf792a348
[typescript-axios] handle uniqueItems in query and header parameters (#8965)
* [typescript-axios] handle uniqueItems in query and header parameters

add endpoint /fake/test-unique-paramters to petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml for demonstration

* update samples

* [typescript-axios] update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-04-01 16:57:36 +08:00
cal
57e44e173f
[cleanup] erefactor/EclipseJdt - Evaluate without null check (#9134)
EclipseJdt cleanup 'EvaluateNullable' 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-04-01 11:32:10 +08:00
de1mos
b335ba834f
fix #7325 kotlin-spring fix reactive delegate pattern combination (#8867)
* #7325 kotlin-spring remove exchange field from reactive delegate pattern

* #7325 remove examples from kotlin-spring reactive delegate and add missing import

* #7325 add test assertions

* fix swagger spec in test
2021-04-01 09:47:11 +08:00
William Cheng
917b358e27 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-04-01 09:25:19 +08:00
Noor Dawod
26ca6ab27e
[Dart2] Add initial support to use an isolate to offload JSON serialization/deserialization (#9100)
* Change signature of deserialize() to be a Future.

* Grammar tlc for a couple of sentences.

* Make serialize() use a Future also.

* Add useCompute as a parameter to ApiClient, adjust to use compute when serializing/deserializing.

* Updated Pet Store client code.

* Ordered imports.

* Remove Flutter-specific implementation.

* Rename global functions to serialize/deserialize JSON.

* Fix return type for apiClientSerialize.

* Updated pet store client code.

* Remove remark for _deserialize.

* Make _decodeBodyBytes a Future function.

* Updated pet store client code.

* Use await when calling serialize().

* Fix a grammatical error.

* Adjust doc.

* Centralize deserialization code in one function.

* Updated pet store client code.

* Add await to serialize() in few more tests.

* Make output look better for linting and humans.

* Updated pet store code.

* Add an empty line.

* Updated pet store code.

* Call the right serializer.

* Reuse same variable.

* Updated pet store code.

* Fix a logical error when deserializing.

* Calculate growable once.

* Ignore reassignment.

* Adjust a test.

* Regenerate petstore code.

* Revert back previous test.

* Use serialize() for testing.

* Revert using serialize() for testing.

* Add removal deprecation for serialize/deserialize.

* Updated petstore code.

* Updated deprecation note.

* Adjust tests to wait for futures.
2021-03-31 23:53:22 +08:00
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