manski
6 years agoOccasional Visitor
Bugs in PetStore api spec
This is a repost of the same question in the old forum - for which I never got an answer. So I'm hoping to have more luck here.
Secondly, I find the new forum quite confusing when it comes to chosing the correct subforum. I hope I'm not totally wrong here.
To my problem:
I'm currently trying to write my own swagger codegen plugin and came across a "problem" when generating the client code for the PetStore api example.
It's about the "placeOrder" operation (POST on /store/order): This operation has an "in body" parameter but no "consumes" list (neither on the operation nor on the api itself).
While the mime type in this particular example is most likely "application/json", my question is: What should a codegen plugin do about this? I mean should it always assume "application/json" (which could be totally wrong)? Or should it error out?
Or is this actually a "bug" in the PetStore api spec?
Unfortunately, the Swagger 2.0 spec doesn't seem to say anything about this case (at least nothing I could find).
Thanks for the help in advance. :)