ProductController.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace UsingRefs;
  3. /**
  4. * @OA\PathItem(
  5. * path="/products/{product_id}",
  6. * @OA\Parameter(ref="#/components/parameters/product_id_in_path_required")
  7. * )
  8. */
  9. class ProductController
  10. {
  11. /**
  12. * @OA\Get(
  13. * tags={"Products"},
  14. * path="/products/{product_id}",
  15. * @OA\Response(
  16. * response="default",
  17. * description="successful operation",
  18. * @OA\JsonContent(ref="#/components/responses/product")
  19. * )
  20. * )
  21. */
  22. public function getProduct($id)
  23. {
  24. }
  25. /**
  26. * @OA\Patch(
  27. * tags={"Products"},
  28. * path="/products/{product_id}",
  29. * @OA\Parameter(ref="#/components/requestBodies/product_in_body"),
  30. * @OA\Response(
  31. * response="default",
  32. * description="successful operation",
  33. * @OA\JsonContent(ref="#/components/responses/product")
  34. * )
  35. * )
  36. */
  37. public function updateProduct($id)
  38. {
  39. }
  40. /**
  41. * @OA\Post(
  42. * tags={"Products"},
  43. * path="/products",
  44. * @OA\Parameter(ref="#/components/requestBodies/product_in_body"),
  45. * @OA\Response(
  46. * response="default",
  47. * description="successful operation",
  48. * @OA\JsonContent(ref="#/components/responses/product")
  49. * )
  50. * )
  51. */
  52. public function addProduct($id)
  53. {
  54. }
  55. }