Swashbuckle.AspNetCore
Swashbuckle.AspNetCore copied to clipboard
[Feature] Access to MemberInfo for properties of custom classes
I implemented my own ISchemaFilter for a class I created.
The public void Apply(OpenApiSchema schema, SchemaFilterContext context)
method is only called once for that type, for the type itself, and never for properties of that type. Thus, context.MemberInfo
is always null. Properties of that type then all share the same schema.
It would be nice if complex object properties, like my custom class, always had the filter applied to them. For example, strings can have custom descriptions and examples pulled from XML with the SwaggerGenOptions.IncludeXmlComments
method. Including that info for custom classes would be nice, since the object may be used in different ways depending on the class of which it is a property