-
Notifications
You must be signed in to change notification settings - Fork 5
Update api spec #1461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update api spec #1461
Conversation
| "content": { | ||
| "multipart/form-data": { | ||
| "schema": { | ||
| "type": "string", | ||
| "format": "binary" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The multipart/form-data schema is incorrectly defined for multiple file uploads. The description states "each file part becomes a source object" (line 9900), and the response includes uploaded_files (plural), but the schema is defined as a single string with binary format. This will not properly handle multiple file parts in a multipart request.
Fix: Change the schema to properly accept multiple files:
"schema": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "binary"
}
}Or use an array if files share the same field name:
"schema": {
"type": "array",
"items": {
"type": "string",
"format": "binary"
}
}| "content": { | |
| "multipart/form-data": { | |
| "schema": { | |
| "type": "string", | |
| "format": "binary" | |
| } | |
| } | |
| "content": { | |
| "multipart/form-data": { | |
| "schema": { | |
| "type": "object", | |
| "additionalProperties": { | |
| "type": "string", | |
| "format": "binary" | |
| } | |
| } | |
| } |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1461 +/- ##
=======================================
Coverage 69.10% 69.10%
=======================================
Files 41 41
Lines 6778 6778
=======================================
Hits 4684 4684
Misses 2094 2094
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updating the spec from that in the api repo