Skip to content

Commit

Permalink
test: Fixed special-cases.yaml CLI test.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Aug 28, 2024
1 parent 442f238 commit c73b1aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/libs/OpenApiGenerator.Cli/Commands/GenerateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ private static async Task HandleAsync(

if (string.IsNullOrWhiteSpace(@namespace))
{
@namespace = name.ToPropertyName();
@namespace = name.ToPropertyName()
.UseWordSeparator('\\', '-', '.', '_', '/');
}
if (string.IsNullOrWhiteSpace(clientClassName))
{
clientClassName = $"{name.ToPropertyName()}Api";
clientClassName = $"{name.ToPropertyName()
.UseWordSeparator('\\', '-', '.', '_', '/')}Api";
}

var settings = new Settings(
Expand Down
7 changes: 5 additions & 2 deletions src/tests/OpenApiGenerator.IntegrationTests.Cli/CliTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ public class CliTests
[DataRow("ollama.yaml")]
[DataRow("openai.yaml")]
[DataRow("petstore.yaml")]
[DataRow("replicate.json")]
//[DataRow("special-cases.yaml")]
[DataRow("replicate.yaml")]
[DataRow("huggingface.yaml")]
[DataRow("ai21.yaml")]
[DataRow("cohere.yaml")]
[DataRow("special-cases.yaml")]
[DataRow("twitch.json")]
[DataRow("https://dedoose-rest-api.onrender.com/swagger/v1/swagger.json")]
public async Task Run(string spec)
Expand Down

0 comments on commit c73b1aa

Please sign in to comment.