PetsController.php 2.3 KB

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