/** * @Route("/get_posts/{authorId}", requirements={"authorId" = "\d+"}) * @Method({"GET"}) * * @param $authorId * @return array */ public function getPostsAction($authorId) { $result = $this->service->getPosts($authorId); return $result; }