Skip to content

Commit

Permalink
Update CodeSnippetsReflection.OpenAPI/LanguageGenerators/PythonGenera…
Browse files Browse the repository at this point in the history
…tor.cs

Co-authored-by: Eastman <[email protected]>
  • Loading branch information
shemogumbe and andrueastman committed Apr 19, 2024
1 parent 246e6c5 commit 085cc0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static HashSet<string> 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.")}");
Expand Down

0 comments on commit 085cc0c

Please sign in to comment.