diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 8c9d283b44897..2d809c1e56190 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -571,7 +571,7 @@ https://github.com/OpenAPITools/openapi-generator/blob/c84b949df1a9ec04ba75989cb return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py index 516f7fb1a206f..adf3632a9ebd1 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py @@ -415,7 +415,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/client/echo_api/python/openapi_client/api_client.py b/samples/client/echo_api/python/openapi_client/api_client.py index 516f7fb1a206f..adf3632a9ebd1 100644 --- a/samples/client/echo_api/python/openapi_client/api_client.py +++ b/samples/client/echo_api/python/openapi_client/api_client.py @@ -415,7 +415,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/client/others/python-legacy-model-dictionaries/legacy_model_dict_client/api_client.py b/samples/client/others/python-legacy-model-dictionaries/legacy_model_dict_client/api_client.py index 5302b6c1ebec0..a28cdc42053a3 100644 --- a/samples/client/others/python-legacy-model-dictionaries/legacy_model_dict_client/api_client.py +++ b/samples/client/others/python-legacy-model-dictionaries/legacy_model_dict_client/api_client.py @@ -496,7 +496,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py index 249166feb5ba0..a0403a91cc006 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py @@ -414,7 +414,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python-httpx-sync/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-httpx-sync/petstore_api/api_client.py index 43782b4ec85bc..d83ae827fb721 100644 --- a/samples/openapi3/client/petstore/python-httpx-sync/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-httpx-sync/petstore_api/api_client.py @@ -417,7 +417,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py index 43782b4ec85bc..d83ae827fb721 100644 --- a/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py @@ -417,7 +417,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python-httpx2-sync/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-httpx2-sync/petstore_api/api_client.py index 43782b4ec85bc..d83ae827fb721 100644 --- a/samples/openapi3/client/petstore/python-httpx2-sync/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-httpx2-sync/petstore_api/api_client.py @@ -417,7 +417,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python-httpx2/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-httpx2/petstore_api/api_client.py index 43782b4ec85bc..d83ae827fb721 100644 --- a/samples/openapi3/client/petstore/python-httpx2/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-httpx2/petstore_api/api_client.py @@ -417,7 +417,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py index e94f64789c504..8b9149028286b 100644 --- a/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py @@ -414,7 +414,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 5b6101731ba06..ede9fd2d5491b 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -414,7 +414,7 @@ def sanitize_for_serialization(self, obj): return self.sanitize_for_serialization(obj_dict) - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize(self, response_text: str, response_type: Union[str, object], content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized.