From a50954ee655c52797e1efc20e00717a2124ebb6e Mon Sep 17 00:00:00 2001 From: Jorge Rangel Date: Tue, 18 Jun 2024 16:53:37 -0500 Subject: [PATCH] chore: remove groupby from InputParameter --- .../src/InputTypes/InputParameter.cs | 3 --- .../Serialization/TypeSpecInputParameterConverter.cs | 5 +---- .../test/CSharpMethodCollectionTests.cs | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/InputParameter.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/InputParameter.cs index 6a4b8ff920..2cf23e001d 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/InputParameter.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/InputParameter.cs @@ -12,7 +12,6 @@ public InputParameter( InputType type, RequestLocation location, InputConstant? defaultValue, - InputParameter? groupedBy, InputOperationParameterKind kind, bool isRequired, bool isApiVersion, @@ -30,7 +29,6 @@ public InputParameter( Type = type; Location = location; DefaultValue = defaultValue; - GroupedBy = groupedBy; Kind = kind; IsRequired = isRequired; IsApiVersion = isApiVersion; @@ -49,7 +47,6 @@ public InputParameter( public InputType Type { get; } public RequestLocation Location { get; } public InputConstant? DefaultValue { get; } - public InputParameter? GroupedBy { get; } public InputOperationParameterKind Kind { get; } public bool IsRequired { get; } public bool IsApiVersion { get; } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/Serialization/TypeSpecInputParameterConverter.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/Serialization/TypeSpecInputParameterConverter.cs index c25971107b..bdbf16fd30 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/Serialization/TypeSpecInputParameterConverter.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.Input/src/InputTypes/Serialization/TypeSpecInputParameterConverter.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -33,7 +33,6 @@ public static InputParameter CreateInputParameter(ref Utf8JsonReader reader, str InputType? parameterType = null; string? location = null; InputConstant? defaultValue = null; - InputParameter? groupBy = null; string? kind = null; bool isRequired = false; bool isApiVersion = false; @@ -53,7 +52,6 @@ public static InputParameter CreateInputParameter(ref Utf8JsonReader reader, str || reader.TryReadWithConverter(nameof(InputParameter.Type), options, ref parameterType) || reader.TryReadString(nameof(InputParameter.Location), ref location) || reader.TryReadWithConverter(nameof(InputParameter.DefaultValue), options, ref defaultValue) - || reader.TryReadWithConverter(nameof(InputParameter.GroupedBy), options, ref groupBy) || reader.TryReadString(nameof(InputParameter.Kind), ref kind) || reader.TryReadBoolean(nameof(InputParameter.IsRequired), ref isRequired) || reader.TryReadBoolean(nameof(InputParameter.IsApiVersion), ref isApiVersion) @@ -94,7 +92,6 @@ public static InputParameter CreateInputParameter(ref Utf8JsonReader reader, str type: parameterType, location: requestLocation, defaultValue: defaultValue, - groupedBy: groupBy, kind: parameterKind, isRequired: isRequired, isApiVersion: isApiVersion, diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CSharpMethodCollectionTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CSharpMethodCollectionTests.cs index e4d12ee87d..20e283ab31 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CSharpMethodCollectionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp/test/CSharpMethodCollectionTests.cs @@ -76,7 +76,7 @@ public static IEnumerable DefaultCSharpMethodCollectionTestCases description: string.Empty, accessibility: null, parameters: [ - new InputParameter("message", "message", "The message to create.", new InputPrimitiveType(InputPrimitiveTypeKind.Boolean), RequestLocation.Body, null, null, InputOperationParameterKind.Method, true, false, false, false, false, false, false, null, null) + new InputParameter("message", "message", "The message to create.", new InputPrimitiveType(InputPrimitiveTypeKind.Boolean), RequestLocation.Body, null, InputOperationParameterKind.Method, true, false, false, false, false, false, false, null, null) ], responses: Array.Empty(), httpMethod: "GET",