* Add args to reserved words
* arg and args to _arg and _args in templates
* Corrections
* Test added
* Corrections
* Use arg and args as defined properties
* Removed unnecessary assertion
* Suggested change
* fix for issue #13722: send body for application/x-www-form-urlencoded data
* fix python test_application_x_www_form_urlencoded_serialization
* x-www-form-urlencoded data needs to be percent encoded
* add verification endpoint test for x-www-form-urlencoded data
Co-authored-by: David Chaiken <dchaiken@pinterest.com>
* Fixed regular expression in python client codegen
The previous regular expression was too loose, including any last character in the second group. This commit fixes that, making sure we only remove leading forward slashes, trailing forward slashes or trailing `\i`.
This commit closes 13069.
* Added generated files
* Edit comment
* Add test cases
Co-authored-by: antonio.silva <antonio.silva@feedzai.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.
* fix#11958 [BUG] python generates wrong model name and model file name
Modify AbstractPythonCodegen.toModelName just like AbstractJavaCodegen.toModelName
* add unit test
* update samples and docs
by
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
* fix AbstractPythonCodegen#toModelName logic, remove underscore
* update samples and docs
by
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
* 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>