* Adds endpoint creation in path modules
* REgens samples
* Adds BaseApi so there can be 2 class interfaces for http method and operationid
* Adds paths init
* Adds enum containing paths
* Uses path enum for endpoint paths
* Adds camel case to undersce converstion in to ineum var name
* Fixes path enum generation
* Moves path api combination module into apis
* Moves tag apis into a tags module
* Adds path_to_api
* Changes module path to paths
* Fixes tag api imports
* Fixes self type in endpoint methods
* Adds test changes
* Adds tag enum
* Adds tag_to_api
* Adds missing tag
* Fixes self types in endpoint methods
* Refactors java endpoint generation to be simpler
* Further refactors generateEndpoints
* Generates one test file per endpoint
* Updates v3 samples
* Fixes endpoint tests, all tests passing now
* Samples regenerated
* Fixes petstore tests
* Generates separate endpoint test methods on each endpoint
* Fixes api docs and enum string values in those docs
* Regenerates samples
* Removes pass to fix tests
* support import mapping
* Remove unused imports
* Remove unused variable
* Not to clear importMapping
* Re-generate samples
* Use same model import path everywhere
* Move import mapping logic from toModelImport method
Co-authored-by: Bodo Graumann <mail@bodograumann.de>
* Tags renamed
* Spec updated to add response bodies
* Adds correct tag to response body routes
* Adds response body autogen tests
* Adds pos test cases, removes dead code
* Adds and uses api_test_partial
* Samples regenerated
* [Typescript] Support text/plain by ObjectSerializer.parse
* generate-samples
* update samples
* clean up spaces
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Adds post request body routes and test data to spec
* Sample regenerated
* Adds tags and post endpoints
* Uses refs to tests examples in requestBodies
* Stops passing in test_examples into generate_operation
* Adds testCases to MediaType
* Adds refs to test cases in media type
* Adds post request body examples
* Fixes enum 1 ingestion of 1.0
* Only generates test examples when they exist
* Regenerates samples
* Spec regenerated with only allOf on
Sample regnerated
Fixes a bug where AnyType composed schemas omitted validations, Fixes a bug where properties in AnyType schemas were omitted, Stops storing multipleOf value in a list
Adds required variable info to AnyType classes
Samples regenerated
Turns all unit tests back on
* Samples regenerated
* Docs and models regenerated
* Adds draft6 tests and python file reader
* Adds processing of multiple files
* Moves test examples into a different component so component schemas can be booleans
* Excludes boolean schema cases and some others that contain patternProperties
* Adds automatic test generation, template not quite working with indentation
* Turns on allOf tests, some failing
* Adds more generated components and tests
* Adds enum tests
* Turns on all of themissing tests
* Adds exclmax and min exclusion reasons
* Adds items test cases
* Adds maximum
* Adds maxItems
* Adds maxLength
* Adds maxProperties
* Adds minimum
* Adds minItems
* Adds minLength
* Adds minProperties
* Adds multipleOf
* Adds not
* Adds oneOf
* Adds pattern
* Adds patternProperties
* Working on properties examples, partial fix for escaped characters
* Further improves example string escaping
* Fixes properties test cases
* Adds draft6 test samples license
* Adds ref
* Finishes ref
* Adds remoteRef
* Adds required
* Improves required testing
* Fixes build error / javadoc warning
* Fixes uniqueItems bug in python-experimental
* Turns all tests back on
* Fixes 2 failing tests, all python tests pass
* Fixes java npe errors
* Fixes formatting of tests, indentation fixed
* Test fase name fixed to toTestCaseName, docstring added to ObjectWithTypeBooleans
* Fixes typo
* Adds test deletion to samples generation, samples regenerated
* Updates python-exp unit test sample, includes new ref examples
* Support DateTime parsing
I've got issue in parsing an Array of Strings in datetime format, which the generator translates into a List<DateTime>.
This just fixes it
* update dart sampels
Co-authored-by: William Cheng <wing328hk@gmail.com>
* I feel the issue is due to the creation of self._var_name_to_model_instances while doing the deserialization of the data.
Earlier the Python SDK code was using get_var_name_to_model_instances function which was adding var name to model instances that contain it. So <class 'openapi_client.model.stream_options_all_of'> will not part of mapping in self._var_name_to_model_instances for variable name stream_options.
Now with the latest Python SDK code following is the way through which var_name_to_model_instances is created:
for prop_name in model_args:
if prop_name not in discarded_args:
var_name_to_model_instances[prop_name] = [self] + composed_instances
Now as we can see that the var_name_to_model_instances is populated with self and composed_instance which will also contain stream_options_all_of as a composed instance and there will be no check that if stream_options is present in composed_instances or not.
As there is no attribute_mapping found for stream_options in stream_options_all_of, the type for stream_options will be treated as dict for mapping stream_options_all_of as mentioned by @Chekov2k.
So what I suggest is the following code:
for prop_name in model_args:
if prop_name not in discarded_args:
var_name_to_model_instances[prop_name] = [self] + list(
filter(
lambda x: prop_name in x.openapi_types, composed_instances))
This way we can check if the property name is present in that composed instance or not. If it's okay for @spacether I can raise a PR for this.
* [get_item_all_of_bug]
Added samples, test cases to validate all_of schema.
* [getiem_all_of_bug]
Updated docs and samples.
* [getiem_all_of_bug]
Updated test cases, docs and samples.
* [core] Fix naming of reservedWordsMappings
* `GeneratorSettings` used a wrong name (missing `s`) which resulted in config loaded from YAMl files not working
* [dart] Respect reservedWordsMappings when checking for reserved words