Related to https://github.com/microsoft/kiota/issues/5263 Using the OpenApiFilter services does not copy all references in the original document resulting in some missing refs/invalid document. Taking a look at the visitor at https://github.com/microsoft/OpenAPI.NET/blob/9a5a41521a5650cfecdee799f23266fc5da8cff3/src/Microsoft.OpenApi/Services/CopyReferences.cs#L26 The only references/components copied over are of type schemas,parameters,requestBodies and responses. This leads to leaving out other components that could be referenced like examples/headers/callbacks from the components. See properties at https://github.com/microsoft/OpenAPI.NET/blob/vnext/src/Microsoft.OpenApi/Models/OpenApiComponents.cs#L14