* always add trailing commas in arrays and break each line
* make variables final
* improve API formatting (mainly leading spaces)
* remove empty lines and whitespaces
* fix formatting of datatype and description and docs
* consistently use single quotation marks (dart already does this)
* correctly generate enums from `mostInnerItems`
* use `datatypeWithEnum` which should always be he correct type
* dart generators prefix inner enums with the classname of the containing class, ensure datatypeWithEnum always matches
* only use `FormData.fromMap()` for multipart content, `FormData` does not work with `x-www-form-urlencoded`
* use a basic map for `x-www-form-urlencoded` content
* fix formatting
* [dart] Always use the correct enum data type
* use raw strings for enum string values
* [dart-dio] Use raw strings for built_value enums
`@BuiltValueEnumConst` does some wierd string handling in the generated code `r'\$'` becomes `'$'`. This is different compared to the wireName in `@BuiltValueField`
* [dart] Properly escape param/var names that clash with Dart types
* [dart] Add tests for var/enumVar names
* note: public and private are no keywords in Dart
* some tests are still wrong, some are commented out
* Fix typo
* [dart] Improve variable name escaping
* add more tests
* [dart] Fix operationId naming
* [dart] Fix upper case var name with leading underscore
* [dart] Correctly support model prefix/suffix
* [dart] Support spaces in property names
* Call super for empty operationId
* [dart] Fix and improve enumVar naming/generation
* use same handling for all 3 generators
* allow `updateEnumVarsWithExtensions` to have access to the data type
* improve `x-enum-values` handling and add supprt for other enum vendor extensions
* remove duplicate and outdated tests from `DartDioModelTest`
* add more tests to `DartModelTest`
* no longer force lowercase enums for plain dart generator (breaking)
* this change also removes the trailing underscore from plain dart generator (breaking)
* [dart-dio] Fix wrong escaped serializer names
* [dart-dio] Prevent enum name collisions in inlined enums
Prefix the private built_value instances with the enum class name. Prevents clashes when multiple inline enums contain the same value - for example `EnumTest`. No breaking changes here as all the changed fields/references are private and automatically re-generated with built_value.
* [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
* Fixes issue 8014, _check_type flag not being honored.
Updated model_utils.mustache to pass the check_type flag into attempt_convert_item(). Failure to do so
results in type validation errors occurring when the user has specifically requested that they be disabled.
* regenerated samples
Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
* Remove redundant encoding definitions
UTF-8 is already the default encoding in Python 3.
* Remove Python3.4 related requirements
* Remove dead Python version 3.5
* Add Python 3.9 to CI and test configs
* Update petstore example
* encode object in json and add content-type:application/json for multipart/form-data
fix issue https://github.com/OpenAPITools/openapi-generator/issues/8068
* update samples by ./bin/generate-samples.sh
* non-ascii chars supported in encoding object to json, and add "content-type:application/json; charset=utf-8"
* update samples again, by ./bin/generate-samples.sh
* update comment(docstring) in parameters_to_multipart according to the discussion in PR review.
* fix default value in parameters_to_multipart function as described in PR review comment.
* update samples again, by ./bin/generate-samples.sh
* [dart] Cleanup and regnerate old/wrong tests and docs
* docs path seems to be doc now in all dart generators
* generated tests are very old and use wrong classes
* [dart-dio] Improve formatting
* [dart][dart-dio] Restructure tests to same layout
* remove duplicate/old openapi sample for which there is no generation config
* generate to `petstore_client_lib` for both generators
* run generated tests as integration tests for dart2 even if empty - this makes it easier to find compile errors
* [dart] Improve gitignore handling for Dart generators
* globally ignore all dart related files that should not be commited
* remove old ignores that are no longer valid
* [dart][dart-dio] Add OAS3 generation and integration tests
Dart2 doesn't compile, needs fixes.
* [dart] Do not attempt to deserialize binary content from JSON fields
Not sure if that case is ever relevant but for now there doesn't seem to be a better option.
* [dart] Fix integration tests for OAS3 petstore
Some POST operations now return 200 with content.
* [dart] Generate Petstore Fake API but don't add to integration tests yet
Explicitly not adding the new integration tests to the master POM. They do not work but having them allows for quickly iterating on open issues without breaking existing basic OAS2/OAS3 petstore examples. Instead they should be run manually until everything is fixed.
* Bump Gradle in Java projects from 6.0.1 to 6.7.1
Regular maintenance, 6.0.1 was released November 18th, 2019 and the latest release (November 16th, 2020) is 6.7.1. This updates all the wrapper templatesto the latest version.
* Updated generated Java samples
Generated via `./bin/generate-samples.sh bin/configs/java-*`
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
When generation examples of objects with additional properties, we use
the map syntax inside a model instantiation, which is incorrect. This
fixes it by checking for model at the right place.
* Add basic types imports to generated examples
This adds an extension to include basic types imports to generated Java
examples.
* Make some fixes to example generation
* Generate OffsetDatetime correctly
* Create a useful sample for enums, regenerate samples
* Fix BigDecimal as well
* Allows install typescript client via npm from Git
'prepublishOnly' is run before the package is published. 'prepack' is run before the package is published and after installation local installation eg. via Git.
* Update examples for Typescript
* [ruby] fix oneOf handling
* use previous ruby configs due to issue #4690
* check for oneOf model in base_object
* validate the attributes in partial_oneof_module
* python->python-legacy, python-experimental->python
* test with openjdk8
* test with openjdk11
* comment out rm
* move kotlin tests to circleci
* move kotlin tests
* move tests to circleci
* fix circleci
* rearrange test
* move tests
* use wrapper
Co-authored-by: Justin Black <justin.a.black@gmail.com>
* Fix a few issues with go examples generation
This fixes a bunch of issues seen when generating go examples, namely
- Numbers aren't casted to the right type
- The time import is missing
- Enums are treated as regular models
* Rebuild more samples
* Use examples properly
* Handle multiple instances in the same doc
* Fix wrong array closure
* Handle model arrays
* Fix file and enum namespace
* Regenerate samples
* Handle maps of complex types
* Handle oneOf
* Fix padding
* Fix enum doc
* Removes links to basic types in arrays
* Remove links to basic types in maps
* Fix enum links
* Minor indent fix
* Handle review comments
* [python] add socket_options to configuration for the rest client
* (python-experimental) add socket_options to configuration for the rest client
This mirrors work done on the python generator
* (python-experimental) add test to cover socket_options is passed on from configuration
Co-authored-by: steve brazier <steve.brazier@trioptima.com>
* test file return
* fix stream response
* use options
* use local var
* fix nil tempfile
* fix tempfile
* fix tempfile
* use stream
* check content
* open temp file
* test ruby file download
* fix stream data
* test faraday
* catch connection error
* catch Faraday::ConnectionFailed
* catch all error
* use sream
* refactor
* fi download file in faraday
* local fix
* fi streaming download
* undo changess to spec, test
* undo changes to spec
* add option to return None instead of raising exception when accessing unset attribute
* update python samples
* reimplement getattr using getitem or get depending on attrNoneIfUnset
* move getattr and setattr to respective templates
* update docstrings, def get/setattr methods to have docstrings in them, use __dict__ to avoid recursion issues
* revert required_properties change
* add manual tests for .get method
* Updates key java files
* Adds all lingering isArray fixes
* Adds two files
* Reverts two cs files
* Fixes lingering isListContainer + isArrayModel references
* Some ensure up to date updates