- Use Swashbuckle to get Swagger API documentation at
http(s)://website/swagger
- Disable online Swagger validation to fix validation error on swagger page: uncomment
c.DisableValidator()
inSwaggerConfig.cs
- Describe all enum values as string in swagger: uncomment
c.DescribeAllEnumsAsStrings()
inSwaggerConfig.cs
- Add to automated build/deployment pipeline: expect HTTP Status 200 for GET /swagger/ui/index
- Add to automated build/deployment pipeline: expect HTTP Status 200 for GET /swagger/docs/v1
- Add at end of
Application_Start()
inGlobal.asax.cs
:// Serialize enum values as description instead of integers in JSON. HttpConfiguration config = GlobalConfiguration.Configuration; config.Formatters.JsonFormatter.SerializerSettings.Converters.Add(new StringEnumConverter());
Out of scope of this document.