/*********************************************************************** * Project: baifenBinfa.Net * * Web: https://baifenBinfa.com * * ProjectName: 百分兵法管理系统 * * Author: * * Email: * * CreateTime: 2020-03-15 20:42:29 * Description: 暂无 ***********************************************************************/ using Microsoft.AspNetCore.Mvc.ApplicationModels; namespace CoreCms.Net.Web.WebApi.Infrastructure { public class ApiExplorerIgnores : IActionModelConvention { /// /// 自带的Controller与swagger3.0冲突,在此排除扫描 /// /// public void Apply(ActionModel action) { //冲突的Ocelot.Raft.RaftController if (action.Controller.ControllerName == ("WxOfficialOAuth") || action.Controller.ControllerName == ("WxOpenOAuth")) action.ApiExplorer.IsVisible = false; //Ocelot.Cache.OutputCacheController if (action.Controller.ControllerName == ("AliPay")) action.ApiExplorer.IsVisible = false; if (action.Controller.ControllerName == ("WeChatPay")) action.ApiExplorer.IsVisible = false; } } }