StoreController.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. namespace PetstoreIO;
  3. abstract class StoreController
  4. {
  5. /**
  6. * @SWG\Get(path="/store/inventory",
  7. * tags={"store"},
  8. * summary="Returns pet inventories by status",
  9. * description="Returns a map of status codes to quantities",
  10. * operationId="getInventory",
  11. * produces={"application/json"},
  12. * parameters={},
  13. * @SWG\Response(
  14. * response=200,
  15. * description="successful operation",
  16. * @SWG\Schema(
  17. * type="object",
  18. * additionalProperties={
  19. * "type":"integer",
  20. * "format":"int32"
  21. * }
  22. * )
  23. * ),
  24. * security={{
  25. * "api_key":{}
  26. * }}
  27. * )
  28. */
  29. public function getInventory()
  30. {
  31. }
  32. /**
  33. * @SWG\Post(path="/store/order",
  34. * tags={"store"},
  35. * summary="Place an order for a pet",
  36. * description="",
  37. * operationId="placeOrder",
  38. * produces={"application/xml", "application/json"},
  39. * @SWG\Parameter(
  40. * in="body",
  41. * name="body",
  42. * description="order placed for purchasing the pet",
  43. * required=true,
  44. * @SWG\Schema(ref="#/definitions/Order")
  45. * ),
  46. * @SWG\Response(
  47. * response=200,
  48. * description="successful operation",
  49. * @SWG\Schema(ref="#/definitions/Order")
  50. * ),
  51. * @SWG\Response(response=400, description="Invalid Order")
  52. * )
  53. */
  54. public function placeOrder()
  55. {
  56. }
  57. /**
  58. * @SWG\Get(path="/store/order/{orderId}",
  59. * tags={"store"},
  60. * summary="Find purchase order by ID",
  61. * description="For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
  62. * operationId="getOrderById",
  63. * produces={"application/xml", "application/json"},
  64. * @SWG\Parameter(
  65. * name="orderId",
  66. * in="path",
  67. * description="ID of pet that needs to be fetched",
  68. * required=true,
  69. * type="integer",
  70. * format="int64",
  71. * minimum=1.0,
  72. * maximum=10.0,
  73. * ),
  74. * @SWG\Response(
  75. * response=200,
  76. * description="successful operation",
  77. * @SWG\Schema(
  78. * ref="#/definitions/Order"
  79. * )
  80. * ),
  81. * @SWG\Response(response=400, description="Invalid ID supplied"),
  82. * @SWG\Response(response=404, description="Order not found")
  83. * )
  84. */
  85. public function getOrderById()
  86. {
  87. }
  88. /**
  89. * @SWG\Delete(path="/store/order/{orderId}",
  90. * tags={"store"},
  91. * summary="Delete purchase order by ID",
  92. * description="For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
  93. * operationId="deleteOrder",
  94. * produces={"application/xml", "application/json"},
  95. * @SWG\Parameter(
  96. * name="orderId",
  97. * in="path",
  98. * description="ID of the order that needs to be deleted",
  99. * required=true,
  100. * type="integer",
  101. * format="int64",
  102. * minimum=1.0
  103. * ),
  104. * @SWG\Response(response=400, description="Invalid ID supplied"),
  105. * @SWG\Response(response=404, description="Order not found")
  106. * )
  107. */
  108. public function deleteOrder()
  109. {
  110. }
  111. }