File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main
java/org/openapitools/codegen/languages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,13 +100,13 @@ public PythonClientCodegen() {
100100 typeMapping .put ("set" , "List" );
101101 typeMapping .put ("map" , "Dict" );
102102 typeMapping .put ("decimal" , "decimal.Decimal" );
103- typeMapping .put ("file" , "bytearray " );
104- typeMapping .put ("binary" , "bytearray " );
105- typeMapping .put ("ByteArray" , "bytearray " );
103+ typeMapping .put ("file" , "bytes " );
104+ typeMapping .put ("binary" , "bytes " );
105+ typeMapping .put ("ByteArray" , "bytes " );
106106
107107 languageSpecificPrimitives .remove ("file" );
108108 languageSpecificPrimitives .add ("decimal.Decimal" );
109- languageSpecificPrimitives .add ("bytearray " );
109+ languageSpecificPrimitives .add ("bytes " );
110110 languageSpecificPrimitives .add ("none_type" );
111111
112112 supportsInheritance = true ;
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ class ApiClient:
313313 response_text = None
314314 return_data = None
315315 try:
316- if response_type == "bytearray":
316+ if response_type in ( "bytearray", "bytes") :
317317 return_data = response_data.data
318318 elif response_type == "file":
319319 return_data = self.__deserialize_file(response_data)
You can’t perform that action at this time.
0 commit comments