我正在开发一个 Web MVC 项目,我希望在其中有一些供外部应用程序使用的 api Controller 。
我的 API Controller 上有 ApiController
属性。
不幸的是,Swashbuckle 接管了所有 Controller / Action 。
有没有办法告诉它只查找 Api Controller ?
谢谢。
最佳答案
你可以把它放在你想对 Swashbuckle 隐藏的 Controller 中
[ApiExplorerSettings(IgnoreApi = true)]
public class UserController : Controller
关于c# - 告诉 Swashbuckle 只查找具有 ApiControllerAttribute 的 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56377359/