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

Ignore 3rd party libraries with a Filter #1044

Closed
sven5 opened this issue Feb 18, 2019 · 2 comments
Closed

Ignore 3rd party libraries with a Filter #1044

sven5 opened this issue Feb 18, 2019 · 2 comments

Comments

@sven5
Copy link

sven5 commented Feb 18, 2019

Hi,

I already asked this question on Stackoverflow but didn't get an appropriate answer.
My solutions uses 3rd party components that are exposing Web API endpoints. I have no control about this library so my question is how to set up a filter to ignore this library. I don't want to include this in any doc.

Currently the following exception is thrown:
NotSupportedException: Ambiguous HTTP method for action - DevExpress.AspNetCore.Reporting.QueryBuilder.QueryBuilderController.Invoke (DevExpress.AspNetCore.Reporting.v18.2). Actions require an explicit HttpMethod binding for Swagger 2.0

Edit: I already tried to use an OperationFilter but was unsuccessful because Apply doesn't get called for the 3rd party lib.

Thanks
Sven

@domaindrivendev
Copy link
Owner

You can configure a custom “DocInclusionPredicate” (see readme) to filter out ApiDescriptions for actions in a given namespace

@sven5
Copy link
Author

sven5 commented Feb 18, 2019

Thank you,

I got it working.

Regards
Sven

@sven5 sven5 closed this as completed Feb 18, 2019
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