* 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.
* LDS-2166 : add request auth to api client and api call
Can now overwrite request auth by request
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : Add samples
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : fix test
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : Fixing test in python_disallowAdditionalPropertiesIfNotPresent
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : add removed line break
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : add name for _request_auth params
Add None when _content_type is not set
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : add tabulation
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : fix missing values
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* LDS-2166 : generate sample
Add _request_auth in sample
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* Request auth can now use multiple auth
Request auth is now a list of dict
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
* Add request_auths in test
Envoyé depuis mon iPhone.
P.S. : Ce commit est certifié sans gluten
Co-authored-by: Géry THRASIBULE <g.thrasibule@lecomptoirdespharmacies.fr>
Originally, this dummy declaration was needed because there was the
possibility of the generated code doesn't use `context.Context` and then
if it imported that package, go compiler complains that and makes an error.
ref: 3ed1aa8e79/modules/swagger-codegen/src/main/resources/go/api.mustache (L30)
However, now this dummy placement is no longer needed because the
generated code always uses `context.Context`.
Signed-off-by: moznion <moznion@mail.moznion.net>
* [go] use regular stdlib import names
* [go] support primitive oneOf types
See #8489
* [go] improve pbv/pbr handling
Improves the way pass-by-value and pass-by-reference variables are used.
Closes#8489
* [go] improve generated documentation
* [go] adopt pointer changes in interface
* [go] regenerate sample
* [go] resolve pointer issues
* [go] regenerate clients and avoid pointers on primitive return values
* [go] improve Exec() return value handling
* [go] regernate files
* [go] use go modules
* [go] properly handle polymorph decode
If polymorphism without discriminator was used, the previous code was unable to properly decode the vaules. By using a strict decoder, which rejects unknown fields, type guessing now works.
* [go] make GetActualInstance not panic on nil
* [go] return GenericOpenAPIError as pointer
* [go] clarify helper function godoc
* [go] address test regression error type
* [go] regenerate go samples
* [go] resolve go mod issues and test regressions
* [go] resolve merge conflicts and regenerate
* [go] resolve merge conflicts
* [go] Replace spaces with tabs
Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
* [go] Replace spaces with tabs
Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
* Adds generatorLanguageVersion and uses it in python generators
* Regenerates docs
* Adds stability to generator docs
* Triple braces generatorLanguageVersion
* Regenerates samples
* Fixes the python-experimental setup.py file so it works with generatorLanguageVersion
* Updates generators readme