Skip to content

Commit

Permalink
remove request builder imports - namespaces are enough
Browse files Browse the repository at this point in the history
  • Loading branch information
shemogumbe committed Mar 20, 2024
1 parent 2c91c7a commit 74150dc
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,6 @@ private static HashSet<string> GetImportStatements(SnippetModel snippetModel)
snippetImports.Add($"{modelImportPrefix};");
// check if model has a nested namespace and append it to the import statement
break;
case ImportKind.RequestBuilder:
if (!string.IsNullOrEmpty(import.ModelProperty.Name))
{
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;
case ImportKind.Path:
if (import.Path != null && import.RequestBuilderName != null)
{
Expand All @@ -158,7 +149,6 @@ private static HashSet<string> GetImportStatements(SnippetModel snippetModel)
break;
}
}

return snippetImports;
}
private static void WriteRequestExecutionPath(SnippetCodeGraph codeGraph, StringBuilder payloadSb, IndentManager indentManager)
Expand Down

0 comments on commit 74150dc

Please sign in to comment.