Is there a way to display all enums as their string value in swagger instead of their int value?
I want to be able to submit POST actions and put enums according to
I just did this and it works fine!
Startup.cs
services.AddSwaggerGen(c => { c.DescribeAllEnumsAsStrings(); });
Model.cs
public enum ColumnType { DATE = 0 }
swagger.json
type: { enum: ["DATE"], type: "string" }
I hope this helps you how it helped me!