Closed vidai-msft closed 5 months ago
@dolauli to provide RCA.
Getter of a property will auto create an object is by design. See https://github.com/Azure/autorest.powershell/blob/main/powershell/llcsharp/model/property.ts#L78-L79 for details. We can not make the change since it will break a lot of users. @vidai-msft, for Azure PowerShell circle reference issue, I think we could still follow your proposals. If any such issue is detected either through telemetry or others way, we should put related class(model) in the exception list.
A typical example is https://github.com/Azure/azure-powershell/blob/main/src/DataProtection/DataProtection.Autorest/generated/api/Models/Api20231201/InnerError.cs#L37. The EmbeddedInnerError will cause infinite loop when accessing its property value.