title: Cannot load resource "". Make sure there is a loader supporting the "rest" type
body: <p>I face this Error while creating a REST API using Symfony V4.99 and <code>fosrestbundle</code>.</p>
  <p>When I Run <code>php bin/console debug:router</code> I get this:</p>
  <blockquote>
  <p>Cannot load resource &quot;App\Controller\ListController&quot;. Make sure
  there is a loader supporting the &quot;rest&quot; type.</p>
  </blockquote>
  <p>Here is the code of Routes.yaml:</p>
  <pre><code>lists:
      type      : rest
      resource  : App\Controller\ListController
      prefix    : api
  </code></pre>
  <p>Here is the code of fos_rest.yaml :</p>
  <pre><code>fos_rest: 
      format_listener:
          rules:
              - { path: ^/,  fallback_format: json, priorities: [ 'json' ] }
  
      exception:
          enabled: true
  
      view:
          view_response_listener:  'force'
          formats:
              json: true 
  </code></pre>
  <p>Here is the code of ListController.php:</p>
  <pre><code>&lt;?php
  
  namespace App\Controller;
  
  use Symfony\Component\Routing\Annotation\Route;
  use FOS\RestBundle\Controller\AbstractFOSRestController;
  use FOS\RestBundle\Controller\Annotations as Rest;
  
  class ListController extends AbstractFOSRestController
  {
      public function getListsAction()
      {
  
      }
  }
  </code></pre>