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
{{ message }}
Repository navigation
broken curl commands for formData with collectionFormat=multi #3838
changed the title [-]broken curl commands for formData with collectionFormat=multi[/-][+]swagger 2 - broken curl commands for formData with collectionFormat=multi[/+]on Oct 30, 2017
changed the title [-]swagger 2 - broken curl commands for formData with collectionFormat=multi[/-][+]broken curl commands for formData with collectionFormat=multi[/+]on Oct 30, 2017
When specifying dddd and eeee as values for the parameter in SwaggerUI we're getting such fragment in curl command: -F "param1="dddd","eeeee"".
The actual HTTP request made by SwaggerUI also contains comma-separated values in a single parameter rather than multiple parameters with same name.
This request also wraps each value in double quotes - so that acutal value of param field in reuqest is "dddd","eeee".
There's similar bug for OpenAPI 3.0 specs: #5106 . The only difference is that for OpenAPI values aren't wrapped in double quotes -
i.e. param1 value becomes dddd,eeee.
Activity
webron commentedon Oct 30, 2017
You ignored the issue template and so... didn't provide any details on which version you use.
xanoinc commentedon Oct 30, 2017
my apologies @webron
This is for swagger 2.0
[-]broken curl commands for formData with collectionFormat=multi[/-][+]swagger 2 - broken curl commands for formData with collectionFormat=multi[/+]webron commentedon Oct 30, 2017
Not referring to the spec version but swagger-ui's version...
xanoinc commentedon Oct 30, 2017
@webron this the latest version from master - which I believe is 3.4.1
[-]swagger 2 - broken curl commands for formData with collectionFormat=multi[/-][+]broken curl commands for formData with collectionFormat=multi[/+]paul-lysak commentedon Jan 10, 2019
Observing same behavior with Swagger UI 3.20.3 taken from WebJars (https://mvnrepository.com/artifact/org.webjars/swagger-ui/3.20.3)
This is the parameter we have:
When specifying dddd and eeee as values for the parameter in SwaggerUI we're getting such fragment in curl command:
-F "param1="dddd","eeeee"".The actual HTTP request made by SwaggerUI also contains comma-separated values in a single parameter rather than multiple parameters with same name.
This request also wraps each value in double quotes - so that acutal value of
paramfield in reuqest is"dddd","eeee".There's similar bug for OpenAPI 3.0 specs: #5106 . The only difference is that for OpenAPI values aren't wrapped in double quotes -
i.e.
param1value becomesdddd,eeee.fix: curl array support within multipart/form-data (swagger-api#3838)
fix: curl array support within multipart/form-data (#3838) (#5999)
Revert "fix: curl array support within multipart/form-data (#3838) (#…
Merge branch 'master' of github.com:swagger-api/swagger-ui
fix: curl array support within multipart/form-data (swagger-api#3838) (…