-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
lib:tcgcIssues for @azure-tools/typespec-client-generator-core libraryIssues for @azure-tools/typespec-client-generator-core library
Description
Context
We define the models like belowing:
model FooResource
is Azure.ResourceManager.ProxyResource<FooProperties> {
...ResourceNameParameter<
Resource = FooResource,
KeyName = "fooName",
SegmentName = "foos",
NamePattern = ""
>;
...Azure.ResourceManager.Foundations.ArmTagsProperty;
location?: string;
}
model FooProperties{
/** something */
something?: string;
}For C#, we use the hierarchyBuilding decorator to change the base type of FooResource from ProxyResource to TrackedResource:
@@Azure.ClientGenerator.Core.Legacy.hierarchyBuilding(FooResource, Azure.ResourceManager.Foundations.TrackedResource, "csharp");Issue
It reports warning: "@hierarchyBuilding decorator causes conflicts in inherited properties. Please check that the model ApplicationResource has the same properties as TrackedResource in the spec."
This happens because the decorator doesn't detect a tags property on FooResource, but TrackedResource has. Actually in our definition, the tags is provided via the envelope Azure.ResourceManager.Foundations.ArmTagsProperty, and the decorator currently does not honor the envelope semantics.
Expected Behavior
The hierarchyBuilding decorator should expand any envelopes when doing property check.
Copilot
Metadata
Metadata
Assignees
Labels
lib:tcgcIssues for @azure-tools/typespec-client-generator-core libraryIssues for @azure-tools/typespec-client-generator-core library