* [CLI] Initial implementation for batch generation
Allows for generating multiple outputs via config. Just specify multiple
config files on command line.
Intent for this is to reduce CI times to generate outputs as well as to
reduce time for users to run ensure-up-to-date to meet PR standards.
Example command:
openapi-generator batch --includes-base-dir `pwd` --fail-fast -- bin/ci/*
---
As part of this implementation, the batch command support a customized
JSON key, `!include`. If this key's value refers to an existing file,
that file's contents are "unwrapped" into the config during
deserialization. This allows us to easily point to the same configs used
by our sample scripts without modifying the CLI generate task's switches
or assumptions.
* Allow for path-relative outputs
* Add batch JSON objects
* Include INFO log about threads used and includes/root
* Ensure GlobalSettings.reset()
* Improved thread-safety of ModelUtils
* Clean up samples directory before fixing tests
- removed from samples/client/petstore/dart2 :
- purge_test.sh (doesn't seem to be used and not helpful)
- openapi folder (is to be re-generated with more meaningful name)
- updated dart2-petstore.sh to generate client library with new name
- used updated shell script to re-generate client library
- updated CI/.drone.yml to use the new client library for tests
* Update petstore tests to use faked http client
- skipped all of the tests that hit a live endpoint
- made a fake http client that can be set to check for expected values
and/or return a provided response
- added some files with test data recorded from live api calls
- updated the README to reflect changes to tests
* Update .drone.yml so CI will run the tests
* dart2: Use the correct classname in test generation
At present test generation has a stray hard-coded reference to the pet
store Pet() class, which should reflect the actual classname under test.
* dart2: Call toDouble() in generated code for double types
At present the generated code does not correctly handle transitioning
to double when dealing with non-integer types in JSON deserialization.
This ends up with dart raising an unhandled type mismatch exception:
Unhandled exception: type 'int' is not a subtype of type 'double' where
...
Using the .toDouble() conversion when a double type is expected fixes
this up by making the typing explicit.
* dart2: Drop use of deprecated 'new' keyword in generated code
The use of the 'new' keyword in dart2 is deprecated and should be
avoided, as per the official guidance of the dart2 authors:
https://dart.dev/guides/language/effective-dart/usage#dont-use-new
* dart2: Regenerate samples for mustache template changes
* [dart] Fix authentication so all forms of Swagger 2.0 authentication work
* Run changes on petstore examples
* Amend dart2 generated README to cover basic authentication
* Amend dart2 generated README to cover authentication methods
* [dart] Fix authentication so all forms of Swagger 2.0 authentication work
* Run changes on petstore examples
* fix: set fields to null if json value is null.
* rebuild dart2 petstore
* rebuild dart petstore
* rebuild petstore
* [DART]fix: set fields to null if json value is null.
* Add an option for Dart2
* add dart2 samples, update travis
* fix dart installation
* Upper constraints on the SDK version
* Update dependencies
* supportDart2 option can now be passed through --additional-properties
* Update petstore tests
* Update dart2-petstore.sh
* Running tests on Dart VM
* Fixed JSON deserialization bugs
* Fixed missing initialization of postBody
* Run bin/dart2-petstore.sh to regenerate libraries
* Update pom.xml
* Added SDK version constraints in pubspec.mustache
* Run bin/dart2-petstore.sh to regenerate libraries
* move dart2 test to the end