viewHandler = $viewHandler; } /** * @SWG\Response( * response=200, * description="A simple route that returns a 'pong', which you can use for testing the API", * ) * * @Rest\Get(path="/ping") */ public function pingAction() { $view = new View(['message' => 'pong'], 200); return $this->viewHandler->handle($view); } }