Extension of Swashbuckle for ASP.NET MVC4
- Pull Source Code & Build Project:
git clone git@github.com:qinyuanpei/Swashbuckle.Extension.Mvc.git
- Add Reference To Your Project:
using Swashbuckle.Extension.Mvc;
- Replace
IApiExplore
inGlobal.asax.cs
:
var assembly = typeof(DefaultMvcProject.MvcApplication).Assembly;
var apiExplorer = new MvcApiExplorer(assembly, GlobalConfiguration.Configuration);
GlobalConfiguration.Configuration.Services.Replace(typeof(IApiExplorer), apiExplorer);
-
Add
SwaggerConfig.cs
inApp_Start
. See more details at Swashbuckle.WebApi: -
Enjoy Swagger in ASP.NET MVC :)