-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
✨ enhancementNew feature or improvementNew feature or improvement
Description
Is your feature request related to a problem? Please describe.
Given this schema for a POST request:
{
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
},
"options": {
"type": "string",
"default": "{}"
}
}
}
}
}
}
}
the generated code will call httpx.post(files=dict(file=file, options=options)) which causes a server-side pydantic validation error (options should be of type str).
Describe the solution you'd like
The correct invocation would be httpx.post(data=dict(options=options), files=dict(file=file)) (see relevant page from httpx docs)
Describe alternatives you've considered
Some sort of server-side workaround, but it might be somewhat ugly.
Metadata
Metadata
Assignees
Labels
✨ enhancementNew feature or improvementNew feature or improvement