1

I want to configure nelmio to my symfony 3 project. I installed the bundle but at the end I get a message of no operations defined !!!! Whats's wrong? Any ideas?

/**
     * List the rewards of the specified user.
     *
     * This call takes into account all confirmed awards, but not pending or refused awards.
     *
     * @Route("/product", name="product", methods={"GET"})
     * @SWG\Response(
     *     response=200,
     *     description="Returns the rewards of an user",
     *     @SWG\Schema(
     *         type="array",
     *         @SWG\Items(ref=@Model(type=Reward::class, groups={"full"}))
     *     )
     * )
     * @SWG\Parameter(
     *     name="order",
     *     in="query",
     *     type="string",
     *     description="The field used to order rewards"
     * )
     * @SWG\Tag(name="rewards")
     * @Security(name="Bearer")
     *
     */
    public function getProducts()
    {
        $product = $this->entityManager->getRepository(Product::class)->getProducts();
        $productSerializer = $this->serializer->serialize($product, 'json');
        return new JsonResponse($productSerializer);
    }

icydemon
  • 78
  • 1
  • 9
Bilel
  • 339
  • 1
  • 2
  • 6

0 Answers0