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)}