Proper enum support for OpenAPI data source

I am quite pleased with the OpenAPI service generator in Radzen Blazor Studio. It is just that enums are generated as empty partial classes. So you have to manually go in and define them yourself, which is not only tedious, but also error prone.

I know that the OpenAPI standards support for enums is not perfect. The type of the field is always a primitive and the enum property lists all possible values for this field. This is fine if the enum type is string. But when it is integer, there is no mapping from the values to a string.

"MyOrderType": {
  "enum": [
    "Normal",
    "Express",
    "SelfPickup"
  ],
  "type": "string"
},
"MyOrderType": {
  "enum": [
    0,
    1,
    2
  ],
  "type": "integer",
  "format": "int32"
}

In the string case it would be very well possible to generate a proper enum. In the integer case, you could maybe generate enums with values like this:

enum MyOrderType {
    Value0 = 0,
    Value1 = 1,
    Value2 = 2,
}

I think this is still better than nothing.

Maybe you could make this opt-in, so you don't break people's code.