This article shows how to document your ASP.NET Core 1.0 MVC API using Swagger with Swashbuckle. Per default, it does not use your xml comments in the code and this needs to be configured if required.
2017.02.12 Updated to VS2017, msbuild and Swashbuckle.AspNetCore
2016.07.03 Updated to ASP.NET Core RTM
2016.06.04 Updated to ASP.NET Core RC2 dotnet
Step 1: Add the required NuGet packages to the dependencies in the project csproj file.
Step 2: Produce the .xml file which contains the xml comments when building. Click the produce outputs on build checkbox in your project file.
Or set the ProduceOutputsOnBuild property in the project csproj file.
Step 3: Configure Swashbuckle.SwaggerGen in the Startup class ConfigureServices method.
You need to define your path to the comments xml file, which can be found in the artifacts folder. This should be saved in a config file.
The ConfigureSwaggerDocument with OperationFilter method is…
View original post 51 more words