title: There are no registered paths for namespace "App". FosRestBundle, Symfony
body: <p>I receive such a message "There are no registered paths for namespace "App"" while doing a request to my API. I use FosUserBundle. FosRest tries to render the twig view all the time.</p>
  
  <pre><code>fos_rest:
  param_fetcher_listener: true
  body_listener: true
  format_listener:
      rules:
        - { path: '^/api/test', priorities: ['json'], fallback_format: json, prefer_extension: false }
        - { path: '^/', stop: true }
  view:
      templating_formats:
          html: false
      default_engine: none
      view_response_listener: 'force'
      mime_types:
          json: ['application/json;charset=UTF-8', 'application/json']
  routing_loader:
      default_format: json
  disable_csrf_role: IS_AUTHENTICATED_ANONYMOUSLY
  </code></pre>
  
  <p>and my ApiController:</p>
  
  <pre><code>namespace AppBundle\Controller;
  
  use AppBundle\Form\Type\PostThankYouFormType;
  use AppBundle\Entity\PostThankYou;
  use AppBundle\Entity\Company;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
  use FOS\RestBundle\Controller\FOSRestController;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  use FOS\RestBundle\Controller\Annotations\View;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
  use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\HttpFoundation\Response;
  use Nelmio\ApiDocBundle\Annotation\ApiDoc;
  
  class ApiController extends FOSRestController
  {
      /**
       * @Route(name="app.api.test", path="/api/test")
       * @Method("GET")
       * @View()
       * @return \FOS\RestBundle\View\View
       */
      public function getCompanyUsers(Request $request, Company $company)
      {
          return $this-&gt;view([
              'test' =&gt; 'test',
          ]);
      }
  </code></pre>
  
  <p>Error:</p>
  
  <p><a href="https://i.stack.imgur.com/BMTzM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BMTzM.png" alt="enter image description here"></a></p>
  
  <p>I tried all the ways found on stackoverflow but none of them worked. 
  I just expect json response.</p>
  
  <p>I found a mistake. I had two times write key "fos_rest" in my config.yml. First was in the middle of config and second in the end of file...</p>