From 2c3f0c7ebb7719d547292b304902bfa54659c854 Mon Sep 17 00:00:00 2001 From: shemogumbe Date: Tue, 19 Mar 2024 22:45:52 +0300 Subject: [PATCH] fix dot to slash replacement --- .../LanguageGenerators/PhpGenerator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs b/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs index 52d7e4e59..ae68fb2db 100644 --- a/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs +++ b/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs @@ -144,9 +144,9 @@ private static HashSet GetImportStatements(SnippetModel snippetModel) case ImportKind.RequestBuilder: if (!string.IsNullOrEmpty(import.ModelProperty.Name)) { - var textInfo = System.Globalization.CultureInfo.CurrentCulture.TextInfo; - var namespaceParts = import.ModelProperty.NamespaceName.Split('.').Select(part => textInfo.ToTitleCase(part.ToLower())); - var importString = $"{requestBuilderImportPrefix}{string.Join("\\", namespaceParts)}\\{textInfo.ToTitleCase(import.ModelProperty.Name.ToLower())};"; + var namespaceParts = import.ModelProperty.NamespaceName.Split('.') + .Select(s => s.ToFirstCharacterUpperCase()).ToArray(); + var importString = $"{requestBuilderImportPrefix}{string.Join("\\", namespaceParts)}\\{import.ModelProperty.Name};"; snippetImports.Add(importString.Replace("\\Me\\", "\\Users\\Item\\")); } break;