Open alser opened 1 week ago
Same issue on my side in this call of method IncludeXmlCommentsFromInheritDocs
:
List<XPathDocument> list = (from x in swaggerGenOptions.SchemaFilterDescriptors
where x.Type == typeof(XmlCommentsSchemaFilter)
select x.Arguments.Single()).Cast<XPathDocument>().ToList();
It's working with Swashbuckle 6.7.3, the question of course is, if it's a bug in that library or my bad understanding of the required setup.
I have compared the swaggerGenOptions.SchemaFilterDescriptors
content when using the 6.7.3 version and for the types XmlCommentsSchemaFilter
I can always see a populated Arguments
property.
It's working in Swashbuckle 6.7.3 for me too, and same code in my app was working since at least 6.5.0 with the same version of Unchase.Swashbuckle.AspNetCore.Extensions 2.7.1
I've reported this issue to Swashbuckle repo, to see if it's intended or not from their side https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/3081
Call to
IncludeXmlCommentsFromInheritDocs
fails with the exception below.Same behavior if supplied
XPathDocument
:In
Swashbuckle.AspNetCore
sources methodIncludeXmlComments
results in calling to:which in turn does this:
therefore creating
FilterDescriptor
withArguments = null
.Method
IncludeXmlCommentsFromInheritDocs
in this repo starts with:expecting to see single argument of type
XPathDocument
, but throwing ANE