import(__DIR__.'/Controller/', '/', 'annotation'); $routes->import('', '/api', 'api_platform'); } /** * {@inheritdoc} */ protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) { $c->loadFromExtension('framework', [ 'secret' => 'MySecretKey', 'test' => null, 'validation' => null, ]); // Filter routes $c->loadFromExtension('nelmio_api_doc', [ 'documentation' => [ 'info' => [ 'title' => 'My Test App', ], ], 'routes' => [ 'path_patterns' => ['^/api(?!/admin)'], ], ]); } }