PetsController.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace petstore;
  3. class PetsController
  4. {
  5. /**
  6. * @SWG\Get(
  7. * path="/pets",
  8. * summary="List all pets",
  9. * operationId="listPets",
  10. * tags={"pets"},
  11. * @SWG\Parameter(
  12. * name="limit",
  13. * in="query",
  14. * description="How many items to return at one time (max 100)",
  15. * required=false,
  16. * type="integer",
  17. * format="int32"
  18. * ),
  19. * @SWG\Response(
  20. * response=200,
  21. * description="An paged array of pets",
  22. * @SWG\Schema(ref="#/definitions/Pets"),
  23. * @SWG\Header(header="x-next", type="string", description="A link to the next page of responses")
  24. * ),
  25. * @SWG\Response(
  26. * response="default",
  27. * description="unexpected error",
  28. * @SWG\Schema(
  29. * ref="#/definitions/Error"
  30. * )
  31. * )
  32. * )
  33. */
  34. public function listPets()
  35. {
  36. }
  37. /**
  38. * @SWG\Post(
  39. * path="/pets",
  40. * summary="Create a pet",
  41. * operationId="createPets",
  42. * tags={"pets"},
  43. * @SWG\Response(response=201, description="Null response"),
  44. * @SWG\Response(
  45. * response="default",
  46. * description="unexpected error",
  47. * @SWG\Schema(ref="#/definitions/Error")
  48. * )
  49. * )
  50. */
  51. public function createPets()
  52. {
  53. }
  54. /**
  55. * @SWG\Get(
  56. * path="/pets/{petId}",
  57. * summary="Info for a specific pet",
  58. * operationId="showPetById",
  59. * tags={"pets"},
  60. * @SWG\Parameter(
  61. * name="petId",
  62. * in="path",
  63. * required=true,
  64. * description="The id of the pet to retrieve",
  65. * type="string"
  66. * ),
  67. * @SWG\Response(
  68. * response=200,
  69. * description="Expected response to a valid request",
  70. * @SWG\Schema(ref="#/definitions/Pets")
  71. * ),
  72. * @SWG\Response(
  73. * response="default",
  74. * description="unexpected error",
  75. * @SWG\Schema(ref="#/definitions/Error")
  76. * )
  77. * )
  78. */
  79. public function showPetById($id)
  80. {
  81. }
  82. }