services(); $openApiAnnotationsRaw = [ 'AdditionalProperties', 'Attachable', 'Components', 'Contact', 'Delete', 'Discriminator', 'Examples', 'ExternalDocumentation', 'Flow', 'Get', 'Head', 'Header', 'Info', 'Items', 'JsonContent', 'License', 'Link', 'MediaType', 'OpenApi', 'Operation', 'Options', 'Parameter', 'Patch', 'PatchItem', 'PathParameter', 'Post', 'Property', 'Put', 'RequestBody', 'Response', 'Schema', 'SecurityScheme', 'Server', 'ServerVariable', 'Tag', 'Trace', 'Xml', 'XmlContent', ]; $openApiAnnotations = []; foreach ($openApiAnnotationsRaw as $className) { $openApiAnnotations[] = new \Rector\Php80\ValueObject\AnnotationToAttribute( 'OpenApi\\Annotations\\' . $className, 'OpenApi\\Attributes\\' . $className ); } $services->set(AnnotationToAttributeRector::class) ->configure($openApiAnnotations); };