Repository navigation
Send multipart arrays as repeated fields in cURL and Try it - #61
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Reviewed the multipart and URL-encoded serialization changes in lib/openapi.ts and traced their cURL and Try it call paths. The repeated-field behavior is consistent, and I found no concrete regressions. LGTM.
|
🎉 This PR has been merged—thank you, @glenn-jocher, for aligning cURL and browser requests to send multipart array values as repeated fields in input order.
Sharing the form-entry serializer keeps multipart array handling consistent across both workflows. |
A multipart upload with
{"tags":["blue","green"]}produced one text field containing the JSON array. Both the copied cURL command and the documentation’s Send request button now send one part per tag, in order.tags=["blue","green"]tags=blueandtags=greentags=[]partThe two documentation paths reuse the form entry serializer. URL-encoded objects still expand into individual keys, multipart objects stay under their field name, and a selected file is sent once.
Verified with a loopback HTTP receiver and a real Chromium session on the built example site. The displayed cURL and the browser request carried both tag parts, a file and a literal
@literaltext value. Generation, typecheck, lint, knip, all 21 tests, the production build, Python compilation and Ruff passed.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Updated cURL generation and the documentation’s Send request behavior to serialize multipart array values as repeated fields in input order.
📊 Key Changes
🎯 Purpose & Impact