12694 Commits

Author SHA1 Message Date
William Cheng
d6d241bdab
remove web.config (#6214) 2020-05-08 22:47:16 +08:00
William Cheng
f327f01c19
Replace powershell generator with powershell-experimental generator (#6213)
* replace powershell generator with powershell-experimental generator

* add back samples

* add back scripts

* remove outdated script

* update doc
2020-05-08 20:13:01 +08:00
Yuriy Belenko
8c6236b341
[php] Set required PHP 7.1 in code comments and readme (#6188)
* Bump PHP version to 7.1 in readme

* Bump PHP version to 7.1 in class templates

* Remove HHVM from Travis CI config

PHPUnit dropped support of hhvm, so build unlikely will pass tests.
https://github.com/sebastianbergmann/phpunit/issues/3320#issuecomment-426325646

* Remove sudo: false from Travis-CI config

Official doc recommendation:
https://docs.travis-ci.com/user/reference/trusty/#container-based-infrastructure

* Change tested versions to 7.1, 7.2 in Travis-CI

* Remove PHP_CodeSniffer from dev dependencies

There is another linter(PHP CS Fixer) which is fully configured while
CodeSniffer isn't configured at all.

* Use caret instead of tilde in dependencies

^2.12 equals (>= 2.12.0 && <3.0.0) while ~2.12 is (>=2.12.0 && <2.13.0)

* Refresh samples
2020-05-08 10:55:36 +08:00
Bruno Coelho
577ebb687e
[swift] remove urlsession kvo usage (#6211) 2020-05-08 10:13:13 +08:00
William Cheng
b23ec9a7dd
map any type in rust server generator (#6209) 2020-05-08 10:11:58 +08:00
Ghufz
13f329eafe
[powershell-experimental] : http signature authentication implementation (#6176)
* ValidatePattern having double quote(") throws exception on running Build.ps1

* fix tab with space

* [powershell-experimental] : http signature auth

* fix the tab issue

Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>
2020-05-07 22:46:40 +08:00
adg-mh
5f2270a0e8
Add missing AnyType type mapping (#6196)
Without the AnyType type mapping, the generated dart code uses `AnyType` instead of  `Object`, which does not compile.
2020-05-07 21:09:55 +08:00
William Cheng
fa8c9908be
Minor fixes post-release (#6204)
* minor fixes post release

* update gradle version

* comment out rust server test
2020-05-07 16:41:24 +08:00
William Cheng
98e54f0cc1 Merge remote-tracking branch 'origin/5.0.x' 2020-05-07 14:27:56 +08:00
Alofredo
3bfd6de327
[cpp][Qt5] Add the ability to pass QNetworkAccessManager as a parameter (#6053)
* [C++][Qt5] Add the ability to pass QNetworkAccessManager as a parameter
* connect to QNetworkReply::finished instead of QNetworkAccessManager::finished

* [C++][Qt5] regen samples for cpp-qt5-client

* [C++][Qt5] disconect from reply by timeout

* [C++][Qt5] regen samples for cpp-qt5-client

Co-authored-by: alfredotg <alfredotg@tu.ru>
2020-05-07 08:05:29 +02:00
Vikrant Balyan
9e8cc284e0
adds the missing typeMapping for AnyType (#6199) 2020-05-07 11:55:55 +08:00
Richard Whitehouse
046b4acdff
[Rust Server] Support boolean headers, and fix panic handling headers (#6056)
* [Rust Server] Support headers containing booleans

* [Rust Server] Fix panic handling headers

* [Rust Server] Fix issue with Results

* Update samples
2020-05-06 19:27:52 +01:00
William Cheng
1d606499ee Merge remote-tracking branch 'origin/5.0.x' 2020-05-06 22:51:05 +08:00
William Cheng
003165c2c2
Prepare 4.3.1 release (#6187)
* prepare 4.3.1 release

* update doc
2020-05-06 17:10:31 +08:00
Luis Ballabeni
30ee3f343e
Fix #6157: Updated native template to fix null async return (#6168)
* Fix #6157: Updated native template to fix null async return

Should fix issue: https://github.com/OpenAPITools/openapi-generator/issues/6157

* fixed uncaught json exception in java native api gen

* cleaning up

Co-authored-by: Luis Ballabeni <luis.ballabeni@lexisnexis.com>
2020-05-05 13:40:22 +08:00
Yuriy Belenko
90ff4926b9
Show description when summary is missing (#6159) 2020-05-05 11:23:59 +08:00
Sebastien Rosset
a58441cf68
Make the array items optional (#6132) 2020-05-04 20:31:55 +08:00
William Cheng
b369f9bfea
fix bearer auth in c# netcore async call (#6136) 2020-05-04 14:28:54 +08:00
William Cheng
138276a7c4
skip web.config for aspnetcore 3.x (#6147) 2020-05-04 10:45:02 +08:00
Justin Black
cbc006a938
Adds memoization and deserialization through 2 or more discriminators (#6124)
* Adds cached_property decorator, adds feature to move through n discriminators

* Adds v3 sample with 2 discriminators

* Adds tests of Shape, Tringle, and Quadrilateral traveling through 2 discriminators

* Adds test_deserialization.py:test_deserialize_shape

* Simplifes XTriangle sample spec schemas

* Simplifies Shape schema definition, updates go+python-experimental samples

* Fixes python-experimental test_dog tests

* Separates off python-experimental spec
2020-05-03 11:44:04 -07:00
Paul Hatcher
e4cbaa721b
Implement Asp.Net Core 3.0/3.1 generator (#6009) (#6025)
* Minor changes to 2.1 templates to make them work or improve documentation

* Support for ASP.NET Core 3.0 and 3.1

* Update aspnetcore test scripts and results

* Update generated documentation

* update doc

* Update modules/openapi-generator/src/main/resources/aspnetcore/3.0/Startup.mustache

Co-Authored-By: Tatsuro Shibamura <me@shibayan.jp>

* Update modules/openapi-generator/src/main/resources/aspnetcore/3.0/Startup.mustache

Co-Authored-By: Tatsuro Shibamura <me@shibayan.jp>

Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Tatsuro Shibamura <me@shibayan.jp>
2020-05-03 16:32:26 +08:00
Ukonn Ra
f4fa00fefa
Add async native Java Client (#4721)
* Add async native Java Client

* UPDATE: Reformat the samples

* test java native async in drone.io

* update test count

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-03 16:06:18 +08:00
minenok-tutu
cd88c06372
File return type fix (#5644)
* file return type fix

* Update client.mustache
2020-05-03 12:21:22 +08:00
Sebastien Rosset
afa66f858b
fix documentation (#6131) 2020-05-02 23:48:43 +08:00
Sebastien Rosset
77d6c04b24
[Java] Enhancements for HTTP message signature (#6090)
* Add code comments

* Change 'setup' method to setPrivateKey

* Add support for configuring digest algorithm

* run script in bin directory

* format generated code

* Revert "format generated code"

This reverts commit 3b527784375bcf86cacf75bd0142f63b91c96ff8.
2020-05-02 23:31:45 +08:00
Aleksandr Nekrasov
03c3c64d23
[scala][akka-http] fix non-default packages for api, model and invoker (#6129)
* [scala][akka-http] fix non-default packages for api, model and invoker

* remove default invoker additionalProperty

* fix invoker package for scala-akka and sttp

* fix invoker package and settings for scala-akka

* fix tests compatible with windows paths

* test output

* test output

* fix base output path for test

* fix output path for test

* fix sttp invoker package
2020-05-02 21:49:34 +08:00
Tatsuro Shibamura
973258912c
[csharp-netcore] Fixed handling of nullable enum values (#6112)
* [csharp-netcore] Fixed handling of nullable enum values

* Update sample code

* Remove unnecessary method calls
2020-05-02 21:39:24 +08:00
https://gitlab.com/selankon
6439990463
Add listFromJson method to fix #4887 (#5355) 2020-05-02 21:27:27 +08:00
Jaumard
7d5695e551
dart-dio improvements (#6047)
* fix runtime deserialisation

* add security support for dart dio

* regenerate dart dio sample

* update dio pubspec.mustache deps

* check response type before parsing

* add default dateTime serializer

* regenerate sample
2020-05-02 21:23:52 +08:00
Åsmund Grammeltvedt
c08e80f49b
Propagate deprecated property through $ref's (#6093)
* Propagate deprecated property through $ref's

As $ref is supposed to completely replace the definition of a property,
make sure we also include the 'deprecated' property when generating the
type of a $ref property.

This makes a property $ref'ing a deprecated schema also become deprecated.

* Clarify why we're messing around with $ref
2020-05-01 22:01:01 +08:00
William Cheng
6484c03518
Test scala akka petstore client in CI (#6118)
* test scala akka in ci

* fix compilation error

* fix scala akka test

* add tests
2020-05-01 16:47:38 +08:00
adg-mh
c38b52919f
[dart-dio][client] Handle x-www-form-urlencoded form data (#5597) 2020-05-01 11:02:45 +08:00
William Cheng
b23c52f2ca
[Go][experimental] provide code samples in the API doc (#6115)
* provide code samples in api doc

* update petstore samples
2020-05-01 10:50:01 +08:00
Artem
0032e04530
[php-symfony] Fix return type in model setters. (#6085)
* Fix return type in model setters.
Previously return type was same, as method arguments. It`s wrong, and cause errors like
"Return value of Foo::setSuccess() must be of the type bool, object returned"
We cant use self and current {{classname}} as return type, because that can break class inheritance. So, better remove type hint on setters, until PHP-devs dont make realization for return static

* Add return self type hint for setters

* Revert "Add return self type hint for setters"

This reverts commit 07dd9715
2020-04-30 22:03:05 +03:00
William Cheng
3bbaedd9bc
Better "Any Type" support (#6091)
* better anytype support

* add tests for any type

* fix test with any_value

* fix tests

* fix case additionalProperties: {}

* test with CI

* remove check in map schema

* Revert "remove check in map schema"

This reverts commit e016c4155f1bd8753e894d87bad8e70eee29f3d5.

* fix tests, comment out map schema fix

* fix tests

* fix tests with correct codegen model

* fix tests

* fix tests for map of any type

* fix array of any type

* fix array of any type

* update samples, remove log

* add typemapping to go, python
2020-04-30 21:23:55 +08:00
Jim Schubert
cc623ba429
[cli][build] Relax the git id plugin (#6094)
* [cli][build] Relax the git id plugin

* Guard against null on missing build properties
2020-04-30 08:49:07 -04:00
Artem
3e2c933dec
[php-symfony] Fix problem with clients, that put charset in content type header. (#6078)
* Fix problem with clients, that put charset in content type header.

With this fix header "Content-Type: application/json; charset=utf-8" working same as "Content-Type: application/json" for parse input data

* Fix code style, add $consumes length check.

* Add isContentTypeAllowed static method and tests

* Fix old tests

Right now serializer doesn't support anything beside json and xml.
Call tests with application/json instead of form data.

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2020-04-30 12:22:44 +03:00
Aleksandr Nekrasov
8e4452e383
[scala-akka-http] fixed getOffsetDateTimeHeader and removed broken test due invalid v2 spec (#6109) 2020-04-30 10:53:14 +08:00
William Cheng
001d9cb36d
better docstring for jersey2 client (#6104) 2020-04-29 23:43:21 +08:00
Geoff Brown
bc097cfdde
[C#] Fixed valuetype parameters and discriminator deserialization (#5680)
* Fixed valuetype parameters and discriminator deserialization

- Made non-required valuetypes nullable, and flagged required valuetypes as "x-csharp-value-type"
- Made sure to camelCase discriminator property names in Subtype converter

* Ran pet store sample script

* Ensure that readWriteVars and readOnlyVars are also marked as isEnum and isPrimitiveType where appropriate

* Updated petstore sample with enum fix

* Fields that are required should emit default values (otherwise the consuming API might throw a fit

* Added missing sample updated

* Re-ran petstore example script to grab all changes

* Rebased and re-ran example update script

* update csharp samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-29 21:36:27 +08:00
Jim Schubert
a8cc42d170
[validation] Warn on duplicate tags (#6061)
The specification requires that tags are unique. This isn't caught by
swagger-parser, so we will issue a warning if duplicate tag names are
found.
2020-04-29 11:48:05 +08:00
iliaskarim
e01c1a9b72
Readonly properties for Swift 5 (#6048)
* Generate readonly properties in Swift5 with additional readonlyProperties parameter

* add sample
2020-04-29 11:17:00 +08:00
Dennis Ameling
7424582210
[TypeScript-Angular] Add AuthService example to README.md (#6087)
* Add AuthService example to TypeScript Angular README.md

* Update generated Angular libs
2020-04-28 17:13:41 +02:00
Justin Black
a2b613c1b3
Fixes md docs (#6079)
* Fixes md docs

* Separates out boolean enum options into legacyDiscriminatorBehaviorOpts

* Updates docs, adds true and false descriptions
2020-04-28 22:30:56 +08:00
n0idea
6bb4bd8ebe
fixed typescript-axios pattern data integrity by removing escapeText() call (#5974) 2020-04-28 16:22:21 +02:00
Harald Fernengel
500fb472b0
[typescript-fetch] Allow multiline documentation (#6088)
Add a lambda that formats the documentation correctly even if it
contains newlines. The generated docs with typedoc looks a lot better
and also renders Markdown correctly.

Also remove the "no description" fallback for APIs because we don't have
it anywhere else, other generators don't generate a default fallback and
I'd rather have no documentation than a "no description" string.
2020-04-28 16:20:26 +02:00
Jim Schubert
f12fb86a1a
[feat] Allow configuration of yaml minimize quotes (#5933)
There are cases where minimizing quotes results in invalid YAML. For
example, an input YAML with string "1234_1234" will be converted to YAML
value 1234_1234 which is an int in YAML 1.1
(https://yaml.org/type/int.html)

THe only option in these cases is to either:

* Revert the option completely to always quote values
* Provide a user-customization to disable quotes minimization

This applies the latter with the assumption that this is an edge case
and users who are unaffected will default to the "prettier" version.

An alternative would be to write a custom serializer for strings, and if
they are in the format of of any of the valid formats defined in YAML:

[-+]?0b[0-1_]+ # (base 2)
|[-+]?0[0-7_]+ # (base 8)
|[-+]?(0|[1-9][0-9_]*) # (base 10)
|[-+]?0x[0-9a-fA-F_]+ # (base 16)
|[-+]?[1-9][0-9_]*(:[0-5]?[0-9])+ # (base 60)

Then wrap the result in quotes. That approach was not taken because of
the potential for significant performance impact on very large specs,
which our users are often tasked with transforming.
2020-04-28 22:20:15 +08:00
Harald Fernengel
6f9d8259b0
[typescript-fetch] Make FormData optional (#6077)
Check "typeof FormData" first. This allows the code to also work in
nodejs with isomorphic-fetch.
2020-04-28 15:21:53 +02:00
William Cheng
46216cd796 Merge remote-tracking branch 'origin/master' into 5.0.x 2020-04-28 20:35:28 +08:00
Harald Fernengel
354f195ec0
[typescript-fetch] Support deepObject query params (#6075)
deepObject query parameters need to be specially marshalled.
Unfortunately, they're quite tricky to distinguish in mustache because
there's no boolean property for deepObject, so add a vendorExtension
property to ease the mustache template.
2020-04-28 10:37:31 +02:00