Can't specify non-nullable enums
I'm trying to require users to send an enum value as a parameter. I create an enum like the following and make it required. I was hoping this would make it not nullable. However, it still makes the enum settable to null (Kind? instead of Kind) which to users looks like they can send null. That is absolutely not true at least in this case. I'd assume requiring an enum means it shouldn't be nullable, but if we want to default to that, it would still be nice to have a property to specify that.
"kind": {
"type": "string",
"enum": [
"Xyz",
"Abc"
],
"x-ms-enum": {
"name": "Kind",
"modelAsString": false
}
}
Related issue: https://github.com/Azure/autorest/issues/375
Looks like the enum case was missed in that fix.
@emgerner-msft I've fixed the underlying issue in a branch (so Enums aren't getting nullable if it's a required field.) What you experienced was a side effect of something else.
If you'd like to test that I can send you private bits.
Fix promoted to master