* [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
* Fixes additionalProperties values for models, updates docs, adds tag test of it, fixes frit and gmfruit tests
* Moves this.setDisallowAdditionalPropertiesIfNotPresent higher
* Makes setting additional_properties_model_instances contingent on the presence of addprosp in schema, updates sample spec composed schemas to remove addprops False form two
* Fixes oneOf anyOf allOf instantiation logic
* Removes Address from Cat definition
* Adds required vars for apple and banana, removes required vars from composed schema init sig
* Updates composed schema vars to be set on self and all composed instances
* Removes get_unused_args, get_var_name_to_model_instances, and get_additional_properties_model_instances
* Fixes fruit + deserilization tests, creates ComposedSchemaWithPropsAndNoAddProps
* Fixes FruitReq tests
* Fixes GmFruit tests
* Fixes discard_unknown_keys tests
* Samples updated
* Removes additionalproperties False in Child
* Samples updated
* Improves handling of v2 and v3 specs for isFreeFormObject, v2 sample spec updated with link to bug
* Adds cli option disallowAdditionalPropertiesIfNotPresent to python
* Adds getAdditionalProperties method so the value for addProps will be correct
* Reverts file
* Reverts file
* Updates python doc
* Reverted anytype_3 definition
* Updates test_deserialize_lizard
* Updates test_deserialize_dict_str_dog
* Updates testDog
* Updates testChild
* Adds v2 python_composition sample
* Adds needed files for python testing
* Adds existing tests into the new python sample
* Fixes test_dog
* Removes addProps false form Dog
* Fixes testChild
* Updates how additionalProperties are set
* Fixes empty_map type
* Type generation fixed for v2 and v3 specs
* Refactors getTypeString, updates artifactids in pom.xml files
* Adds new python sample to CI testing I think
* Fixes artifactId collision, regenrates docs
* [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
* Changed virtualan version from 1.0.0 to 2.1.7. Update readme.md and description in springboot generator.
* Updated virtualan link in spring.md.
* update samples
Co-authored-by: networkinss <oliver.glas@inss.ch>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Add switch to disable RestSharp
* Introduce CLI Option for webRequestLibrary
* Fix missing brace
* Remove restsharp references
* HttpClient added
* WebRequest NewRequest functionality added
* WebRequest added to CLIOptions
* Add custom HttpMethod only for Restsharp.
* Add WebRequestPathBuilder.mustache
* HttpClient NewRequest
* Add using Statement to WebRequestPathBuilder.mustache
* Adjusts retry configuration for HttpClient
* Reuse JsonDecoder
* Make reusing the client a separate option
* Save cookies in request
* Implement more methods for HttpClient
* Small fixes
* Fix post content
* Add new sample config
* Update existing samples
* Add new sample
* Add new property supportsRetry
* Use new property to exclude RetryConfiguration
* Exclude Polly on non supporting Retry
* Update sample and documentation
* Create HttpMethod Patch for netstandard 2.0 compatibility
* Fix query parameter generation
* Switch to library settings
* Allow httpclient reuse (experimental)
* Remove webrequest from template as its not used right now
* 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
* [dart-dio] Disable nullable fields by default
This is not in line with the OAS and will prevent future Dart nullabilty features (NNBD) from being useful as all types would be optional.
Users can still opt-in for this.
* [dart-dio] Properties are nullable when not required AND not nullable
* [dart][dart-dio] Support nullable/required fields
* properties in built_value need to be nullable when they are nullable in OAS or when they are not required in OAS
* built_value does not support serializing `null` values by default as it is based on a serialization format based on iterables/lists and not maps
* dart-dio uses the built_value json plugin to convert the built_value format to regular json
* by generating a custom serializer for each class we can add support for serializing `null` values if the property is required AND nullable in OAS
* this is a breaking change as not all properties in the models are nullable by default anymore
* Implement required/nullable for dart
* Changes for set types and enum names after rebase
* Add some comments and fix built_value fields with default being nullable
* More rebase changes and regenerate docs
* [REQ] Added enumClassPrefix option to go-gin-server. Used same approach as #7008 (go-server)
modified: docs/generators/go-gin-server.md
modified: modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java
modified: modules/openapi-generator/src/main/resources/go-gin-server/model.mustache
* Fixed CI error in docs
* [dart][dart-dio] Add support for set types
* copy `uniqueItems` usage from 2.0 fake spec to `3.0`
* add support for sets in parameters, responses and properties
* Regenerate all other samples
* Fix broken tests due to invalid cast
* Update documentation
* Regenerate samples
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [rust-server] Add support for Bearer auth
- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.
* Update docs
* Update readme for bearer tokens
* Add CORS support to python-flask server generator
* Documentation update and CORS support for other generators using the same base class
* Trivial sample changes
* [Core] Inline Model Resolution of Enums
Enums need to be named types, so handle them as part of inline model resolution
* [Rust Server] Handle models starting with a number correctly
* [Rust Server] Additional trace
* [Rust Server] Add support for oneOf/anyOf
* [Rust Server] Update supported features
* [Rust Server] General template tidy up
* [Rust Server] Implement IntoHeaderValue for wrapped data types
* [Rust Server] Convert from string correctly
* [Rust Server] Test for anyOf/oneOf
* Update samples
* Update docs
* feat: add providedIn for Angular 9+
Adding new option, providedIn, for generator typescript-angular
Keep providedInRoot for backward compatibility but mark as deprecated
for Angular 9+
fix: #6432
* doc: providedIn
infos about providedIn
Mark providedInRoot as deprecated
* doc: run generate-samples for typescript
using typescript-angular-v9-provided-in-any.yaml
* refactor: runned ensure-up-to-date locally
* refactor: api.module.mustache rely on providedIn too
* doc: re-generate samples
* first Commit parameterzied Server support
* fixed serverconfig classes
* Defautl constructor f. Config, fixed regex replace
* Polosihed Templates, Added MultiServer support
* Update Readme. Fixed MultiServer. Fixed def. Value
* Passing global Server to mustache. Small fixes
* Updated samples, fixed mustache for multi server
* added prefixes, removed unused imports
* added newly generated samples
* missing vendorExtension in mustache. Update smaple
* update doc
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [dart][dart-dio] Prevent name clashes with existing dart types
Can not use dart import aliases for now as this is not supported by built_value. This means we need to add potentially clashing names/classes to an `additionalReservedWords` exclusion list. Starting with a basic list of some http/io classes.
Correctly use `importMapping` and `defaultIncludes` this time around. Improve reserved word checking.
This now successfully generates `ModelList`, `ModelFile` and `ModelClient` models which previously were not generated at all or were wrong types.
* Address review comment
* Update generator docs
* [dart] Configure and use import mapping
This prevents models from being generated which would clash with exisiting dart types, e.g. List.
* [dart] Fix decimal format not supported
* [dart-dio] Remove redundant modelToIgnore & ignore dart:core import
* modelToIgnore is now handled via importMappings the same way other generators do this
* choose not to import dart:core as this is available by default
* [dart-dio] EnumClass is a reserved word in built_value
* Review changes
* Fix regenerate docs
* Updated Eiffel code generator.
Added missing language reserved words.
Updated mustache templates to use the latest Eiffel rules to avoid obsolte
feature calls and Cat-Calls.
Updated Eiffel configuration files (ecf's)
Updated comments styles.
Updated Travis CI file to use the latest Eiffel compiler.
Updated EIffel sample to use https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml
* Added missing mapping decimal to REAL_64
Added Eiffel Kernel classes to importMapping to avoid generate models for
them.
Fixed issue with Eiffel feature name generation, updated toOperationId(String) method.
Simplified toInstantiationType method implementaetion.
Improved model.mustache to generate Eiffel models.
* Updated Eiffel sample.
* Removed unneeded tabs.
* Added AnyType mapping to ANY
Removed unneeded tab
Updated model name, remane models that starts with _.
* update doc
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [dart-dio] Add basic integration test POM
This basically just fetches dependencies, runs the built_value generator and empty test cases. Even running empty test cases is more than is currently possible and at least finds compile errors.
There are compile errors atm which need to be fixed.
* [dart-dio] Fix missing BuiltSet import in models that use enums
* [dart-dio] Fix compile error when the return type is a Map
* the compile error was `serializerForType(Map<String, int>)` in `StoreApi` which needs to be `serializerForType(Map)`
* use final instead of var in response handling
* [dart-dio] Generate docs after changes
* [dart-dio] Add integration test to CI execution list