code: public function load($resource, $type = null)
      {
          $collection = new RouteCollection();
  
          foreach ($this->versions as $version => $config) {
              foreach ($config['endpoints'] as $document => $endpoint) {
                  $this->processRestRoute($collection, $document, $endpoint, $version);
              }
          }
  
          return $collection;
      }
docs: {@inheritdoc}