* Add config option to enable InversifyJS
* Add pascal case lambda for mustache
* Generate a class for each auth method
* Add service identifiers and service binder helper
* Split Configuration into interface and factory
This way we don't need to import the factory everywhere to do
typechecking.
* Define minimal interface for ServerConfiguration
* Add annotations for inversify when enabled
* Always expose list of server configurations
* Add samples and defalt tests for useInversify
* Simplify sample generation script
* Fix: Add object_params arg description to help
* Fix: Properly enable inversify with bool property
* Build tests in pom instead of prepublish
Otherwise running `npm install`, when the build failed was impossible.
* Update dependencies for inversify tests
* Test basic api service resolution
* Remove Promise and Observable prefix from exports
* Fix, RxJS: Import Observable in object params api
* Add ioc service identifier for object param api
* Add hint about unimpeded development
* Simplify api service binder syntax
* Remove default tests for inversify
* Add wrapper for easy promise based http libraries
This wrapper allows defining and injecting http libraries that do not
need to know anything about observables, especially when useRxJS is not
enabled. I will employ this in the tests for InversifyJS.
Not sure if we should also use this wrapper internally.
* Add named injects for remaining auth parameters
* Directly inject promise services without RxJS
* Add tests for api service binder
* Add convenience method to bind all api services
* Fix: Rename inversify test artifact
* Run bin/utils/copy-to-website.sh
* Stronger typing for http errors with Rust client. (#5609).
* Error structure can be parametrized (but is still hardcoded with `serde_json::Value` in generated code).
* Each API method has is own enum of functionnal errors.
* Fix the missing "Debug" derivation for API error enums.
* Generate models for error deserialization.
* Handle several 2xx success models.
* Expose new API objects, required to use the API (params, success, error structs/enums).
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [python] Support aliasing of API keys
* Support for aliasing and prefix
* Make more realistic usage
* Regenerate
* Document alias in generated code
* Support override of aliased keys
* Use diferent id and name for api keys
* ensure up-to-date
* Simple example without x-auth-id-alias
* regenerate docs
* Regenerate
* Provide separate spec for x-auth-id-alias
* Apply suggestions from code review
* regenerated
* Add multiple auth methods to ApiClient. ApiClient more configurable
* Fixed missing close tag for isMultipart in api.mustache
* Generated samples ./bin/kotlin-client-all.sh
* Generated samples./bin/openapi3/kotlin-client-petstore-all.sh
* Use of better way to add supporting files based on conditions
* Fixed missing check for retrofit generating auth files
* Generated samples
Co-authored-by: Alexander Karkossa <alexander.karkossa@dataport.de>
* Enable per-request access token in Python client.
* Add missing regenerated sample files.
* Rework to the more general case of overriding the auth settings for a request.
* Add unit tests.
* Update api_client.mustache so that request_auth overrides all other auth settings when specified.
* Mustache template should use invokerPackage tag to generate import
* Enable unit tests for ECDSA keys
* fix unit test
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
* [java][jersey2] Add support for discriminator, fix nullable typo and nullable deserialization (#6495)
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* update samples
* add tests to oas3 java jersey2 petstore
* Fix 'method too big' error with generated code
* resolve merge conflicts
* comment out jersey2 ensure uptodate
* fix compiler warnings
* Jersey2 supports additional properties with composed schema (#6523)
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
* Set supportsAdditionalPropertiesWithComposedSchema to true for Java jersey2
* Support additional properties as nested field
* Support additional properties as nested field
* add code comments
* add customer deserializer
* Fix 'method too big' error with generated code
* resolve merge conflicts
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* [Jersey2] Fix code generation of 'registerDiscriminator' method for large models (#6535)
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
* Fix 'method too big' error with generated code
* resolve merge conflicts
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* Add unit test for date time
* Add unit test for date time
* update samples
* comment out tests
* support additional properties in serialize and deserialize
* add discriminator lookup
* remove oneof/anyof logic in apilcient
* add serializer to mammal.java
* add serialize to oneOf model
* add serializer to anyof model
* comment out test cases that are subject to further discussion
* add back files
* update configs, samples
* resolve merge conflicts
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [java][jersey2] Add support for discriminator, fix nullable typo and nullable deserialization (#6495)
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* update samples
* add tests to oas3 java jersey2 petstore
* comment out jersey2 ensure uptodate
* Jersey2 supports additional properties with composed schema (#6523)
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
* Set supportsAdditionalPropertiesWithComposedSchema to true for Java jersey2
* Support additional properties as nested field
* Support additional properties as nested field
* add code comments
* add customer deserializer
* Fix 'method too big' error with generated code
* resolve merge conflicts
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* [Jersey2] Fix code generation of 'registerDiscriminator' method for large models (#6535)
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* support for discriminator in jersey2
* fix typo in pom.xml
* disable unit test because jersey2 deserialization is broken
* disable unit test because jersey2 deserialization is broken
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* Add code comments
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* resolve merge conflicts
* Add unit tests
* fix unit tests
* continue implementation of discriminator lookup
* throw deserialization exception when value is null and schema does not allow null value
* continue implementation of compose schema
* continue implementation of compose schema
* continue implementation of compose schema
* Add more unit tests
* Add unit tests for anyOf
* Add unit tests
* Fix 'method too big' error with generated code
* resolve merge conflicts
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* update samples
* comment out tests
* support additional properties in serialize and deserialize
* add discriminator lookup
* remove oneof/anyof logic in apilcient
* add serializer to mammal.java
* add serialize to oneOf model
* add serializer to anyof model
* comment out test cases that are subject to further discussion
* add back files
* update configs, samples
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
* Ensure CLI-level generator settings are available in additional properties
* Initial conversion to yaml configs
Configs prefix with 1- need to be manually evaluated.
* Add "other" configs not in ensure-up-to-date
* Add other/openapi3 files
* Cleanup all generation scripts
* Clean up: add missed configs and fix some openapi 3 diffs
* Move generate-samples script, error on batch failures
* Temporarily disable elm which requires skip validation of spec
* CI updates (todo: run all generators through appveyor or move to github workflows)
* Add success count to batch generation command output
* [samples] Regenerate
* Remove bin/windows
* Generate swift5 samples in bitrise
* Expand user input glob pattern
* Regenerate samples
* Update PR template
* Support config based generateAliasAsModel
* [samples] Regenerate
* [rust] Generate as alias for all samples configs
* [csharp] Move test staged file changes to in-directory
* Include "live" test files and ignore test cache files from samples.ci
* Remove concept of samples.ci staging
Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.
Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.
* Re-add meta generator scripts
* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines
* [csharp] Regenerate sample
* Set generateAliasAsModel CodegenConfigurator#toContext
This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.
* [rust] Regenerate samples
* Re-enable elm
* [java] Support OffsetDateTime example, fail ensures script on any generation error
* [samples] Regenerate
* Fix jersey2-java8 ignore file
* Fix elm spec validation
* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [C++][Pistache] Catch HttpError when user-provided handler has thrown
This allows for returning valid http code through exception
* [C++][Pistache] Update Petstore sample