7409 Commits

Author SHA1 Message Date
sahan
a3aa19927e
feat(config): pull the basePath from config is exists (#8078)
* feat(config): pull the basePath from config if the basePath doesn't exist

* chore: update samples

* chore: use the basePath from the base class

* chore: update all the samples
2020-12-07 09:25:02 +01:00
Toby Murray
cbe1fd9728
Bump Gradle in generated Java projects to 6.7.1 (#8079)
* Bump Gradle in Java projects from 6.0.1 to 6.7.1

Regular maintenance, 6.0.1 was released November 18th, 2019 and the latest release (November 16th, 2020) is 6.7.1. This updates all the wrapper templatesto the latest version.

* Updated generated Java samples

Generated via `./bin/generate-samples.sh bin/configs/java-*`

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-07 10:44:23 +08:00
Javier Velilla
c0c2f2b804
[Eiffel] various enhancements (#8076)
* Updated Eiffel code generator.
	Added missing language reserved words.

Updated mustache templates to use the latest Eiffel rules to avoid obsolte
feature calls and Cat-Calls.
Updated Eiffel configuration files (ecf's)
Updated comments styles.
Updated Travis CI file to use the latest Eiffel compiler.
Updated EIffel sample to use https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Added missing mapping decimal to REAL_64
Added Eiffel Kernel classes to importMapping to avoid generate models for
them.
Fixed issue with Eiffel feature name generation, updated toOperationId(String) method.
Simplified toInstantiationType method implementaetion.
Improved model.mustache to generate Eiffel models.

* Updated Eiffel sample.

* Removed unneeded tabs.

* Added AnyType mapping to ANY
Removed unneeded tab
Updated model name, remane models that starts with _.

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-07 10:07:03 +08:00
kannkyo
43fa47a51d
Support mediaType (#8100) 2020-12-07 08:58:13 +08:00
Sergey
13f1c610d9
[python] Re-merge Subclass Python exceptions (#7321) (#8095)
* Subclass Python exceptions (#7321)

* Subclass Python exceptions:
- UnauthorizedException (401)
- ForbiddenException (403)
- NotFoundException (404)
- ServiceException [500 - 599]

Fixes #2151

* add generated sample code

* use Python 2 flavor inheritance

* regenerate samples

* update samples

Co-authored-by: Ryan Rishi <ryan@ryanrishi.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-05 12:02:00 -08:00
Julien Feltesse
adcf54bc09
[ruby] document the *_with_http_info methods (#8094) 2020-12-05 18:27:49 +08:00
fuxs
38dbcdd752
[Go] Fixes missing return statement (#8072) (#8090) 2020-12-05 18:24:22 +08:00
kannkyo
5e4d0978dc
Support body params for jmeter (#8101) 2020-12-05 18:23:22 +08:00
nitoqq
25c7ccf30c
JS Client: Allow dot in path parameter name (#6116)
* JS Client: Allow dot in path parameter name

* JS Client: Allow dot in path parameter name

* Delete ApiClient.js

* Delete ApiClient.js

Co-authored-by: Nikolai Konovalov <konovalov.nikolai@gmail.com>
2020-12-04 12:27:44 +08:00
William Cheng
bcf4f8ade6
[C#] Fix oneOf derserialization with additional properties (#8057)
* fix oneOf derserializaoneOf deserialization with additonal prop

* fix tests due to better handlding of additional prop
2020-12-04 10:50:26 +08:00
Robert Pyke
7644f3ee83
[R] Bug - Invalid code generated for POST with no request object (#8067)
* Default body to NULL

* update samples

* Update to set body to NULL only when no hasBodyParam

* Revert any whitespace changes.

* Makes defaulting body conditional on hasFormParams also not being set

Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Robert Pyke <robertpyke@fb.com>
2020-12-03 16:21:08 +08:00
Peter Leibiger
033d985cf7
[Dart-dio] Add basic integration testing and fix compile errors (#8025)
* [dart-dio] Add basic integration test POM

This basically just fetches dependencies, runs the built_value generator and empty test cases. Even running empty test cases is more than is currently possible and at least finds compile errors.

There are compile errors atm which need to be fixed.

* [dart-dio] Fix missing BuiltSet import in models that use enums

* [dart-dio] Fix compile error when the return type is a Map

* the compile error was `serializerForType(Map<String, int>)` in `StoreApi` which needs to be  `serializerForType(Map)`
* use final instead of var in response handling

* [dart-dio] Generate docs after changes

* [dart-dio] Add integration test to CI execution list
2020-12-02 21:35:07 +08:00
William Cheng
82c5021df2
Revert "Bugfix swift5 code generation 2966 (#7301)" and provide a better (#8066)
fix for the stackoverflow issue
2020-12-02 21:20:44 +08:00
Ghufran Zahidi
64ade2ce8f
[powershell] Implemented the psdata property for module manifest file (#8048)
* Implemented the psdata property for module manifest file (Tags, LicenseUri, ProjectUri, IconUri, ReleaseNotes)

* fix string.format

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-12-01 16:52:12 +08:00
Dalibor Karlović
adcf9ffa20
feature(PHP): include the current value with enum failure (#7993)
When the value is not in the enum, the exception will now
include the actual value, helping spec designers.
2020-11-30 21:49:52 +08:00
sunn
16e9011d5b
Add handling of x-www-form-urlencoded and handling float without decimal if model is declared with float/double (#8043) 2020-11-30 21:47:55 +08:00
basyskom-dege
cb1a620628
[C++][Qt5] added Authentication Support (#8004)
* first commit of api Key feature.

* added multi key and URL query key support

* fixed error in mustache files, updated samples and tests

* added Basic Auth with Base64 encoding.

* updated Readme, added bearer token

* added check that authentication credentials are set. fixed typo in README
2020-11-28 15:02:09 +08:00
William Cheng
9334909bcd update samples 2020-11-26 18:44:18 +08:00
Florian Kamella
c950384a5d
[JAXRS-CXF] Generate missing jackson annotations in inner enum (#7879)
* [JAXRS-CXF] Introduce petstore sample for jaxrs-cxf-client with additional property jackson (preparational commit)

generated using: ./bin/generate-samples.sh ./bin/configs/other/jaxrs-cxf-client-jackson.yaml

* [JAXRS-CXF] Generate missing jackson annotations in inner enum

fix for generators jaxrs-cxf and jaxrs-cxf-client
2020-11-26 18:26:15 +08:00
Thomas Hervé
616b44f3b1
Improve generated Java examples (#8012)
* Add basic types imports to generated examples

This adds an extension to include basic types imports to generated Java
examples.

* Make some fixes to example generation

* Generate OffsetDatetime correctly

* Create a useful sample for enums, regenerate samples

* Fix BigDecimal as well
2020-11-26 18:14:26 +08:00
David Yee
cf185d559b
Expose JsonSerializerSettings in ApiClient (#7582)
* Expose JsonSerializerSettings in ApiClient

* Update generated petstore sample

* Add XML comments for SerializerSettings and match new OverrideSpecifiedNames default

* Add GetSerializerSettingsTest
2020-11-26 13:06:53 +08:00
Hui Yu
4dc8d2a351
[C][Client] Support progress function of libcurl (#7974) 2020-11-26 00:00:28 +08:00
Troy P
8cfc9b015a
[JS] (#7913) Adding support for multi file upload. Also adding the option for individual CodeGens to specify a collectionFormat (#7914)
* updated samples as well
2020-11-25 16:00:08 +08:00
David Ruppelt
4f0e75b32d
remove default ContentType for java webclient (#7945) 2020-11-24 22:28:23 +08:00
Julien Feltesse
522faf835a
[ruby] fix oneOf handling (#5706)
* [ruby] fix oneOf handling

* use previous ruby configs due to issue #4690

* check for oneOf model in base_object

* validate the attributes in partial_oneof_module
2020-11-23 22:43:34 +08:00
NickUfer
6f6822a1b7
[php][bug] Fixes exceptions with API's with too high date-time nanosecond precision (#7943)
* [php] Fixes problems with API's with too high date-time nanosecond precision

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-11-23 22:30:57 +08:00
Thomas Hervé
14ff8e0ffd
Remove links to basic types in java API docs (#7989)
* Remove links to basic types in java API docs

This removes (most) wrong links to basic types in Java API docs.

* Regenerate some more samples
2020-11-23 16:24:31 +08:00
Troy P
70bc472b86
[JS] (#7910) Fixing undefined error caused by no this instances (#7911) 2020-11-23 16:17:09 +08:00
Thomas Hervé
1c1e4f4476
Fixes to go API documentation generation (#7963)
* More fixes to go doc generation

* Regenerate samples

* Fix indent

* Remove additonal bracket on time objects
2020-11-23 16:08:55 +08:00
Noor Dawod
91e64f47fc
[DART2] A couple of bug fixes (#7969)
* Fixed a couple of problems with current implementation.

1) When encoding non-String header values, the client will forwar to parameterToString() for encoding.
2) fromJson() now accepts a dynamic value since the type transformer accepts a dynamic value.

* Updated Pet Store files.

* Proper spacing between blocks.

* Adjust spacing.

* Make fromJson() as a static function, thus not instantiating a new object if JSON is null.

* Adjust doc for fromJson() function.
2020-11-23 16:07:38 +08:00
William Cheng
2578ef5e63
Prepare snapshot (v5.0.0) (#7986)
* Revert "prepare 5.0.0-beta3 release"

This reverts commit 3ebe774df37b43348bac1310a272de53a2d7040b.

* revert to snapshot

* update samples
2020-11-20 19:19:59 +08:00
William Cheng
2715f1371a
Prepare 5.0.0 beta3 (#7984)
* prepare 5.0.0-beta3 release

* update samples

* remove beta3 from readme
2020-11-20 15:18:58 +08:00
William Cheng
dd26e406b5
Fix duplicated mappedModels (#7924)
* fix duplicated mapped models

* replace discriminatorExplicitMappingVerbose with legacyDiscriminatorBehavior in comments

* use mappingName for comparison

* improve template

* fix tests

* update comments

* update ts samples
2020-11-20 11:57:48 +08:00
William Cheng
b5ce7cec8b comment out angular v6, v7 tests 2020-11-18 16:13:09 +08:00
William Cheng
78611b3e38 update samples 2020-11-18 14:46:36 +08:00
William Cheng
3bf8ca7484
[python] Renames python generators (#7965)
* python->python-legacy, python-experimental->python

* test with openjdk8

* test with openjdk11

* comment out rm

* move kotlin tests to circleci

* move kotlin tests

* move tests to circleci

* fix circleci

* rearrange test

* move tests

* use wrapper

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2020-11-18 14:34:00 +08:00
Justin Black
c08f14500e
Revert "Do not use cached properties for additionalProperties (#7955)" (#7971)
This reverts commit 057647cf1ee0793f2987e89f8a588aa3db3ceb5d.
2020-11-17 21:08:55 -08:00
Justin Black
057647cf1e
Do not use cached properties for additionalProperties (#7955)
* Fixes additionalProperties, do not use cached properties for additonalProperties

* Regnerates samples
2020-11-16 11:26:54 -08:00
Alexis Cote
36aba267a0
[typescript-fetch] Allow to generate client without runtime checks (#7894)
* Add CLI options to remove runtime checks (serialization/deserialization).

* Update templates to support the new parameter

- Generates all the models in a same file to avoid import complexity
- Extract interfaces creator templates to reuse them

* Fix formatting and generate client examples

* Add documentation
2020-11-16 14:17:29 +01:00
patst
023e6dd9ed
typescript-angular: Angular 11 support (#7937)
* #7935 typescript-angular: support angular 11

* regenerate angular 11 sample project

* Update ngVersion to 11.0.0 in typescript-angular.md
2020-11-14 08:23:13 +01:00
William Cheng
a3a0af7c84
[C#][netcore] Add test for AdditionalProperties in both child and parent (#7921)
* add test for ap in both child and parent

* add cat test to net47
2020-11-13 21:13:16 +08:00
Esteban Gehring
e725c4e56f
update typescript-fetch samples (#7936) 2020-11-13 13:42:55 +01:00
berlysia
920eafc9c1
[typescript-fetch] add samples of nullable enum (#7754)
* [typescript-fetch] add sample

* [typescript-fetch] add sample for nullable enums
2020-11-13 13:17:35 +01:00
Thomas Hervé
777031f24f
Fix a few issues with go examples generation (#7873)
* Fix a few issues with go examples generation

This fixes a bunch of issues seen when generating go examples, namely
 - Numbers aren't casted to the right type
 - The time import is missing
 - Enums are treated as regular models

* Rebuild more samples

* Use examples properly

* Handle multiple instances in the same doc

* Fix wrong array closure

* Handle model arrays

* Fix file and enum namespace

* Regenerate samples

* Handle maps of complex types

* Handle oneOf

* Fix padding

* Fix enum doc

* Removes links to basic types in arrays

* Remove links to basic types in maps

* Fix enum links

* Minor indent fix

* Handle review comments
2020-11-12 23:36:40 +08:00
Rocky Warren
81e0e8dfa8
[typescript-axios]: Check configuration is defined in api.ts so it compiles with strict flag (#7892)
* Check configuration is defined

* Update samples
2020-11-09 20:56:08 +01:00
Nicholas Muesch
eceac6a63c
Skip validation if input_value is None (#7845) 2020-11-08 12:27:58 -08:00
William Cheng
eacf61de7e
fix decimal mapping (#7875) 2020-11-08 11:46:33 +08:00
Justin Black
08fb59009a
Removes secondaryParam and hasMore (#7882)
* Removes secondaryParam and hasMore

* Fixes tests

* Only uses bodyParam in groovy template
2020-11-07 11:04:12 +08:00
Ghufran Zahidi
05515040d5
[csharp-netcore]Fixed the null serialization issue for dotnet47 (#7884)
* Fixed the null serialization issue for dotnet47

* c# codeing style

* Updated the sample for csharp netcore

* corrected the typos
2020-11-06 16:15:38 +08:00
William Cheng
b5473d2fda
[c#][netcore] Skip readonly properties in serialization (#7883)
* skip readonly in serialization (c# netcore)

* minor wording change
2020-11-06 10:15:11 +08:00