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

The wrapping for XML payload for "findByTags" method is incorrect in Pet Store example

Open rareddy opened this issue 9 years ago • 0 comments

I am looking through Pet Store example and it's Swagger.json file and for the method "findByTags" method, it returns the collection of "Pet" objects. When looking at response when the content type is "application/xml" it shows like

<pets>
  <Pet> ... </Pet>
  <Pet> ... </Pet>
</pets>

I understand the inner <Pet> element, however I am have not seemed to understand where the plural "pets" wrapping came from? by default wrapping is false, that means I should have

<Pet>..</Pet>
<Pet>..</Pet>

at worst, I thought if wrapping by default is "true" I would need see

<Pet>
  <Pet>..<Pet>
  <Pet>..</Pet>
<Pet>

rareddy avatar Apr 05 '16 16:04 rareddy