You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swagger UI does not support indexed form fields in multipart/form-data requests but many backend frameworks can handle form data with indexed object keys such as spring Boot etc. Currently, Swagger UI does not generate these indexed form fields, making it difficult to test APIs directly from the UI.
Describe the solution you'd like
Swagger UI should support indexed naming for form fields in multipart/form-data;
A. By allowing OpenAPI schemas to generate indexed form fields,
B. Ensure that these indexed fields are properly serialized in requests,
C. Improve the UI to handle dynamic form entries. e.g , "Add More" which should be a button to add new indexed fields).
Describe alternatives you've considered
1.Writing a custom frontend to handle indexed form requests.
2. Manually renaming fields (file_0, file_1), but this is not a real array,
3. Using Postman instead of Swagger UI for testing.
None of these solutions are ideal, as they require workarounds instead of a native Swagger UI implementation
Additional context
This feature would improve Swagger UI’s usability for APIs handling file uploads with metadata,
Many users have requested better support for multipart form arrays in OpenAPI,
This would eliminate the need for external tools like Postman when testing APIs.
The text was updated successfully, but these errors were encountered:
Content & configuration
Swagger/OpenAPI definition:
Swagger-UI configuration options:
Is your feature request related to a problem?
Yes!
Swagger UI does not support indexed form fields in multipart/form-data requests but many backend frameworks can handle form data with indexed object keys such as spring Boot etc. Currently, Swagger UI does not generate these indexed form fields, making it difficult to test APIs directly from the UI.
Describe the solution you'd like
Swagger UI should support indexed naming for form fields in multipart/form-data;
A. By allowing OpenAPI schemas to generate indexed form fields,
B. Ensure that these indexed fields are properly serialized in requests,
C. Improve the UI to handle dynamic form entries. e.g , "Add More" which should be a button to add new indexed fields).
Describe alternatives you've considered
1.Writing a custom frontend to handle indexed form requests.
2. Manually renaming fields (file_0, file_1), but this is not a real array,
3. Using Postman instead of Swagger UI for testing.
Additional context
The text was updated successfully, but these errors were encountered: