From 122c37282d288f06b1785cf8a81d39f820c8a962 Mon Sep 17 00:00:00 2001 From: Wei Hu Date: Thu, 28 Sep 2023 16:10:38 +0800 Subject: [PATCH] Use origin instead of name fpr api-version update --- .../Mgmt/Decorator/Transformer/SubscriptionIdUpdater.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AutoRest.CSharp/Mgmt/Decorator/Transformer/SubscriptionIdUpdater.cs b/src/AutoRest.CSharp/Mgmt/Decorator/Transformer/SubscriptionIdUpdater.cs index 0bb28b9c5fb..e218eaf9e6f 100644 --- a/src/AutoRest.CSharp/Mgmt/Decorator/Transformer/SubscriptionIdUpdater.cs +++ b/src/AutoRest.CSharp/Mgmt/Decorator/Transformer/SubscriptionIdUpdater.cs @@ -27,8 +27,8 @@ public static void Update() p.Implementation = ImplementationLocation.Method; p.Schema.Type = AllSchemaTypes.String; } - // update the apiVersion parameter to be 'client' method - if (p.Language.Default.Name.Equals("apiVersion", StringComparison.OrdinalIgnoreCase)) + // update the apiVersion parameter to be 'client' parameter + if (p.Origin is not null && p.Origin.Equals("modelerfour:synthesized/api-version", StringComparison.OrdinalIgnoreCase)) { p.Implementation = ImplementationLocation.Client; }