Default doesn't do anything
I'm trying to set an enum to a default. I create the enum per the spec below. I've tried requiring and not requiring, but neither uses the default. Generating with and without the default seems to make difference at all.
"kind": {
"type": "string",
"default": "Xyz",
"enum": [
"Xyz",
"Abc"
],
"x-ms-enum": {
"name": "Kind",
"modelAsString": false
}
}
@emgerner-msft - Is this for parameter or model types? I think currently C# does not support defaults for Model Types. If this was a parameter in C# it should have worked. node.js supports defaults for models and parameters.
This is for a parameter. I can send the full spec to you privately to test if desired.
Sure. That would be great. Let me know the parameter and operationId to look for. Shall take a look.
Duplicate: https://github.com/Azure/autorest/issues/781