swagger-samples icon indicating copy to clipboard operation
swagger-samples copied to clipboard

Methods 'findByTags' and 'findByStatus' are not executed with correct URL per Spec

Open rareddy opened this issue 9 years ago • 0 comments

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

  1. The implementation of the example is taking CSV separated string and returning correct result, which is wrong
  2. 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.

rareddy avatar Apr 14 '16 20:04 rareddy