* Removes future from python-exp v3 sample
* Removes future from python-exp v2 sample
* Deletes future from remaining python-exp files
* Removes six from python-exp templates
* Removes six from python-exp samples
* Removes mock from python-exp
* Python-exp switched to py3
* Removes python 2.7 for python-exp ci testing
* Requires python>=3.3 for python-exp
* Reverts unnecessary changes to two templates
* Mustache template should use invokerPackage tag to generate import
* add JsonSubTypes annotation to handle scenario when OAS name has special characters
* add JsonSubTypes annotation to handle scenario when OAS name has special characters. Add unit test
* run sample scripts
* fix unit test
* run sample scripts
* add minimal openapi document to show issue with special characters and discriminators
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add unit tests for unmarshaling of discriminators with special characters
* Add unit tests for unmarshaling of discriminators with special characters
* use JsonTypeName
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* fix: make accept header of async apis consistent with sync version
* make sync and async version use same logic
* generate samples for csharp-netcore using generate-samples.sh
* fix: make accept header of async apis consistent with sync version
* change tabs to spaces to match existing code
* 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
* 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
* 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