Skip to content

Commit c73b1aa

Browse files
committed
test: Fixed special-cases.yaml CLI test.
1 parent 442f238 commit c73b1aa

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/libs/OpenApiGenerator.Cli/Commands/GenerateCommand.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ private static async Task HandleAsync(
9191

9292
if (string.IsNullOrWhiteSpace(@namespace))
9393
{
94-
@namespace = name.ToPropertyName();
94+
@namespace = name.ToPropertyName()
95+
.UseWordSeparator('\\', '-', '.', '_', '/');
9596
}
9697
if (string.IsNullOrWhiteSpace(clientClassName))
9798
{
98-
clientClassName = $"{name.ToPropertyName()}Api";
99+
clientClassName = $"{name.ToPropertyName()
100+
.UseWordSeparator('\\', '-', '.', '_', '/')}Api";
99101
}
100102

101103
var settings = new Settings(

src/tests/OpenApiGenerator.IntegrationTests.Cli/CliTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ public class CliTests
1212
[DataRow("ollama.yaml")]
1313
[DataRow("openai.yaml")]
1414
[DataRow("petstore.yaml")]
15-
[DataRow("replicate.json")]
16-
//[DataRow("special-cases.yaml")]
15+
[DataRow("replicate.yaml")]
16+
[DataRow("huggingface.yaml")]
17+
[DataRow("ai21.yaml")]
18+
[DataRow("cohere.yaml")]
19+
[DataRow("special-cases.yaml")]
1720
[DataRow("twitch.json")]
1821
[DataRow("https://dedoose-rest-api.onrender.com/swagger/v1/swagger.json")]
1922
public async Task Run(string spec)

0 commit comments

Comments
 (0)