NelmioApiDocBundle
NelmioApiDocBundle copied to clipboard
Best way to get the schema of a single endpoint?
Given a Controller with this Action:
/**
* @Route("/api/users", methods={"GET"})
*
* @OA\Response(...)
*
* @OA\Parameter(
* name="order",
* in="query",
* description="The field used to order users",
* @OA\Schema(type="string")
* )
*/
public function getUsers()
{
// ...
}
which is the best way to create another endpoint that returns the OpenApi schema of "/api/users" ?
Put in other words:
/**
* @Route("/api/users.schema", methods={"GET"})
*/
public function getUsersSchema()
{
// TODO: generate and return "/api/users" schema
}
is there any way to call the Bundle and get the schema of a given route or url?