You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happened in common types but I believe this breaking would be a general issue for anonymous model when we migrate swagger to typespec. For case with below and here is the difference.
name given by M4 is AccessRulePropertiesSubscriptionsItem and the pattern is ${Modelname}${Propertyname}Item
name from tcgc is AccessRulePropertiesSubscription and the pattern is ${Modelname}${Singular(Propertyname)}
model AccessRuleProperties {
// ...
/** Subscriptions for inbound rules */
subscriptions?: {
/** The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000') */
id?: Azure.Core.armResourceIdentifier;
}[];
}
@allenjzhang I'd like to clarify from typespec ARM side, do we have any preference on how to avoid this breaking? Since anonymous model is not recommanded to use, do we plan to not use any anonymous models in common types?
Describe the bug
This happened in common types but I believe this breaking would be a general issue for anonymous model when we migrate swagger to typespec. For case with below and here is the difference.
AccessRulePropertiesSubscriptionsItem
and the pattern is${Modelname}${Propertyname}Item
AccessRulePropertiesSubscription
and the pattern is${Modelname}${Singular(Propertyname)}
The common types in typespec is here.
And relevant swagger definition is here.
Possible solutions
Reproduction
NA
Checklist
The text was updated successfully, but these errors were encountered: