You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the _get_kwargs generated method, the body is determined as File type (because the format in my swagger definition is binary), but it tries to access its .to_dict attribute (because body_type is considered as data due to the content type application/x-www-form-urlencoded), which does not exist because it is a file
Desktop (please complete the following information):
OS: macOS 13.3.1
Python Version: 3.9.8
openapi-python-client version: 0.17.2
Additional context
In the macro, the arguments macro determine the argument type of body based on endpoint.bodies[0].prop.get_type_string(), whereas in the body_to_kwarg macro it determines it based on body.body_type, which is determined by the following:
Describe the bug
In the
_get_kwargs
generated method, the body is determined as File type (because the format in my swagger definition isbinary
), but it tries to access its.to_dict
attribute (because body_type is considered as data due to the content typeapplication/x-www-form-urlencoded
), which does not exist because it is a fileOpenAPI Spec File
Desktop (please complete the following information):
Additional context
In the macro, the
arguments
macro determine the argument type of body based onendpoint.bodies[0].prop.get_type_string()
, whereas in thebody_to_kwarg
macro it determines it based onbody.body_type
, which is determined by the following:The text was updated successfully, but these errors were encountered: