Skip to content

Commit a0d5bf7

Browse files
committed
Fix reading of the x-response-type property
1 parent 635e62e commit a0d5bf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_python_client/parser/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def response_from_data(
9898
schemas,
9999
)
100100

101-
response_type_val = schema_data['x-response-type'] if 'x-response-type' in schema_data else ResponseType.AUTO.value
101+
response_type_val = data.__dict__['x-response-type'] if 'x-response-type' in data.__dict__ else ResponseType.AUTO.value
102102
if response_type_val not in ResponseType._value2member_map_:
103103
return ParseError(data=data, detail=f"Unsupported x-response-type: {response_type}"), schemas
104104
response_type = ResponseType(response_type_val)

0 commit comments

Comments
 (0)