* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"
This reverts commit 56e2b1fb
* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"
This reverts commit 335c304d
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* [Java] [Native] Add response body to exception message
* [Java] [Native] Use default base URI if baseUri param is null
* [Java] [Native] Use default base URI if baseUri param is null
* Don't include read-only properties in Python examples.
When using a schema with read-only fields as API inputs, Python
generates examples for those: this excludes them.
* Fix tests
* fix by mapping outside of class
* tests
* regeneration and tests
* server
* INDENT
* a
* enable mapping
* Revert "server"
This reverts commit 6fc9712fb550d258d0332df243ea5080565c6770.
* Samples regenerated
Co-authored-by: Justin Black <justin.a.black@gmail.com>
* [dart] Improve types & imports
* don't use importMapping as it is intended for something different that is not possible in dart
* introduce imports map for dart specific features
* always import `dart:core`
* get rid of additionalReservedWords
* fix `--type-mappings` not working
* use required type mappings in samples
* no longer define additional reserved words as it is impossible to list all anyways, they can now be configured via type-mapping parameter
* simplify dio imports
* Don't use guava for map instantiation
* Update docs
* Change signature of deserialize() to be a Future.
* Grammar tlc for a couple of sentences.
* Make serialize() use a Future also.
* Add useCompute as a parameter to ApiClient, adjust to use compute when serializing/deserializing.
* Updated Pet Store client code.
* Ordered imports.
* Remove Flutter-specific implementation.
* Rename global functions to serialize/deserialize JSON.
* Fix return type for apiClientSerialize.
* Updated pet store client code.
* Remove remark for _deserialize.
* Make _decodeBodyBytes a Future function.
* Updated pet store client code.
* Use await when calling serialize().
* Fix a grammatical error.
* Adjust doc.
* Centralize deserialization code in one function.
* Updated pet store client code.
* Add await to serialize() in few more tests.
* Make output look better for linting and humans.
* Updated pet store code.
* Add an empty line.
* Updated pet store code.
* Call the right serializer.
* Reuse same variable.
* Updated pet store code.
* Fix a logical error when deserializing.
* Calculate growable once.
* Ignore reassignment.
* Adjust a test.
* Regenerate petstore code.
* Revert back previous test.
* Use serialize() for testing.
* Revert using serialize() for testing.
* Add removal deprecation for serialize/deserialize.
* Updated petstore code.
* Updated deprecation note.
* Adjust tests to wait for futures.
* [dart-dio] Update dio
* [dart-dio] Update to dio 4.0.0
* [dart-dio] Fix dependency problems with Dart 2.12 SDK during build
* Revert changes to analyzer
This only fails locally, not sure why. CI only shows a warning.
* Fix compile error after http_mock update
* [dart-dio] Remove old Dart 1.x templates
* [dart-dio] Initial version of a next-gen Dart Dio generator
* Fix a couple readme links and examples
* Fix import in testcase
* Add integration tests to master POM
* Run initial dart format and improve some base formatting
* Generate docs
* Use integer matchers in test for content-length
* Separate more built_value specific files
* Fix mustache partial path
* Update pubspec template
* Fix tests after mock lib updates
* Generate with new built_value pre-release
This solves the problem of not being able to serialize null.
* Update built_value dependency
* Regenerate after merge
* Regenerate tests
* Fix missing byte response cast
* Update dio to 4.0.0-prev1
* Run format
* Ignore unused imports in inheritance classes
* Update mock test library
* Update docs
* Make a couple variables final
* Update and freeze dio dependency
* Update generator doc
* Add a new option to post processes all dart output at once
This is much faster than individual files. The committed samples should be formatted since Dart is very opinionated and it makes diffs in PRs much easier to read.
Due to this, we also need to format in CI, otherwise there is a git diff.
* Test some CI stuff
* [dart] Generic docs update and fixes
* none of the dart generators supports XML
* jaguar is no longer maintained
* dart and dart-dio support bearer token
* none of the dart generators supports composition atm.
* [dart-dio] Supports customization of authorizations and userAgent
* Remove deprecation of dart-jaguar for now
* Fix api-client deserialization for json_serializable
* Use raw string for url path
* Use Set/List.of
* Use returnTypeIsPrimitive in template
* Regenerate all templates
* Fix casting map to Iterable of things
* Add json_serializable to maven modules
* Run build_runner before pub run test
* Return future of type for strong linter mode
The `8.x` versions are no longer compatible with the current generated code. An update is also not possible without breaking change and null-safety support.
* Add a space between table title and the line above it to resolve issues when translating markdown to asciidoc
* Regenerate Samples
Co-authored-by: Tyler Ballast <tyler.ballast@reportix.com>
Co-authored-by: tballast <tyler.ballast@gmail.com>
* [dart][dart-dio] Improve parameterToString handling
* add tests
* not sure this is complete but it is better than before and can serve as a baseline with the test cases
* Add a map parameter to FormData test
* Rename method to clarify what it actually does
* Couple more tests
* Make nullable fix on all vars in Go
This applies the Nullable change to all variables on the model, instead
of just the ones in vars.
* Add sample showing the issue
* [dart][dart-dio] Refactor API template
* first construct a `RequestOptions` instance with all parameters etc. inline
* then construct and serialize the body data
* then send the request and await the response
* then deserialize the response
* always use the `specifiedType` for built_value (de)serialization instead of a mix of ways (this does the same as finding the serializer directly)
* use indent of 2 spaces (as per Dart convention)
* prefix all local variables to prevent name clashes with parameters
* Add tests that (de)serialize collections and add API key header
* Add Dart configuration flag to set new generator
* Change templates to add json_serializable generator
* Fix dart tests
* Add custom serialization for standard generator
* this change opens us a way to allow adding more than 2 generators
* Add sample project for json_serializer
* Use basename for json field name
* Update samples with basename as json key
* Update dart generator docs
* Create AbstractDartCodegen class
* Update docs, dart-dio and dart-jaguar dont get json_serializable yet
* Deduplicate method calls
* Dix dart-dio generation
* Revert formatting change in dart mustache
* Fix formatting changes again
* Improve dart serialization documentation
specify default serializer
* Better name for cli option
* Rename default dart generator to 'native'
* Another attempt to reduce whitespace noise
* Fix api-client and api-helper
* Rename default serialization mode to include word serialization
* Remove trailing whitespace in enums