openapi->components; if ($components === Generator::UNDEFINED) { $components = new Components([]); $components->_context->generated = true; } foreach ($analysis->annotations as $annotation) { if (Components::matchNested(get_class($annotation)) && $annotation->_context->is('nested') === false) { // A top level annotation. $components->merge([$annotation], true); $analysis->openapi->components = $components; } } } }