Hide cmsapi from Swagger

Jim Piller asked on February 14, 2023 15:02

Hello,

I have inherited an old version of a Kentico 10 site (10.0.51) and we have some API controllers in our project. We have installed Swagger to document the end points and it's picking up the "/cmsapi/" end points as well. Is there any way to hide the "/cmsapi/" route from Swagger? Has anyone come across this?

Thanks

Recent Answers


Not Applicable answered on February 15, 2023 14:03

In Swagger you can customize the document output by adding c.DocumentFilter<CustomFilter>(); to .EnableSwagger(c => { }). The CustomFilter class must implement IDocumentFilter.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.