From 7f6fd6736f9efd4f62dd56ffacf22d2d2b4f65a6 Mon Sep 17 00:00:00 2001 From: Mladen Jablanovic Date: Fri, 13 Oct 2023 14:04:45 +0200 Subject: [PATCH] list[] is now List[] in python generator --- openapi-generator/templates/python/api_client.mustache | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openapi-generator/templates/python/api_client.mustache b/openapi-generator/templates/python/api_client.mustache index 47ede519..07433dd0 100644 --- a/openapi-generator/templates/python/api_client.mustache +++ b/openapi-generator/templates/python/api_client.mustache @@ -294,13 +294,13 @@ class ApiClient(object): return None if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + if klass.startswith('List['): + sub_kls = re.match(r'List\[(.*)\]', klass).group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + if klass.startswith('Dict('): + sub_kls = re.match(r'Dict\(([^,]*), (.*)\)', klass).group(2) return {k: self.__deserialize(v, sub_kls) for k, v in six.iteritems(data)}