example-object.php 791 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use OpenApi\Annotations as OA;
  3. /**
  4. * @OA\Info(
  5. * version="1.0",
  6. * title="Example for response examples value"
  7. * )
  8. */
  9. /**
  10. * @OA\Post(
  11. * path="/users",
  12. * summary="Adds a new user",
  13. * @OA\RequestBody(
  14. * @OA\MediaType(
  15. * mediaType="application/json",
  16. * @OA\Schema(
  17. * @OA\Property(
  18. * property="id",
  19. * type="string"
  20. * ),
  21. * @OA\Property(
  22. * property="name",
  23. * type="string"
  24. * ),
  25. * example={"id": 10, "name": "Jessica Smith"}
  26. * )
  27. * )
  28. * ),
  29. * @OA\Response(
  30. * response=200,
  31. * description="OK"
  32. * )
  33. * )
  34. */