getContainer()->get(sprintf('nelmio_api_doc.generator.%s', $area))->generate(); } protected function getModel($name): Schema { $definitions = $this->getSwaggerDefinition()->getDefinitions(); $this->assertTrue($definitions->has($name)); return $definitions->get($name); } protected function getOperation($path, $method): Operation { $api = $this->getSwaggerDefinition(); $paths = $api->getPaths(); $this->assertTrue($paths->has($path), sprintf('Path "%s" does not exist.', $path)); $action = $paths->get($path); $this->assertTrue($action->hasOperation($method), sprintf('Operation "%s" for path "%s" does not exist', $path, $method)); return $action->getOperation($method); } }