Skip to content

Commit

Permalink
Merge pull request #205 from atc-net/feature/fix-missing-using-statement
Browse files Browse the repository at this point in the history
Feature/fix missing using statement
  • Loading branch information
davidkallesen authored Aug 13, 2024
2 parents a9da07f + 0da635e commit 9ccc3e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ public void MaintainGlobalUsings(
$"{projectName}.Extensions",
$"{projectName}.Generated",
$"{projectName}.Options",
$"{projectName}".Replace(".Api", ".Domain", StringComparison.Ordinal),
domainProjectName,
$"{domainProjectName}.Extensions",
};

GlobalUsingsHelper.CreateOrUpdate(
Expand Down
4 changes: 2 additions & 2 deletions src/Atc.Rest.ApiGenerator/Helpers/GenerateHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/Atc.Rest.ApiGenerator/Models/BaseProjectOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ccc3e8

Please sign in to comment.