.generator/src/generator/openapi.py in datadog_api_client-2.14.0 vs .generator/src/generator/openapi.py in datadog_api_client-2.15.0
- old
+ new
@@ -475,11 +475,11 @@
return '{}, "{}"{}'.format(
name,
".".join(formatter.attribute_name(a) for a in attribute_path.split(".")[1:]),
get_type(parameter, attribute_path.split(".")[1]),
)
- return f'opts, "{formatter.attribute_path(attribute_path)}"{get_type(parameter)}'
+ return f'opts, "{formatter.attribute_path(attribute_path)}"{get_type(parameter)}'
def get_type_at_path(operation, attribute_path):
content = None
for code, response in operation.get("responses", {}).items():
@@ -489,8 +489,10 @@
if "schema" in content:
break
if content is None:
raise RuntimeError("Default response not found")
content = content["schema"]
+ if not attribute_path:
+ return get_name(content.get("items"))
for attr in attribute_path.split("."):
content = content["properties"][attr]
return get_name(content.get("items"))