File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
modules/openapi-generator/src/main/resources/python/asyncio
samples/openapi3/client/petstore/python-aiohttp/petstore_api Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,10 @@ class RESTClientObject:
177
177
data.add_field(k, v)
178
178
args["data"] = data
179
179
180
- # Pass a `bytes` parameter directly in the body to support
180
+ # Pass a `bytes` or `str` parameter directly in the body to support
181
181
# other content types than Json when `body` argument is provided
182
182
# in serialized form
183
- elif isinstance(body, bytes):
183
+ elif isinstance(body, str) or isinstance(body, bytes):
184
184
args["data"] = body
185
185
else:
186
186
# Cannot generate the request from given parameters
Original file line number Diff line number Diff line change @@ -187,10 +187,10 @@ async def request(
187
187
data .add_field (k , v )
188
188
args ["data" ] = data
189
189
190
- # Pass a `bytes` parameter directly in the body to support
190
+ # Pass a `bytes` or `str` parameter directly in the body to support
191
191
# other content types than Json when `body` argument is provided
192
192
# in serialized form
193
- elif isinstance (body , bytes ):
193
+ elif isinstance (body , str ) or isinstance ( body , bytes ):
194
194
args ["data" ] = body
195
195
else :
196
196
# Cannot generate the request from given parameters
You can’t perform that action at this time.
0 commit comments