SimplePetsController.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php
  2. namespace Petstore;
  3. class SimplePetsController
  4. {
  5. /**
  6. * @OA\Get(
  7. * path="/pets",
  8. * description="Returns all pets from the system that the user has access to",
  9. * operationId="findPets",
  10. * @OA\Parameter(
  11. * name="tags",
  12. * in="query",
  13. * description="tags to filter by",
  14. * required=false,
  15. * @OA\Schema(
  16. * type="array",
  17. * @OA\Items(type="string"),
  18. * ),
  19. * style="form"
  20. * ),
  21. * @OA\Parameter(
  22. * name="limit",
  23. * in="query",
  24. * description="maximum number of results to return",
  25. * required=false,
  26. * @OA\Schema(
  27. * type="integer",
  28. * format="int32"
  29. * )
  30. * ),
  31. * @OA\Response(
  32. * response=200,
  33. * description="pet response",
  34. * @OA\JsonContent(
  35. * type="array",
  36. * @OA\Items(ref="#/components/schemas/Pet")
  37. * ),
  38. * @OA\XmlContent(
  39. * type="array",
  40. * @OA\Items(ref="#/components/schemas/Pet")
  41. * ),
  42. * @OA\MediaType(
  43. * mediaType="text/xml",
  44. * @OA\Schema(
  45. * type="array",
  46. * @OA\Items(ref="#/components/schemas/Pet")
  47. * ),
  48. * ),
  49. * @OA\MediaType(
  50. * mediaType="text/html",
  51. * @OA\Schema(
  52. * type="array",
  53. * @OA\Items(ref="#/components/schemas/Pet")
  54. * ),
  55. * ),
  56. * ),
  57. * @OA\Response(
  58. * response="default",
  59. * description="unexpected error",
  60. * @OA\JsonContent(ref="#/components/schemas/ErrorModel"),
  61. * @OA\XmlContent(ref="#/components/schemas/ErrorModel"),
  62. * @OA\MediaType(
  63. * mediaType="text/xml",
  64. * @OA\Schema(ref="#/components/schemas/ErrorModel")
  65. * ),
  66. * @OA\MediaType(
  67. * mediaType="text/html",
  68. * @OA\Schema(ref="#/components/schemas/ErrorModel")
  69. * )
  70. * )
  71. * )
  72. */
  73. public function findPets()
  74. {
  75. }
  76. /**
  77. * @OA\Get(
  78. * path="/pets/{id}",
  79. * description="Returns a user based on a single ID, if the user does not have access to the pet",
  80. * operationId="findPetById",
  81. * @OA\Parameter(
  82. * description="ID of pet to fetch",
  83. * in="path",
  84. * name="id",
  85. * required=true,
  86. * @OA\Schema(
  87. * type="integer",
  88. * format="int64",
  89. * )
  90. * ),
  91. * @OA\Response(
  92. * response=200,
  93. * description="pet response",
  94. * @OA\JsonContent(ref="#/components/schemas/Pet"),
  95. * @OA\MediaType(
  96. * mediaType="application/xml",
  97. * @OA\Schema(ref="#/components/schemas/Pet")
  98. * ),
  99. * @OA\MediaType(
  100. * mediaType="text/xml",
  101. * @OA\Schema(ref="#/components/schemas/Pet")
  102. * ),
  103. * @OA\MediaType(
  104. * mediaType="text/html",
  105. * @OA\Schema(ref="#/components/schemas/Pet")
  106. * ),
  107. * ),
  108. * @OA\Response(
  109. * response="default",
  110. * description="unexpected error",
  111. * @OA\JsonContent(ref="#/components/schemas/ErrorModel"),
  112. * @OA\MediaType(
  113. * mediaType="application/xml",
  114. * @OA\Schema(ref="#/components/schemas/ErrorModel")
  115. * ),
  116. * @OA\MediaType(
  117. * mediaType="text/xml",
  118. * @OA\Schema(ref="#/components/schemas/ErrorModel")
  119. * ),
  120. * @OA\MediaType(
  121. * mediaType="text/html",
  122. * @OA\Schema(ref="#/components/schemas/ErrorModel")
  123. * ),
  124. * )
  125. * )
  126. */
  127. public function findPetById()
  128. {
  129. }
  130. /**
  131. * @OA\Post(
  132. * path="/pets",
  133. * operationId="addPet",
  134. * description="Creates a new pet in the store. Duplicates are allowed",
  135. * @OA\RequestBody(
  136. * description="Pet to add to the store",
  137. * required=true,
  138. * @OA\MediaType(
  139. * mediaType="multipart/form-data",
  140. * @OA\Schema(ref="#/components/schemas/NewPet")
  141. * )
  142. * ),
  143. * @OA\Response(
  144. * response=200,
  145. * description="pet response",
  146. * @OA\JsonContent(ref="#/components/schemas/Pet")
  147. * ),
  148. * @OA\Response(
  149. * response="default",
  150. * description="unexpected error",
  151. * @OA\JsonContent(ref="#/components/schemas/ErrorModel")
  152. * )
  153. * )
  154. */
  155. public function addPet()
  156. {
  157. }
  158. /**
  159. * @OA\Delete(
  160. * path="/pets/{id}",
  161. * description="deletes a single pet based on the ID supplied",
  162. * operationId="deletePet",
  163. * @OA\Parameter(
  164. * description="ID of pet to delete",
  165. * in="path",
  166. * name="id",
  167. * required=true,
  168. * @OA\Schema(
  169. * format="int64",
  170. * type="integer"
  171. * )
  172. * ),
  173. * @OA\Response(
  174. * response=204,
  175. * description="pet deleted"
  176. * ),
  177. * @OA\Response(
  178. * response="default",
  179. * description="unexpected error",
  180. * @OA\Schema(ref="#/components/schemas/ErrorModel")
  181. * )
  182. * )
  183. */
  184. public function deletePet()
  185. {
  186. }
  187. }