15025 Commits

Author SHA1 Message Date
William Cheng
f2e2b30f23 fix some tests, update default generator 2020-12-08 14:50:05 +08:00
William Cheng
37cec1695c better code format 2020-12-08 01:57:47 +08:00
William Cheng
4a275b24f7 update tests, generators and more 2020-12-08 01:56:42 +08:00
William Cheng
8c06f96529 refactor modelutils (partial) 2020-12-08 00:21:37 +08:00
William Cheng
36d366b19b refactor isAnyTypeSchema, isFreeFormType 2020-12-07 23:09:05 +08:00
Peter Leibiger
751ffad8db
[dart] Cleanup and OAS3 support (#8085)
* [dart] Cleanup and regnerate old/wrong tests and docs

* docs path seems to be doc now in all dart generators
* generated tests are very old and use wrong classes

* [dart-dio] Improve formatting

* [dart][dart-dio] Restructure tests to same layout

* remove duplicate/old openapi sample for which there is no generation config
* generate to `petstore_client_lib` for both generators
* run generated tests as integration tests for dart2 even if empty - this makes it easier to find compile errors

* [dart] Improve gitignore handling for Dart generators

* globally ignore all dart related files that should not be commited
* remove old ignores that are no longer valid

* [dart][dart-dio] Add OAS3 generation and integration tests

Dart2 doesn't compile, needs fixes.

* [dart] Do not attempt to deserialize binary content from JSON fields

Not sure if that case is ever relevant but for now there doesn't seem to be a better option.

* [dart] Fix integration tests for OAS3 petstore

Some POST operations now return 200 with content.

* [dart] Generate Petstore Fake API but don't add to integration tests yet

Explicitly not adding the new integration tests to the master POM. They do not work but having them allows for quickly iterating on open issues without breaking existing basic OAS2/OAS3 petstore examples. Instead they should be run manually until everything is fixed.
2020-12-07 21:38:39 +08:00
William Cheng
ed72843668
better operationId in elm client generator (#8109) 2020-12-07 18:29:38 +08:00
BrMtssk
e732804a68
[BUG][typescript-axios] Sets 'isCollectionFormatMulti' flag to true on multiple file uploads (#8105)
* [typescript-axios] Sets 'isCollectionFormatMulti' to true on file uploads.

Fixes #8104

* Safely checks if dateFormat is "binary" #8105

Co-authored-by: Bruno Matissek <bruno.matissek@gmail.com>
2020-12-07 09:27:33 +01:00
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
Hui Yu
3195338c47
[C][Client] Fix memory leak when free a map (#8107) 2020-12-07 08:59:03 +08:00
kannkyo
43fa47a51d
Support mediaType (#8100) 2020-12-07 08:58:13 +08:00
sullis
b54dade079
mockito 3.6.28 (#8106) 2020-12-07 08:51:31 +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
Ajith Kumar
3de537062d
[Java][Spring] Fixes incorrect request body for map type in reactive spring (#8046)
* [java][spring] updated template to support proper reactive map type

* [java][spring] supporting unit test for spring boot reactive request map issue

* [java][spring] updated samples

* [java][spring] refactoring the issue test spec
2020-12-05 18:32:57 +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
Hui Yu
bac913f384
[C][Client] Fix memory leak when the type of query parameter in request url is integer or boolean (#8096) 2020-12-05 18:23:56 +08:00
kannkyo
5e4d0978dc
Support body params for jmeter (#8101) 2020-12-05 18:23:22 +08:00
stephanpelikan
a4f1d1b5b1
Fix for 'Reactive paramter ServerWebExchange's properties appear in Swagger-UI' (#8031) (#8032)
* [Spring] Add @ApiIgnore to parameter ServerWebExchange of reactive style (#8031)

* [Spring] Apply contribution guidelines (#8031)
2020-12-04 15:09:06 +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
64c57e3f52
Add a script to detect changes in test files (#8020)
* add script to detect changes in test files

* remove build failure test
2020-12-04 12:22:35 +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
William Cheng
b0ecaab8fb
Add a link to massive art blog (#8082)
Add a link to massive art blog
2020-12-03 16:35:02 +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
William Cheng
ebac0a8ed4
Add a link to saki-engineering blog post (#8081) 2020-12-03 15:06:20 +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
Thomas Hervé
634c4c09e4
Fix generation of map model examples (#8063)
When generation examples of objects with additional properties, we use
the map syntax inside a model instantiation, which is incorrect. This
fixes it by checking for model at the right place.
2020-12-01 19:04:23 -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
William Cheng
e040a5fdde
Fix port when the URL doesn't have port specified (#8049)
* fix port missingin oas 3 spec

* update samples
2020-12-01 15:24:28 +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
Thomas Hervé
a8fbcb0db2
Properly generate email examples (#8035)
Those are not primitive types, but not model either, they need to be
handled explicitely.
2020-11-30 21:48:51 +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
Ülgen Sarıkavak
045d05fa72
Fix pyhton typo (#8041) 2020-11-28 15:00:23 +08:00
William Cheng
2801c0cb88
[Java][Play] Fix compilation issues when using the supportAsync option (#7864)
* fix async in java play generator

* add async operation option

* Remove the return null and replace with a return at the right place.

Co-authored-by: Jean-François Côté <jcote@stingray.com>
2020-11-27 23:30:46 +08:00
Thomas Hervé
3f75691da2
Fix list examples in Python (for real) (#8034)
The patch in #7967 forgot the prefix, this fixes it, and change the
sampels so that we can see the effect this time.
2020-11-26 14:28:27 -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
Thomas Hervé
157ad1ce73
Fix list examples in python (#7967)
* Fix list examples in python

When a model has an example in an array, it wrongly wraps it again in a
list instead of returning the list examples. This fixes it.

* Add comment
2020-11-26 18:01:34 +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
Julien Feltesse
2b6b7746f3
make the generated ruby oneOf specs pass (#8019) 2020-11-25 23:47:22 +08:00
bgong-mdsol
ca6c63f7e5
fix java incompatible types error for number (#8018) 2020-11-25 17:54:49 +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
Vithursa
596d9a1d1d
[jaxrs-cxf-cdi] Fix issue when generating code for header params when there are defaultValues defined (#7872)
* Update headerParams if there are defaultValue

* remove new line

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-11-25 10:04:53 +08:00
Adam Dobrawy
be07bd13af
Allows install typescript client via npm from Git (#7878)
* Allows install typescript client via npm from Git

'prepublishOnly' is run before the package is published. 'prepack' is run before the package is published and after installation local installation eg. via Git.

* Update examples for Typescript
2020-11-24 21:05:07 +01:00