The documentation here says that IgnoreDataMemeber can be used to "Exclude properties from being listed in OpenAPI" however, IgnoreDataMember has much broader implications (e.g. if the code ever serializes that object, it will be ignored as well) as it causes that property to be ignored from all serialization. Is there any way to cause a property to only be ignored by the swagger documentation? [ExcludeInSchema] only removes it from the schema body.
The only attributes that control viisbility is the
[ApiMember(ExcludeInSchema=true)] to remove it from the schema and the
[ExcludeAttribute(Feature.Metadata)] attributes for removing a Type from all Metadata Services.
Anything else requires that you use one of the Filters on OpenApiFeature to customize the response as you wish.