Pet.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <?php
  2. /**
  3. * @license Apache 2.0
  4. */
  5. namespace Petstore30\controllers;
  6. /**
  7. * Class Pet
  8. *
  9. * @package Petstore30\controllers
  10. *
  11. * @author Donii Sergii <doniysa@gmail.com>
  12. */
  13. class Pet
  14. {
  15. /**
  16. * @OA\Post(
  17. * path="/pet",
  18. * tags={"pet"},
  19. * summary="Add a new pet to the store",
  20. * operationId="addPet",
  21. * @OA\Response(
  22. * response=405,
  23. * description="Invalid input"
  24. * ),
  25. * security={
  26. * {"petstore_auth": {"write:pets", "read:pets"}}
  27. * },
  28. * requestBody={"$ref": "#/components/requestBodies/Pet"}
  29. * )
  30. */
  31. public function addPet()
  32. {
  33. }
  34. /**
  35. * @OA\Put(
  36. * path="/pet",
  37. * tags={"pet"},
  38. * summary="Update an existing pet",
  39. * operationId="updatePet",
  40. * @OA\Response(
  41. * response=400,
  42. * description="Invalid ID supplied"
  43. * ),
  44. * @OA\Response(
  45. * response=404,
  46. * description="Pet not found"
  47. * ),
  48. * @OA\Response(
  49. * response=405,
  50. * description="Validation exception"
  51. * ),
  52. * security={
  53. * {"petstore_auth": {"write:pets", "read:pets"}}
  54. * },
  55. * requestBody={"$ref": "#/components/requestBodies/Pet"}
  56. * )
  57. */
  58. public function updatePet()
  59. {
  60. }
  61. /**
  62. * @OA\Get(
  63. * path="/pet/findByStatus",
  64. * tags={"pet"},
  65. * summary="Finds Pets by status",
  66. * description="Multiple status values can be provided with comma separated string",
  67. * operationId="findPetsByStatus",
  68. * deprecated=true,
  69. * @OA\Parameter(
  70. * name="status",
  71. * in="query",
  72. * description="Status values that needed to be considered for filter",
  73. * required=true,
  74. * explode=true,
  75. * @OA\Schema(
  76. * type="array",
  77. * default="available",
  78. * @OA\Items(
  79. * type="string",
  80. * enum = {"available", "pending", "sold"},
  81. * )
  82. * )
  83. * ),
  84. * @OA\Response(
  85. * response=200,
  86. * description="successful operation",
  87. * @OA\JsonContent(
  88. * type="array",
  89. * @OA\Items(ref="#/components/schemas/Pet")
  90. * ),
  91. * @OA\XmlContent(
  92. * type="array",
  93. * @OA\Items(ref="#/components/schemas/Pet")
  94. * )
  95. * ),
  96. * @OA\Response(
  97. * response=400,
  98. * description="Invalid status value"
  99. * ),
  100. * security={
  101. * {"petstore_auth": {"write:pets", "read:pets"}}
  102. * }
  103. * )
  104. */
  105. public function findPetsByStatus()
  106. {
  107. }
  108. /**
  109. * @OA\Get(
  110. * path="/pet/findByTags",
  111. * tags={"pet"},
  112. * summary="Finds Pets by tags",
  113. * description=">-
  114. Muliple tags can be provided with comma separated strings. Use\ \ tag1,
  115. tag2, tag3 for testing.",
  116. * operationId="findByTags",
  117. * @OA\Parameter(
  118. * name="tags",
  119. * in="query",
  120. * description="Tags to filter by",
  121. * required=true,
  122. * explode=true,
  123. * @OA\Schema(
  124. * type="array",
  125. * @OA\Items(
  126. * type="string",
  127. * )
  128. * )
  129. * ),
  130. * @OA\Response(
  131. * response=200,
  132. * description="successful operation",
  133. * @OA\JsonContent(
  134. * type="array",
  135. * @OA\Items(ref="#/components/schemas/Pet")
  136. * ),
  137. * @OA\XmlContent(
  138. * type="array",
  139. * @OA\Items(ref="#/components/schemas/Pet")
  140. * )
  141. * ),
  142. * @OA\Response(
  143. * response=400,
  144. * description="Invalid status value"
  145. * ),
  146. * security={
  147. * {"petstore_auth": {"write:pets", "read:pets"}}
  148. * }
  149. * )
  150. */
  151. public function findByTags()
  152. {
  153. }
  154. /**
  155. * @OA\Get(
  156. * path="/pet/{petId}",
  157. * tags={"pet"},
  158. * summary="Find pet by ID",
  159. * description="Returns a single pet",
  160. * operationId="getPetById",
  161. * @OA\Parameter(
  162. * name="petId",
  163. * in="path",
  164. * description="ID of pet to return",
  165. * required=true,
  166. * @OA\Schema(
  167. * type="integer",
  168. * format="int64"
  169. * )
  170. * ),
  171. * @OA\Response(
  172. * response=200,
  173. * description="successful operation",
  174. * @OA\JsonContent(ref="#/components/schemas/Pet"),
  175. * @OA\XmlContent(ref="#/components/schemas/Pet"),
  176. * ),
  177. * @OA\Response(
  178. * response=400,
  179. * description="Invalid ID supplier"
  180. * ),
  181. * @OA\Response(
  182. * response=404,
  183. * description="Pet not found"
  184. * ),
  185. * security={
  186. * {"api_key": {}}
  187. * }
  188. * )
  189. *
  190. * @param int $id
  191. */
  192. public function getPetById($id)
  193. {
  194. }
  195. /**
  196. * @OA\Post(
  197. * path="/pet/{petId}",
  198. * tags={"pet"},
  199. * summary="Updates a pet in the store with form data",
  200. * operationId="updatePetWithForm",
  201. * @OA\Parameter(
  202. * name="petId",
  203. * in="path",
  204. * description="ID of pet that needs to be updated",
  205. * required=true,
  206. * @OA\Schema(
  207. * type="integer",
  208. * format="int64"
  209. * )
  210. * ),
  211. * @OA\Response(
  212. * response=405,
  213. * description="Invalid input"
  214. * ),
  215. * security={
  216. * {"petstore_auth": {"write:pets", "read:pets"}}
  217. * },
  218. * @OA\RequestBody(
  219. * description="Input data format",
  220. * @OA\MediaType(
  221. * mediaType="application/x-www-form-urlencoded",
  222. * @OA\Schema(
  223. * type="object",
  224. * @OA\Property(
  225. * property="name",
  226. * description="Updated name of the pet",
  227. * type="string",
  228. * ),
  229. * @OA\Property(
  230. * property="status",
  231. * description="Updated status of the pet",
  232. * type="string"
  233. * )
  234. * )
  235. * )
  236. * )
  237. * )
  238. */
  239. public function updatePetWithForm()
  240. {
  241. }
  242. /**
  243. * @OA\Delete(
  244. * path="/pet/{petId}",
  245. * tags={"pet"},
  246. * summary="Deletes a pet",
  247. * operationId="deletePet",
  248. * @OA\Parameter(
  249. * name="api_key",
  250. * in="header",
  251. * required=false,
  252. * @OA\Schema(
  253. * type="string"
  254. * )
  255. * ),
  256. * @OA\Parameter(
  257. * name="petId",
  258. * in="path",
  259. * description="Pet id to delete",
  260. * required=true,
  261. * @OA\Schema(
  262. * type="integer",
  263. * format="int64"
  264. * ),
  265. * ),
  266. * @OA\Response(
  267. * response=400,
  268. * description="Invalid ID supplied",
  269. * ),
  270. * @OA\Response(
  271. * response=404,
  272. * description="Pet not found",
  273. * ),
  274. * security={
  275. * {"petstore_auth": {"write:pets", "read:pets"}}
  276. * },
  277. * )
  278. */
  279. public function deletePet()
  280. {
  281. }
  282. /**
  283. * @OA\Post(
  284. * path="/pet/{petId}/uploadImage",
  285. * tags={"pet"},
  286. * summary="uploads an image",
  287. * operationId="uploadFile",
  288. * @OA\Parameter(
  289. * name="petId",
  290. * in="path",
  291. * description="ID of pet to update",
  292. * required=true,
  293. * @OA\Schema(
  294. * type="integer",
  295. * format="int64",
  296. * example=1
  297. * )
  298. * ),
  299. * @OA\Response(
  300. * response=200,
  301. * description="successful operation",
  302. * @OA\JsonContent(ref="#/components/schemas/ApiResponse")
  303. * ),
  304. * security={
  305. * {"petstore_auth": {"write:pets", "read:pets"}}
  306. * },
  307. * @OA\RequestBody(
  308. * description="Upload images request body",
  309. * @OA\MediaType(
  310. * mediaType="application/octet-stream",
  311. * @OA\Schema(
  312. * type="string",
  313. * format="binary"
  314. * )
  315. * )
  316. * )
  317. * )
  318. */
  319. public function uploadFile()
  320. {
  321. }
  322. }