From 085cc0cddb11b102d8b16dfd900bd511d47e89ff Mon Sep 17 00:00:00 2001 From: Shem Ogumbe Date: Fri, 19 Apr 2024 12:07:09 +0300 Subject: [PATCH] Update CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs Co-authored-by: Eastman --- .../LanguageGenerators/PythonGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs b/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs index 8000bca92..4ca42749a 100644 --- a/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs +++ b/CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenerator.cs @@ -92,7 +92,7 @@ private static HashSet GetImportStatements(SnippetModel snippetModel) case ImportKind.Model: var typeDefinition = import.ModelProperty.TypeDefinition; if (typeDefinition != null){ - if(typeDefinition.EndsWith("RequestBody")){ + if(typeDefinition.EndsWith("RequestBody",StringComparison.OrdinalIgnoreCase)){ var namespaceParts = import.ModelProperty.NamespaceName.Split('.').Select((s, i) => i == import.ModelProperty.NamespaceName.Split('.').Length - 1 ? s.ToSnakeCase() : s.ToLowerInvariant()); var importString = $"{requestBuilderImportPrefix}.{string.Join(".", namespaceParts)}.{typeDefinition.ToSnakeCase()} import {typeDefinition}"; snippetImports.Add($"{importString.Replace(".me.", ".users.item.")}");