Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
[Bug]: Array parameter in `multipart/form-data` does not explode when it's part of a complex object
Describe the bug
When the request body is multipart/form-data
, and it contains an array parameter which is part of a complex object, the array parameter does not explode, but instead the value is sent as a comma-separated list.
Expected behavior
An array parameter should be sent as multiple form fields having the same name even when it is not a direct parameter of an operation but included as part of a complex object.
Actual behavior
Value of the array parameter is sent as a comma-separated list.
Steps to reproduce
- Clone the repo https://github.com/FlameWolf/DotNet9WebApi
- Comment out line
#30
inProgram.cs
:options.OperationAsyncFilter<SwaggerArrayParameterFilter>();
- Run the application and try out the endpoint
/WeatherForecast/post
- Uncomment line
#30
inProgram.cs
to see the expected behaviour
Exception(s) (if any)
No response
Swashbuckle.AspNetCore version
7
.NET Version
9
Anything else?
No response