14409 Commits

Author SHA1 Message Date
William Cheng
bea6af7f37 fix enum type comparison for string 2020-07-09 11:23:05 +08:00
William Cheng
850c958d83
add splitit as the user (#6887) 2020-07-08 16:45:47 +08:00
William Cheng
ffac26face
replace x-additional-properties with isAdditionalPropertiesTrue (#6886) 2020-07-08 16:45:30 +08:00
jekkel
0be0a06d84
[Java][Client][vert.x] Support per-call authentication and JsonNullable in client request bodies, fix path parameter encoding (#5732)
* Support per-call authentication and JsonNullable in client request bodies

Extensions
----------
Since vertx is an asynchronous/reactive toolkit usage of mutable fields
of `ApiClient` to store authentication prohibits delegation of
authentication from incoming call without recreating the client
everytime (which is prohibitively expensive due to instantiation of objectmapper).
This commit adds a per call authentication override which takes precedence
over the mutable fields so a single client can be safely reused. To ease
usage a simple builder-style auxiliary `AuthInfo` object is provided
providing methods for each specified authentication.

A new configuration option for `ApiClient` has been added: `timeout`. It gets
applied as timeout for the vertx http request.

Fixes
-----
Request bodies have been wrongly serialized using vert.x built-in
objectmapper instead of the embedded instance thus usage of beans with
`JsonNullable` wrapped fields in request bodies led to bad requests.

* update vertx samples

* Client Java Vertx: Add url encode for path parameters.

* update vertx samples
2020-07-08 16:30:31 +08:00
William Cheng
ce177a7fb6
Add isAdditionalPropertiesTrue (#6880)
* move postProcessModel to the end

* add isAdditionalPropertiesTrue

* remove supportsAdditionalPropertiesWithComposedSchema from go exp

* remove x-additional-properties

* update comment
2020-07-08 11:30:16 +08:00
Harald Fernengel
566b2b7647
Revert "[typescript-fetch] Support deepObject query params (#6075)" (#6860)
This reverts commit 354f195ec09293cfd731b72e67c3cc977b8c0894.

It became superfluous due to some other changes in runtime and changing
of the queryParameters in d9a6f4d
2020-07-07 13:44:25 +02:00
Sebastian Appl
b3bc69c8f1
[typescript] Add default values for typescript types (#6871)
* Typescript:
* Added default values for DateTimeSchema, DateSchema and BooleanSchema.
* Added simple tests for default value parsing

* Fixed date tests for default value parsing
2020-07-07 13:41:57 +02:00
William Cheng
3e69d73ec9
Update JS dependencies (#6867)
* update JS dependencies

* test js in circleci

* remove js test in travis

* remove node version
2020-07-07 12:26:35 +08:00
Jim Schubert
c072291c28
Remove jimschubert from C# technical committee (#6865)
I've not used C# since shortly after my initial contributions to the C#
and asp.net generators, and have not followed the .NET Community closely
for a few years now. As I'm focused on other initiatives I am
removing myself from the C# technical committee so that others may
maintain the generator(s) according to the C# community needs.
2020-07-06 13:36:32 +08:00
Yuriy Belenko
f11b0f886e
Add Mock Server client modification feature (#6747) 2020-07-05 16:58:43 -04:00
William Cheng
47b7a0d243
Update documentation with global propperty (#6863)
* update documentation with global propperty

* remove java opts

* remove KotlinNewServerCodegen

* update contributing.md
2020-07-05 18:20:26 +08:00
Jon Schoning
8c5c0597ae
[haskell-http-client] avoid depending on ParseTime,FormatTime (#6861)
* [haskell-http-client] avoid depending on ParseTime,FormatTime

* [haskell-http-client] update haddocks
2020-07-04 19:52:52 -05:00
Jim Schubert
6c1aecb151
Update docker-tag-latest-release.yml
Include openapi-generator-cli, run each tag update "always"
2020-07-04 09:29:25 -04:00
William Cheng
61789475ea update python samples 2020-07-03 18:51:31 +08:00
Matthew Davis
f15acbc700
clarify direction of py client side validation flag (#6850)
* clarify direction of py client side validation flag

* change pet store py cli validation disable example

Co-authored-by: Matthew Davis <Matthew.Davis.2@team.telstra.com>
Co-authored-by: EC2 Default User <ec2-user@ip-172-31-37-8.ec2.internal>
2020-07-03 18:39:53 +08:00
Matthew Davis
c4cb8e46c5
fix erronous cmd arg example for docker in readme (#6846)
Co-authored-by: Matthew Davis <Matthew.Davis.2@team.telstra.com>
2020-07-03 18:28:38 +08:00
Jorge Rodríguez Martín
068ad02bc8
[BUG] [JAVA] Fix multiple files upload (#4803) (#6808)
* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload

* gh-4803: Fix bug java client multiple files upload
2020-07-03 00:23:17 +08:00
Bruno Coelho
f0157b8c0f
[kotlin][client] fix retrofit dependencies (#6836) 2020-07-03 00:03:17 +08:00
William Cheng
aed5be9b9c
[PowerShell] add more fields to be customized (#6835)
* more fields to be customized

* set powershell version

* fix psData
2020-07-02 23:50:50 +08:00
grzegorz-moto
23f57a7290
[Java][WebClient]remove the dead code from java ApiClient.mustache (#6556)
* remove the dead code

Remove the dead code from ApiClient
The code is not used and it contains vulnerability of Log Forgery when it writes unvalidated http header to the log. An attacker could take advantage of this behaviour to forge log entries or inject malicious content into the log.

* update Petstore samples

* whitespace
2020-07-02 18:34:28 +08:00
Ian Lord
eaa3c730fa
[PHP] Better handling of invalid data (array) (#6760)
* Update ObjectSerializer.mustache

If the $data is a wrongly formatted Json or if data is not an array, php gives error:

Invalid argument supplied for foreach() at line 257 (Now line is 262)

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-02 18:33:22 +08:00
tgerth
38ab7383f2
Make ApiClient in retrofit2 be able to use own OkHttpClient (#6699)
* set adapterBuilder.client() only if okBuilder was used in retrofit2

* updated the samples

* added field okHttpClient and updated samples

* bug fixed, added exception if okBuilder is null

* added semicolon

* added space, changed Exception to RuntimeException and changed its message

* updated the samples
2020-07-02 15:37:57 +08:00
William Cheng
c6cb7ebe2a
mark python2 support in flask as deprecated (#6653) 2020-07-02 15:16:53 +08:00
William Cheng
520f87abae update samples 2020-07-02 12:00:27 +08:00
Hippolyte HENRY
63c1b1350d
[Java][jersey2] Add a getter for the User-Agent header value (#6831)
* [Java][jersey2] Add a getter for the User-Agent header value

* generate samples
2020-07-02 11:45:30 +08:00
Alessio Zurru
1fe7d703d7
Provides a default nil value for optional init parameters (#6827)
The following change can be helpful to create Swift model objects more simply, in particular when they have many parameters.
In addition, projects switching from swagger-codegen to OpenAPI will not encounter compilation errors and will not need to refactor old code
2020-07-02 00:13:08 +08:00
William Cheng
fa97333a5c
[Java] Deprecate feignVersion option (#6824)
* deprecate feign option

* update doc

* udpate samples
2020-07-02 00:12:32 +08:00
Marcel Ramos
8e95298653
[R] Enum R6Class Support, closes #3367 (#5728)
* wip: fix documentation tags

* update model.mustache

* update template for documentation

* update mustache templates

* update mustache templates

* run ./bin/r-petstore and update R pkg docs

* use loadNamespace instead of package:pkgName string

* update R package code

* wip: enum

* update enum function

* use httr::content to unwrap response

* update enum table and functions

* include simplifyVector and auto_unbox arguments

* remove mapping and return strings

* use triple stash values and update enum class methods

* remove extra comma

* minor: formatting

* update and run ./bin/r-petstore.sh

* move helper for template

- export tag does not coincide with original model function
- move helper down so it does

* update tests based on generator

* Revert "update tests based on generator"

This reverts commit b6314c8927a8411561577c0dfd100018947de42e.

* Update tests with engine

- preserve test_petstore.R

* restore apiResponse

* restore simplifyVector to TRUE value

* update api.mustache templates

* fix and add tests to package

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-01 15:48:09 +08:00
Benoît Courtine
fa72c63b62
[Rust][Client] Unify sync/async client structure (#6753)
* Unify sync/async client structure (configuration as first param instead of a struct).

* Fix: Hyper client requires the client.rs file.

Co-authored-by: Henning Holm <git@henningholm.de>

* Add API method comments (description and/or notes when available).

Co-authored-by: Henning Holm <git@henningholm.de>
2020-07-01 15:24:20 +08:00
Yuriy Belenko
6224f5e397
[php-ze-ph] Set required PHP version to ^7.2 (#6763)
* Bump required PHP version to ^7.2

* Update required PHP version in readme

* Change samples input spec to OAS 3.0

* Refresh samples
2020-07-01 15:11:34 +08:00
Jochen Schalanda
d9957ad0a9
[Java][client][native][Gradle] Add missing jackson-databind-nullable (#6802)
* Add missing jackson-databind-nullable to java-native Gradle build

Closes #6801

* Regenerate java-native samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-01 15:08:28 +08:00
Kasper Kondzielski
323cd38b5c
Improve sttpOpenApiClient generator (#6684)
Co-authored-by: eugeniyk <keatrance@gmail.com>
2020-06-30 21:14:34 -04:00
Jim Schubert
dae329d8e1
Update docker-tag-latest-release.yml
Chance cron schedule to every other day
2020-06-30 19:01:40 -04:00
Chris Tankersley
d433c2d42f
[php-laravel] Upgrade php-laravel to 7.x (#6346)
* Update laravel from 5.6 to 7.0

* Updated petstore example, removed missing files

* Updated PHP version to match composer.json

* Add samples generation config with OAS3 input spec

* Fixed gitignore compile errors, updated to newest petstore example

* Add composer.lock to .gitignore

* Fix generator gitignore location

* Add integration tests

* Refresh samples

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2020-06-30 12:22:32 +03:00
William Cheng
978b455f11
Add links to tech blog, youtube video (#6817)
Add links to tech blog, youtube video
2020-06-30 17:15:57 +08:00
William Cheng
f05aa8e80d
Prepare 5.0.0-SNAPSHOT (#6812)
* Revert "Prepare 5.0.0-beta release (#6803)"

This reverts commit a77fd443ad9c5fcd85186b76a15abd1b02887576.

* prepare 5.0.0 snapshot

* update non-java-invalid-spec.xml
2020-06-30 01:19:46 +08:00
William Cheng
cf0920110c add 5.0.0-beta2 release date 2020-06-30 01:09:23 +08:00
William Cheng
e7672f32bf update readme with 5.0.0-beta 2020-06-30 00:39:54 +08:00
William Cheng
a77fd443ad
Prepare 5.0.0-beta release (#6803)
* prepare 5.0.0-beta release

* fix java-client pom
v5.0.0-beta
2020-06-29 23:06:47 +08:00
Bernd Hacker
156c4bfb70
[typescript-rxjs] add support for raw response and progressSubscriber (#5465)
* feat(typescript-rxjs): add support for returning statusCode and progressSubscriber via function overloading

* feat(typescript-rxjs): use ?? instead of || to support relative basePath of "", upgrade to typescript 3.7

* feat(typescript-rxjs): regenerate samples

* refactor(typescript-rxjs): change explicit undefined checks to shorthand return

* feat(typescript-rxjs): add missing progressSubscriber key when building RequestArgs

* feat(typescript-rxjs): regenerate samples

* style(typescript-rxjs): remove whitespace, add colons

* feat(typescript-rxjs): regenerate samples

* refactor(typescript-rxjs): destructure configuration in BaseApi

* fix(typescript-rxjs): returning empty string for apiKey and accessToken

* feat(typescript-rxjs): replace withStatusCode option with response = raw option, reuse rxjs AjaxRequest and AjaxResponse types

* feat(typescript-rxjs): regenerate samples

* Prints out the parameter name in throwIfNullOrUndefined

* Fixed misspelling

* feat(typescript-rxjs): add withProgressSubscriber additional-properties flag to cli, remove unused withInterfaces flag

* refactor(typescript-rxjs): use backticks instead of String constructor in encodeURI

* feat(typescript-rxjs): replace Object.keys() with Object.entries() in queryString helper

* style(typescript-rxjs): improve indentation of new withProgressSubscriber checks within templates

* feat(typescript-rxjs): use entire es2017 lib in tsconfig.json for building with target es6

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): adjust sample generation, regenerate samples

* docs(typescript-rxjs): regenerate docs

Co-authored-by: Justin Van Dort <justinvandort@gmail.com>
2020-06-29 16:01:15 +02:00
Mathias Lykkegaard Lorenzen
d9a6f4d726
typescript-fetch: Fix compile error (#6538)
* Fix annoying compile error

Fixes an annoying compile error that happens when a .NET Core 3.1 Swashbuckle generated `swagger.json` has a Controller with a request class.

> Type 'ApproveBrandRequest[]' is not assignable to type 'string | number | boolean | HTTPQuery | (string | number | boolean)[]'.
  Type 'ApproveBrandRequest[]' is not assignable to type '(string | number | boolean)[]'.
    Type 'ApproveBrandRequest' is not assignable to type 'string | number | boolean'.
      Type 'ApproveBrandRequest' is not assignable to type 'true'.

* generated template files.

* update samples

Co-authored-by: Mathias Lorenzen <mathias.lorenzen@broelstaerk.dk>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-29 15:08:28 +02:00
ngp-star
6a61910df1
fix for operation defination containing ref schema (#6676) 2020-06-29 16:13:28 +08:00
William Cheng
e3cdb4c328
[Java][jersey2] Add nullable body support (#6784)
* add nullable body support

* update serializeToString with nullable body

* add nullable support to body parameter

* minor code format change

* Revert "minor code format change"

This reverts commit 3af1838a9bf421e633165dbd8e62bb7740b539ef.

* code format fix
2020-06-29 16:08:42 +08:00
Jim Schubert
d949c8181d
Run Docker Tag latest-release every 2 days
Runs every minute on the 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29 and 31th of every month
2020-06-28 22:33:36 -04:00
Jim Schubert
16197edac4
Fix syntax error in docker-tag-latest-release.yml
There was a missing apostrophe in echo command.
2020-06-28 22:19:59 -04:00
Jim Schubert
7aa7c738a9
Temp reduce in docker tagging workflow schedule
Allow faster trigger of docker latest-release tagged image to evaluate correctness, will then bump back up to every 48 hours.
2020-06-28 21:55:47 -04:00
Jim Schubert
108275affe
[docker] Tag latest-release for stable latest tagging (#6573) 2020-06-28 21:50:42 -04:00
Ben Wells
7ea6c35508
Remove bvwells from Go technical committee (#6791) 2020-06-28 16:36:36 -04:00
Sebastien Rosset
6dfd029c63
[java][jersey2] Add support for (expires) and (created) fields in HTTP signature (#6632)
* Add support for (expires) and (created) fields in HTTP signature

* Add support for (expires) and (created) fields in HTTP signature
2020-06-28 23:14:22 +08:00
William Cheng
6041acd225
[PowerShell] fix hardcode method name in test files (#6794)
* fix hardcode test

* update FILES
2020-06-28 10:49:16 +08:00