* 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
* move postProcessModel to the end
* add isAdditionalPropertiesTrue
* remove supportsAdditionalPropertiesWithComposedSchema from go exp
* remove x-additional-properties
* update comment
This reverts commit 354f195ec09293cfd731b72e67c3cc977b8c0894.
It became superfluous due to some other changes in runtime and changing
of the queryParameters in d9a6f4d
* Typescript:
* Added default values for DateTimeSchema, DateSchema and BooleanSchema.
* Added simple tests for default value parsing
* Fixed date tests for default value parsing
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.
* 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>
* 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
* 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>
* 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
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
* 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>
* 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>
* 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>
* 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