* 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.
* [ocaml] Open Lwt.Infix rather than Lwt
The Lwt module has functions that might shadow parameters, and all the
functions we use from Lwt are in Lwt.Infix too.
File "src/apis/image_api.ml", line 13, characters 69-72:
13 | let uri = Request.maybe_add_query_param uri "all" string_of_bool all in
^^^
Error: This expression has type 'a t list -> 'a list t
but an expression was expected of type bool option
* [ocaml] update petstore samples
* better support for inline schema in parameters
* fix parameter model type
* add new method for model
* minor update
* fix isModelWithProperties
* fix is model check
* null check for properties
* inline parameter enhance with python-experimental fix [WIP] (#12397)
* Uses unaliasSchema rather than ModelUtils.getReferencedSchema
* Fixes python-experimental, delays param schema setting
* Samples regenerated
* Adds parameterModelName setting back in
* Samples regenerated
* removes needToSetSchema
* Sets schema differently depending on if inline model resolver is used
* Adds step for getting ref schema
* Samples regen
* fix test
* bug fix for rust generator
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
* Fix ConfigurableAuthorization package name import to come from configuration
* Fix Micronaut @Consumes and @Produces annotations, allow multiple content types
* Fix security schemes rendering and Micronaut @Authentication pairing with application settings when special characters are present
* Updated samples
* Code review feedback
* Add xml to dependencies and fix tests
Co-authored-by: Andriy Dmytruk <andriy.dmytruk@oracle.com>
* Add the applicationName parameter to support generation of multiple clients
* Change indentation in application.yml to double-space
* Update swagger annotations version, and option to choose not to generate the annotations
* Generate operations only in the first defined tag class for micronaut server
* Improve micronaut client options by setting the correct default values in the JavaMicronautAbstractCodegen constructor
* Fix visitor pattern having abstract method in non-abstract class. Update samples
* Update server sample FILES
* Minor refactor
* Fix for context path
* Fixxed issue with numeric primitive in body
* Aded primitives to cpp-qt/petstore.yaml (test ressource)
* generated samples via ./bin/generate-samples.sh