I hava swagger generated by Swashbuckle from my WebApi service. It all looks fine in terms of types and so on..., however when I generate the proxy classes using Azure API App client it lacks the enum declarions. When I double-checked it was there in swagger but in resulting classes there was only a string representation of them (string property instead of enum property) and no declaration of enum type.
In the AutoREST release that is on GitHub (https://github.com/Azure/AutoRest) and will be included in a future Update of VS, we will at least put in the enum values as XML documentation comments. That way you get IntelliSense.
The reason we generally discourage enums is versioning reasons. If you want to support a new enum value on the server, it is a breaking change to the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With