Is it possible to use a swagger.yaml or the included definitions to reference/annotate them as a response structure definition instead of referencing a PHP model/entity?
Currently my Api Controller annotations look like (shortened):
/**
* Return Users
*
* @return JsonResponse|Response
*
* @Route("/api/v1/users", name="v1_user", methods={"GET"})
*
* @OA\Get(
* @OA\Response(
* response=200,
* description="Returns status 200 and a list of all users",
* )
* )
* @OA\Tag(name="users")
*/
Is it possible to use a swagger.yaml or the included definitions to reference/annotate them as a response structure definition instead of referencing a PHP model/entity?
Currently my Api Controller annotations look like (shortened):
My swagger.yaml looks like (shortened):
But how do I refer to these definitions to show as response definition in swagger UI?
Setup: Symfony 5.3 / nelmioApiDocBundle 4.6.2
Thanks for any help!