webapi帮助文档swagger

nuget安装Swashbuckle包

修改SwaggerConfig文件

    //c.IncludeXmlComments(GetXmlCommentsPath());
    //设置接口描述xml路径地址
    c.IncludeXmlComments(string.Format("{0}/bin/SwaggerDemo.XML", System.AppDomain.CurrentDomain.BaseDirectory));
给接口添加注释,即可看到参数及方法描述了
 
 
 
http://www.cnblogs.com/softidea/p/5728843.html
posted @ 2017-10-07 00:56  shiningrise  阅读(220)  评论(0编辑  收藏  举报