Skip to content

Commit

Permalink
Fix reading of the x-response-type property
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-elenbaas committed Feb 7, 2023
1 parent 635e62e commit a0d5bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openapi_python_client/parser/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def response_from_data(
schemas,
)

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

0 comments on commit a0d5bf7

Please sign in to comment.