From b008aebf4cd8fc7148476f62888ed1b9042d3eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=96z=C3=A7elik?= Date: Tue, 17 Oct 2023 21:01:12 +0300 Subject: [PATCH 1/3] Tilda added to SpelledOutSymbols #3500 --- src/Kiota.Builder/Extensions/StringExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Kiota.Builder/Extensions/StringExtensions.cs b/src/Kiota.Builder/Extensions/StringExtensions.cs index 1f86c21a56..de3fb3509d 100644 --- a/src/Kiota.Builder/Extensions/StringExtensions.cs +++ b/src/Kiota.Builder/Extensions/StringExtensions.cs @@ -218,6 +218,7 @@ public static string CleanupSymbolName(this string? original) {'=', "Equal"}, {'>', "GreaterThan"}, {'?', "QuestionMark"}, + {'~', "Tilda" }, }; /// From 678c4784977df418d308e9787cb14a8e409dc64e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=96z=C3=A7elik?= Date: Thu, 19 Oct 2023 20:36:02 +0300 Subject: [PATCH 2/3] type fix and added unit tests #3500 --- src/Kiota.Builder/Extensions/StringExtensions.cs | 2 +- tests/Kiota.Builder.Tests/Writers/CSharp/CodeEnumWriterTests.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Extensions/StringExtensions.cs b/src/Kiota.Builder/Extensions/StringExtensions.cs index de3fb3509d..e903d3fe03 100644 --- a/src/Kiota.Builder/Extensions/StringExtensions.cs +++ b/src/Kiota.Builder/Extensions/StringExtensions.cs @@ -218,7 +218,7 @@ public static string CleanupSymbolName(this string? original) {'=', "Equal"}, {'>', "GreaterThan"}, {'?', "QuestionMark"}, - {'~', "Tilda" }, + {'~', "Tilde" }, }; /// diff --git a/tests/Kiota.Builder.Tests/Writers/CSharp/CodeEnumWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/CSharp/CodeEnumWriterTests.cs index ea3dfbcf27..592ebafdbf 100644 --- a/tests/Kiota.Builder.Tests/Writers/CSharp/CodeEnumWriterTests.cs +++ b/tests/Kiota.Builder.Tests/Writers/CSharp/CodeEnumWriterTests.cs @@ -85,6 +85,7 @@ public void NamesDontDiffer_DoesntWriteEnumMember() [InlineData("\\", "BackSlash")] [InlineData("?", "QuestionMark")] [InlineData("$", "Dollar")] + [InlineData("~", "Tilde")] [InlineData("double", "Double")] [InlineData("string", "String")] [InlineData("Invalid lorem’s", "InvalidLoremS")] From dee8ce21d157176aa3277bdef5b6731d452a78ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=96z=C3=A7elik?= Date: Thu, 19 Oct 2023 21:40:35 +0300 Subject: [PATCH 3/3] Update CHANGELOG.md #3500 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95917684bb..e6f0e3177d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changes to the configuration of RequestInformation are preserved instead of being overwritten. [#3401](https://github.com/microsoft/kiota/pull/3401). - Fix bug where import statements in typescript wasn't using import type notation for types that are erased at runtime. [#3190](https://github.com/microsoft/kiota/issues/3190) - The structured content type generation parameter now supports prioritization with `q=value` syntax. [#3377](https://github.com/microsoft/kiota/issues/3377) +- Fixed bug where `Tilde` char convert to Enum member name properly in C#. [#3500](https://github.com/microsoft/kiota/issues/3500) ## [1.7.0] - 2023-10-05