Skip to content

Commit

Permalink
[python] fix response_type
Browse files Browse the repository at this point in the history
Signed-off-by: ふぁ <[email protected]>
  • Loading branch information
fa0311 committed Oct 12, 2023
1 parent 30d3aa9 commit 82a96f0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ class ApiClient:

# deserialize response data

if response_type == "bytearray" or response_type is None:
if response_type == "bytearray":
return_data = response_data.data
elif response_type is None
return_data = None
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def __call_api(

# deserialize response data

if response_type == "bytearray" or response_type is None:
if response_type == "bytearray":
return_data = response_data.data
elif response_type is None
return_data = None
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
Expand Down
4 changes: 3 additions & 1 deletion samples/client/echo_api/python/openapi_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def __call_api(

# deserialize response data

if response_type == "bytearray" or response_type is None:
if response_type == "bytearray":
return_data = response_data.data
elif response_type is None
return_data = None
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ async def __call_api(

# deserialize response data

if response_type == "bytearray" or response_type is None:
if response_type == "bytearray":
return_data = response_data.data
elif response_type is None
return_data = None
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ def __call_api(

# deserialize response data

if response_type == "bytearray" or response_type is None:
if response_type == "bytearray":
return_data = response_data.data
elif response_type is None
return_data = None
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
Expand Down

0 comments on commit 82a96f0

Please sign in to comment.