Method Not Allowed with FosRestBundle
<p>I have an API with some controllers for their respective entities. They have all the same structure, but in one of them I have this error when I try to delete a value.</p>

<blockquote>
  <p>No route found for "DELETE /api/categories/4": Method Not Allowed (Allow: GET, HEAD, PUT)</p>
</blockquote>

<p>But I have the delete action created! And in other controllers, with the same code, it works fine.</p>

<p>The delete action:</p>

<pre><code>/**     
 * @return array  
 * @Rest\Delete("/categories/{id}")      
 * @Rest\View(statusCode=204)
 * @Method({"DELETE"})       
 */
public function deleteCategoryAction($id)
{
    $em = $this-&gt;getDoctrine()-&gt;getManager(); 
    $category = $em-&gt;getRepository('CASEventBundle:Category')-&gt;find($id);

    $em-&gt;remove($category);
    $em-&gt;flush();

    return new View("deleted successfully", Response::HTTP_OK);
}
</code></pre>

<p>The routing file:</p>

<pre><code>category:
    type: rest
    resource: CAS\APIRestBundle\Controller\CategoryController
</code></pre>