How to omit methods from Swagger documentation on WebAPI using Swashbuckle

前端 未结 10 937
不思量自难忘°
不思量自难忘° 2020-11-30 19:38

I have a C# ASP.NET WebAPI application with API documentation being automatically generated using Swashbuckle. I want to be able to omit certain methods fr

10条回答
  •  情话喂你
    2020-11-30 20:15

    Add this on top of your Methods that you want to omit-

    [ApiExplorerSettings(IgnoreApi=true)]
    

提交回复
热议问题