swagger-samples
swagger-samples copied to clipboard
Methods 'findByTags' and 'findByStatus' are not executed with correct URL per Spec
Methods 'findByTags' and 'findByStatus' have a collection format 'multi', but the execution by UI here http://petstore.swagger.io/#!/pet/findPetsByTags says it is OK to provide the parameters in comma separated values for array input. But when you look at the executed URL it looks like
http://petstore.swagger.io/v2/pet/findByTags?tags=available%2Csold
but since this is 'multi' for the collection-format, the URL should have been
http://petstore.swagger.io/v2/pet/findByTags?tags=available&tags=sold
so two issues, here
- The implementation of the example is taking CSV separated string and returning correct result, which is wrong
- The UI is not converting the 'multi' into correct format of URL
otherwise change the example to not to have an array but as string input, and pass what you want.