SimplePetsController.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. namespace Petstore;
  3. class SimplePetsController
  4. {
  5. /**
  6. * @SWG\Get(
  7. * path="/pets",
  8. * description="Returns all pets from the system that the user has access to",
  9. * operationId="findPets",
  10. * produces={"application/json", "application/xml", "text/xml", "text/html"},
  11. * @SWG\Parameter(
  12. * name="tags",
  13. * in="query",
  14. * description="tags to filter by",
  15. * required=false,
  16. * type="array",
  17. * @SWG\Items(type="string"),
  18. * collectionFormat="csv"
  19. * ),
  20. * @SWG\Parameter(
  21. * name="limit",
  22. * in="query",
  23. * description="maximum number of results to return",
  24. * required=false,
  25. * type="integer",
  26. * format="int32"
  27. * ),
  28. * @SWG\Response(
  29. * response=200,
  30. * description="pet response",
  31. * @SWG\Schema(
  32. * type="array",
  33. * @SWG\Items(ref="#/definitions/Pet")
  34. * ),
  35. * ),
  36. * @SWG\Response(
  37. * response="default",
  38. * description="unexpected error",
  39. * @SWG\Schema(
  40. * ref="#/definitions/ErrorModel"
  41. * )
  42. * )
  43. * )
  44. */
  45. public function findPets()
  46. {
  47. }
  48. /**
  49. * @SWG\Get(
  50. * path="/pets/{id}",
  51. * description="Returns a user based on a single ID, if the user does not have access to the pet",
  52. * operationId="findPetById",
  53. * @SWG\Parameter(
  54. * description="ID of pet to fetch",
  55. * format="int64",
  56. * in="path",
  57. * name="id",
  58. * required=true,
  59. * type="integer"
  60. * ),
  61. * produces={
  62. * "application/json",
  63. * "application/xml",
  64. * "text/html",
  65. * "text/xml"
  66. * },
  67. * @SWG\Response(
  68. * response=200,
  69. * description="pet response",
  70. * @SWG\Schema(ref="#/definitions/Pet")
  71. * ),
  72. * @SWG\Response(
  73. * response="default",
  74. * description="unexpected error",
  75. * @SWG\Schema(ref="#/definitions/ErrorModel")
  76. * )
  77. * )
  78. */
  79. public function findPetById()
  80. {
  81. }
  82. /**
  83. * @SWG\Post(
  84. * path="/pets",
  85. * operationId="addPet",
  86. * description="Creates a new pet in the store. Duplicates are allowed",
  87. * produces={"application/json"},
  88. * @SWG\Parameter(
  89. * name="pet",
  90. * in="body",
  91. * description="Pet to add to the store",
  92. * required=true,
  93. * @SWG\Schema(ref="#/definitions/NewPet")
  94. * ),
  95. * @SWG\Response(
  96. * response=200,
  97. * description="pet response",
  98. * @SWG\Schema(ref="#/definitions/Pet")
  99. * ),
  100. * @SWG\Response(
  101. * response="default",
  102. * description="unexpected error",
  103. * @SWG\Schema(ref="#/definitions/ErrorModel")
  104. * )
  105. * )
  106. */
  107. public function addPet()
  108. {
  109. }
  110. /**
  111. * @SWG\Delete(
  112. * path="/pets/{id}",
  113. * description="deletes a single pet based on the ID supplied",
  114. * operationId="deletePet",
  115. * @SWG\Parameter(
  116. * description="ID of pet to delete",
  117. * format="int64",
  118. * in="path",
  119. * name="id",
  120. * required=true,
  121. * type="integer"
  122. * ),
  123. * @SWG\Response(
  124. * response=204,
  125. * description="pet deleted"
  126. * ),
  127. * @SWG\Response(
  128. * response="default",
  129. * description="unexpected error",
  130. * @SWG\Schema(ref="#/definitions/ErrorModel")
  131. * )
  132. * )
  133. */
  134. public function deletePet()
  135. {
  136. }
  137. }