Blog Archive for September 8, 2016

Swagger and Enums in C#

September 8, 2016

By default, if you expose a service that has an Enum as a parameter, Swashbuckle will expose it using the index numbers of the enum in a dropdown. So in my case, given:

public enum TimeBasis { REALTIME, SLOW, FAST }

I got a droplist with 0, 1 and 2 …