1. 程式人生 > >webapi幫助文檔swagger

webapi幫助文檔swagger

ger spa config文件 comment orm 描述 path 安裝 was

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

webapi幫助文檔swagger