diff --git a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerHostGenerator.cs b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerHostGenerator.cs index b49b9ada..7796df9c 100644 --- a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerHostGenerator.cs +++ b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerHostGenerator.cs @@ -290,7 +290,8 @@ public void MaintainGlobalUsings( $"{projectName}.Extensions", $"{projectName}.Generated", $"{projectName}.Options", - $"{projectName}".Replace(".Api", ".Domain", StringComparison.Ordinal), + domainProjectName, + $"{domainProjectName}.Extensions", }; GlobalUsingsHelper.CreateOrUpdate( diff --git a/src/Atc.Rest.ApiGenerator/Helpers/GenerateHelper.cs b/src/Atc.Rest.ApiGenerator/Helpers/GenerateHelper.cs index e62a5cd3..97dac50b 100644 --- a/src/Atc.Rest.ApiGenerator/Helpers/GenerateHelper.cs +++ b/src/Atc.Rest.ApiGenerator/Helpers/GenerateHelper.cs @@ -133,8 +133,8 @@ public static bool GenerateServerSln( ArgumentNullException.ThrowIfNull(srcPath); var projectName = projectPrefixName - .Replace(" ", ".", StringComparison.Ordinal) - .Replace("-", ".", StringComparison.Ordinal) + .Replace(' ', '.') + .Replace('-', '.') .Trim(); var rootPath = outputSlnPath.EndsWith(".sln", StringComparison.OrdinalIgnoreCase) diff --git a/src/Atc.Rest.ApiGenerator/Models/BaseProjectOptions.cs b/src/Atc.Rest.ApiGenerator/Models/BaseProjectOptions.cs index 7dff6154..4de23d27 100644 --- a/src/Atc.Rest.ApiGenerator/Models/BaseProjectOptions.cs +++ b/src/Atc.Rest.ApiGenerator/Models/BaseProjectOptions.cs @@ -48,12 +48,12 @@ protected BaseProjectOptions( RouteBase = openApiDocument.GetServerUrlBasePath(); ProjectName = string.IsNullOrEmpty(projectSuffixName) ? projectPrefixName - .Replace(" ", ".", StringComparison.Ordinal) - .Replace("-", ".", StringComparison.Ordinal) + .Replace(' ', '.') + .Replace('-', '.') .Trim() : projectPrefixName - .Replace(" ", ".", StringComparison.Ordinal) - .Replace("-", ".", StringComparison.Ordinal) + .Replace(' ', '.') + .Replace('-', '.') .Trim() + $".{projectSuffixName}"; ProjectPrefixName = ProjectName.Contains('.', StringComparison.Ordinal)