'Why are SwaggerResponse and SwaggerResponseExample complaining about HttpStatusCode?
Every example of SwaggerResponse and SwaggerResponseExample I found uses HttpStatusCode as is, but when I use it like this:
[SwaggerResponse(HttpStatusCode.BadRequest, Type = typeof(ErrorExample), Description = "Error details")]
[SwaggerResponseExample(HttpStatusCode.BadRequest, typeof(ErrorExample))]
I get a compiler error complaining that it cannot convert HttpStatusCode from the enum value to int. The only namespace that Visual Studio offers me for resolving the HttpStatusCode is System.Net. What am I doing wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
