Define a property of model with default value returns error in autorest & OAS3 emitter #4238
Closed
4 tasks done
Labels
Milestone
Describe the bug
model Test {
user: {
name: string;
} = #{ name: "System" };
}
returns error of 'Invalid type 'ObjectValue' for a default value' in cadl playground.
Reproduction
https://azure.github.io/typespec-azure/playground?c=Cgptb2RlbCBUZXN0IHsKCiAgdXNlcjogewogICAgbmFtZTogc3RyaW5nOwogIH0gPSAje8cXIlN5c3RlbSIgfTsKfQo%3D&e=%40azure-tools%2Ftypespec-autorest&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40azure-tools%2Ftypespec-azure-rulesets%2Fdata-plane%22%5D%7D%7D
Checklist
The text was updated successfully, but these errors were encountered: