* [Dart] Fix enum generation
* Update generated Order file
* Re-add constructor
* Generate dart2 files
* Dart - nicer enum formatting
* Dart - generate enum name as className+enumName
* Dart - dont initialize vars to null by default
Fixes#3633
* Dart - Generate inlined enums and deserialize them
* Merge branch 'master' of github.com:agilob/openapi-generator into 6727
* Dart - Fix using default value
* Fix typo
* Regenerate add dart files
* dart Revert override for dart dio and jaguar
* Fix dart model tests
* Fix dart1 generated template
* Use {{{datatypeWithEnum}}}
* Dart - throw when enum not known
* Fix generating enum with datatype from list
* [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
* move tests to drone.io
* ls dir
* debug
* use bash
* use jdk 11 image
* move tests to drone.io
* use maven wrapper
* comment out scripts in circleci
* update dart samples
* remove commented tests
* update dart samples
* Move dart null checks inside mustache type checks
- removed surrounding null check
- added a conditional expression to each case except the redundant one
* Run shell scripts so CIs can verify the change
* 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
* do not add non-nullable fields to model json
This fix would avoid adding and sending fields that are not isNullable in the request.
* updated sample for issue #2535
* Use isNotEmpty instead of length in dart2 validity checks
In dart2 the preferred method of checking whether an object is empty or
not is to use the .isNotEmpty property. An aspect that is now warned
about by the linter.
While not an issue in this particular case - testing length can also
have negative performance implications for Iterable collections, which
are not required to know or provide their length deterministically.
* Prefer equals for default values in dart2
The dart2 linter complains about m({a: 1}) style assignments, preferring
m({a = 1}) instead. Update the api_client generation to follow this.
* Regenerate dart2 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