18.0: Swagger Setup
Install and Setup Swagger
In this section, we set up Swagger, a tool that allows us to visualize all the endpoints of our API and easily test them.
In Visual Studio, go to Tools -> NuGet Package Manager -> Package Manager Console
Make sure ElevenNote.WebAPI is set as the default project
Type
install-package swashbuckle
Triple check that your default project is ElevenNote.WebAPI before you hit enter, my selection kept jumping to Models
Hit Enter
When it's finished installing, close the Package Manager Console
Go to ElevenNote.WebAPI -> App_Start -> SwaggerConfig.cs
Replace the entire contents of the file with this code.
Next, we'll test endpoints in Swagger.
Last updated