Description
This is coming from my research on Issue #4056
It seems that arrays of objects are not quite easy/intuitive to send from the UI....
The list of integers or strings are working fine. But not the list of objects...
Q | A |
---|---|
Bug or feature request? | Bug (Maybe) |
Which Swagger/OpenAPI version? | Latest |
Which Swagger-UI version? | Latest |
How did you install Swagger-UI? | swagger-net |
Which browser & version? | Chrome |
Which operating system? | Win 10 |
Demonstration API definition
http://swashbuckletest.azurewebsites.net/swagger/ui/index?filter=ArrayTest#/ArrayTest/ArrayTest_Get3
Expected Behavior
Here is how we properly send an object list in a .NET WebApi:
http://swashbuckletest.azurewebsites.net/api/ArrayTest/list_location?p[0][Lat]=1.11&p[0][Lon]=2.22&p[1][Lat]=5.55&p[1][Lon]=6.66
Here is a breakdown of the params
?
p[0][Lat]=1.11&
p[0][Lon]=2.22&
p[1][Lat]=5.55&
p[1][Lon]=6.66
Current Behavior
The current implementation seems to url encode the items and concatenate them
http://swashbuckletest.azurewebsites.net/api/ArrayTest/list_location?p=Lat%3D1.1&p=Lat%3D5.55
I've tried a lot of different combinations and nothing, I've not seen an output close to the expected behavior
Possible Solution
...Still banging my head for one possible solution.