mattfrear/Swashbuckle.AspNetCore.Filters

Schema and Document filters stop working

PostImpatica opened this issue · 3 comments

using

"Swashbuckle.AspNetCore" Version="6.6.1" 
"Swashbuckle.AspNetCore.Annotations" Version="6.6.1" 
"Swashbuckle.AspNetCore.Filters" Version="8.0.2"

When I add
options.ExampleFilters();
My Schema and Document filters stop working. Is there a trick to get these to play nice? Like in your test examples, the OperationFilter I have continues working though.

Hmm, I dunno. Are you calling services.AddSwaggerExamplesFromAssemblyOf<MyExample>(); as per the Installation instructions in the Readme?

@mattfrear Yes, I did that before builder.Services.AddSwaggerGen.

options.ExampleFilters(); works fine, it is just that it breaks my existing Schema and Document filters but doesn't break my existing OperationFilter.

I don't know why my example filters would be breaking your schema and document filters - but, I have never used a schema or document filter.

I wonder, do you actually need my example filters? I don't use them any more, I use XML comment examples instead.