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 8cba076583d3..790ec2204613 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -3,6 +3,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -585,7 +586,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -604,7 +604,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index a7ce4f1c6e07..9ad41e84f6d1 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -578,7 +579,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -597,7 +597,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 8e626e0851f4..bd360c4b05f2 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -580,7 +581,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -599,7 +599,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 66a3800593ac..5e7a95a35f3b 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -578,7 +579,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -597,7 +597,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string 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 66a3800593ac..5e7a95a35f3b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -11,6 +11,7 @@ from __future__ import absolute_import import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -578,7 +579,6 @@ class ApiClient(object): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -597,7 +597,6 @@ class ApiClient(object): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string