11973 Commits

Author SHA1 Message Date
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
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
Gilbert Gilb's
9c0850f2d7
[Dart2] Fix compile errors for required enums without default value. (#7877)
Also fix display of minimum/maximum comment.
2020-11-25 00:20:31 +08:00
Nico Schäfer
d64586c223
Fix keyParamName not used for query API token (#7906) 2020-11-24 22:33:53 +08:00
David Ruppelt
4f0e75b32d
remove default ContentType for java webclient (#7945) 2020-11-24 22:28:23 +08:00
Christophe Bornet
2e3cfe7695
[kotlin-spring] Fix required requestBoby of kotlin spring (#7985) 2020-11-24 22:27:47 +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
William Cheng
33f4827a06
Add isRange in CodegenResponse (#7854)
* add isRange

* undo changes to spec
2020-11-23 17:16:44 +08:00
William Cheng
4984f9c3d5
Correct allOf with only one child schema (no discriminator) (#7855)
* Correct allOf with only one child schema (no discriminator

* fix tests
2020-11-23 17:16:36 +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
aed8086d0e
fix string comparision in go generator (#7998) 2020-11-22 20:55:21 +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
cf8ea9120a
fix additional properties without variables (#7978) 2020-11-20 11:54:39 +08:00
William Cheng
c02fc812fe
add warning about unsupported libraries in python client generator (#7981) 2020-11-20 11:54:16 +08:00
William Cheng
5e02a5bd45
Set generateAliasAsModel to false in tests (#7979)
* set generateAliasAsModel false in tests

* add missing import
2020-11-20 10:56:05 +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
Alexander Rashed
54d6257865
Fix parameter uniqueness for form- and body-params (#7577)
If a form-parameter had the same name as another (header-, query-,
path-, or cookie-)parameter, a conflict could be caused (for example
in the typescript generator). This fix executes the same uniqueness-
check and renaming for form- and body-parameters as it is done for
all other parameters.

@see issue #7575

Co-authored-by: Alexander Rashed <alexander.rashed@ntsretail.com>
2020-11-16 21:16:53 +08: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
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
Daniel Varnai
3b84e8bb55
Fix missing parenthesis (#7923) 2020-11-12 11:13:50 +01:00
Jeff Brower
ec13288c02
Fix NPE in CodegenIgnoreProcessor.java (fixes #3356) (#7846)
Fixes NullPointerException when using an override ignore file with no parent.
2020-11-11 10:22:51 -05:00
William Cheng
eab26d493b
Better decimal support in Scala generators (#7876)
* fix decimal mapping in scala generators

* add mapping for decimal, number in scala generators

* update doc

* use scala.math.BigDecimal
2020-11-10 11:29:50 +08:00
William Cheng
f8766d591c
[C#][Nancyfx] fix incorrect import (#7907)
* fix incorrect import

* remove importMapping
2020-11-10 09:33:34 +08:00
William Cheng
b1b64cb356
throw exception for invalid framework (#7901) 2020-11-10 09:33:07 +08:00