ApiPlatform\Core\Bridge\Symfony\Bundle\Action\SwaggerUiAction::__invoke PHP Method

__invoke() public method

public __invoke ( Request $request )
$request Symfony\Component\HttpFoundation\Request
    public function __invoke(Request $request)
    {
        $documentation = new Documentation($this->resourceNameCollectionFactory->create(), $this->title, $this->description, $this->version, $this->formats);
        return new Response($this->twig->render('ApiPlatformBundle:SwaggerUi:index.html.twig', $this->getContext($request) + ['spec' => $this->serializer->serialize($documentation, 'json')]));
    }