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?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum