PetWithDocsController.php 4.0 KB

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