@@ -102,36 +102,40 @@ def to_dict(self) -> Dict[str, Any]:
102
102
def to_multipart (self ) -> Dict [str , Any ]:
103
103
some_file = self .some_file .to_tuple ()
104
104
105
- some_object = (None , json .dumps (self .some_object .to_dict ()), "application/json" )
105
+ some_object = (None , json .dumps (self .some_object .to_dict ()). encode () , "application/json" )
106
106
107
107
some_optional_file : Union [Unset , FileJsonType ] = UNSET
108
108
if not isinstance (self .some_optional_file , Unset ):
109
109
some_optional_file = self .some_optional_file .to_tuple ()
110
110
111
- some_string = self .some_string if self .some_string is UNSET else (None , str (self .some_string ), "text/plain" )
112
- some_number = self .some_number if self .some_number is UNSET else (None , str (self .some_number ), "text/plain" )
113
- some_array : Union [Unset , Tuple [None , str , str ]] = UNSET
111
+ some_string = (
112
+ self .some_string if self .some_string is UNSET else (None , str (self .some_string ).encode (), "text/plain" )
113
+ )
114
+ some_number = (
115
+ self .some_number if self .some_number is UNSET else (None , str (self .some_number ).encode (), "text/plain" )
116
+ )
117
+ some_array : Union [Unset , Tuple [None , bytes , str ]] = UNSET
114
118
if not isinstance (self .some_array , Unset ):
115
119
_temp_some_array = self .some_array
116
- some_array = (None , json .dumps (_temp_some_array ), "application/json" )
120
+ some_array = (None , json .dumps (_temp_some_array ). encode () , "application/json" )
117
121
118
- some_optional_object : Union [Unset , Tuple [None , str , str ]] = UNSET
122
+ some_optional_object : Union [Unset , Tuple [None , bytes , str ]] = UNSET
119
123
if not isinstance (self .some_optional_object , Unset ):
120
- some_optional_object = (None , json .dumps (self .some_optional_object .to_dict ()), "application/json" )
124
+ some_optional_object = (None , json .dumps (self .some_optional_object .to_dict ()). encode () , "application/json" )
121
125
122
126
some_nullable_object = (
123
- (None , json .dumps (self .some_nullable_object .to_dict ()), "application/json" )
127
+ (None , json .dumps (self .some_nullable_object .to_dict ()). encode () , "application/json" )
124
128
if self .some_nullable_object
125
129
else None
126
130
)
127
131
128
- some_enum : Union [Unset , Tuple [None , str , str ]] = UNSET
132
+ some_enum : Union [Unset , Tuple [None , bytes , str ]] = UNSET
129
133
if not isinstance (self .some_enum , Unset ):
130
- some_enum = (None , str (self .some_enum .value ), "text/plain" )
134
+ some_enum = (None , str (self .some_enum .value ). encode () , "text/plain" )
131
135
132
136
field_dict : Dict [str , Any ] = {}
133
137
for prop_name , prop in self .additional_properties .items ():
134
- field_dict [prop_name ] = (None , json .dumps (prop .to_dict ()), "application/json" )
138
+ field_dict [prop_name ] = (None , json .dumps (prop .to_dict ()). encode () , "application/json" )
135
139
136
140
field_dict .update (
137
141
{
0 commit comments