From a750214b59aa6c0c6383e2d31f04c7b07f8d70cb Mon Sep 17 00:00:00 2001 From: John-Hart Date: Tue, 3 May 2016 13:56:51 -0700 Subject: [PATCH 1/3] Appended additional method names to the documentation for Parameter Groups --- AutoRest/Generators/Extensions/Extensions/Extensions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AutoRest/Generators/Extensions/Extensions/Extensions.cs b/AutoRest/Generators/Extensions/Extensions/Extensions.cs index 620a2d594c..1a4cd6b69d 100644 --- a/AutoRest/Generators/Extensions/Extensions/Extensions.cs +++ b/AutoRest/Generators/Extensions/Extensions/Extensions.cs @@ -410,13 +410,18 @@ public static void AddParameterGroups(ServiceClient serviceClient) parameterGroupType = new CompositeType { Name = parameterGroupName, - Documentation = "Additional parameters for the " + method.Name + " operation." + Documentation = "Additional parameters for these operations: " + method.Name }; generatedParameterGroups.Add(parameterGroupType); //Add to the service client serviceClient.ModelTypes.Add(parameterGroupType); } + else if (parameterGroupType.Documentation.IndexOf(method.Name) < 0) + //Append the additional method name to the documentation + { + parameterGroupType.Documentation += ", " + method.Name; + } foreach (Property property in parameterGroups[parameterGroupName].Keys) { From 4bf02538ca74cdcecb7e0cbac80103e1f85171c9 Mon Sep 17 00:00:00 2001 From: John-Hart Date: Tue, 3 May 2016 14:19:31 -0700 Subject: [PATCH 2/3] Added the missing StringComparison parameter --- AutoRest/Generators/Extensions/Extensions/Extensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoRest/Generators/Extensions/Extensions/Extensions.cs b/AutoRest/Generators/Extensions/Extensions/Extensions.cs index 1a4cd6b69d..89f8fbc84e 100644 --- a/AutoRest/Generators/Extensions/Extensions/Extensions.cs +++ b/AutoRest/Generators/Extensions/Extensions/Extensions.cs @@ -417,7 +417,7 @@ public static void AddParameterGroups(ServiceClient serviceClient) //Add to the service client serviceClient.ModelTypes.Add(parameterGroupType); } - else if (parameterGroupType.Documentation.IndexOf(method.Name) < 0) + else if (parameterGroupType.Documentation.IndexOf(method.Name, StringComparison.OrdinalIgnoreCase) < 0) //Append the additional method name to the documentation { parameterGroupType.Documentation += ", " + method.Name; From 699404573ff49cec48403a3fbda889467a3f8d5a Mon Sep 17 00:00:00 2001 From: John-Hart Date: Tue, 3 May 2016 14:51:43 -0700 Subject: [PATCH 3/3] Shorted the ParameterGroup documenation --- AutoRest/Generators/Extensions/Extensions/Extensions.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/AutoRest/Generators/Extensions/Extensions/Extensions.cs b/AutoRest/Generators/Extensions/Extensions/Extensions.cs index 89f8fbc84e..44b69bfea2 100644 --- a/AutoRest/Generators/Extensions/Extensions/Extensions.cs +++ b/AutoRest/Generators/Extensions/Extensions/Extensions.cs @@ -410,19 +410,13 @@ public static void AddParameterGroups(ServiceClient serviceClient) parameterGroupType = new CompositeType { Name = parameterGroupName, - Documentation = "Additional parameters for these operations: " + method.Name + Documentation = "Additional parameters for one or more operations" }; generatedParameterGroups.Add(parameterGroupType); //Add to the service client serviceClient.ModelTypes.Add(parameterGroupType); } - else if (parameterGroupType.Documentation.IndexOf(method.Name, StringComparison.OrdinalIgnoreCase) < 0) - //Append the additional method name to the documentation - { - parameterGroupType.Documentation += ", " + method.Name; - } - foreach (Property property in parameterGroups[parameterGroupName].Keys) { Property matchingProperty = parameterGroupType.Properties.FirstOrDefault(