Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema and Document filters stop working #247

Open
PostImpatica opened this issue May 20, 2024 · 3 comments
Open

Schema and Document filters stop working #247

PostImpatica opened this issue May 20, 2024 · 3 comments

Comments

@PostImpatica
Copy link

PostImpatica commented May 20, 2024

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.

@mattfrear
Copy link
Owner

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

@PostImpatica
Copy link
Author

PostImpatica commented May 21, 2024

@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.

@mattfrear
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants