* Default value for the non required fields to null
When a field is not required, the avro schema has no default value.
Has described in an [avro issues](https://issues.apache.org/jira/browse/AVRO-1803), the property default: null must be set.
If we don't do this in the avro file, when we generate java code from generated avro schema, the builder fail if the data isn't set in the avro data class.
* Update generated avro sample
* 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>