一、Swagger配置
发布时间:2020-12-16 23:26:53 所属栏目:百科 来源:网络整理
导读:一、Swagger配置 1、注解不显示 SwaggerConfig文件下 ? //c.IncludeXmlComments(GetXmlCommentsPath());?? 内下面添加: c.IncludeXmlComments(Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,@"binYDShengya_WebApi.xml")); 2、使用Swagger
一、Swagger配置1、注解不显示 SwaggerConfig文件下 ? //c.IncludeXmlComments(GetXmlCommentsPath());??内下面添加: c.IncludeXmlComments(Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,@"binYDShengya_WebApi.xml"));
2、使用Swagger 让某些接口不显示在文档 ?在Action 上加[ApiExplorerSettings(IgnoreApi = true)] [HttpGet] [ApiExplorerSettings(IgnoreApi = true)] public ActionResult Index(string appKey,string username ) { //todo }
3、 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |