MPG, common model ManagedServiceIdentity
defers between typespec-azure
and azure-rest-api-specs
#2549
Labels
Mgmt
This issue is related to a management-plane library.
Network analytics:
https://github.com/Azure/azure-rest-api-specs/blob/f776434f63fb6505926273db8d4f9a93b75ee4a1/specification/networkanalytics/NetworkAnalytics.Management/main.tsp#L147
After spreading, it's a model decorated with
@armCommonDefinition
:https://github.com/Azure/typespec-azure/blob/ebfe63960277356c611f15b2404a0ae6f2d9e6ed/packages/typespec-azure-resource-manager/lib/arm.foundations.tsp#L363-L377
typespec-autorest
will generate it to refer to the common model:https://github.com/Azure/azure-rest-api-specs/blob/f776434f63fb6505926273db8d4f9a93b75ee4a1/specification/networkanalytics/resource-manager/Microsoft.NetworkAnalytics/stable/2023-11-15/networkanalytics.json#L1617
Their name and properties defer:
ManagedServiceIdentity
(swagger) vsManagedIdentityProperties
(tsp).ManagedIdentityProperties
has@armCommonDefinition
, maybe it can be solved by getting the decorator value.ManagedServiceIdentityType
(swagger) vsManagedIdentityType
(tsp)ManagedIdentityType
doesn't have@armCommonDefinition
on it.. This one's trickier.Potential solution
typespec-azure-resource-manager
to fix the mismatched model property(ManagedServiceIdentityType instead of ManagedIdentityType).Reason: Why define the model and its properties if it's properties are wrong?
Con: Each version(e.g. v4, v5) may have common models different from each other.
Reason: Totally align with current swagger.
Con: Needs more effort. Do we want to implement it ourselves? Or do we do it in TCGC?
Reason: Easiest way.
Con: same as 1.
The text was updated successfully, but these errors were encountered: