Skip to content

Commit

Permalink
asyncapi#196 ExitCode test problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Senn Geerts authored and Senn Geerts committed Jul 13, 2024
1 parent 3d6c0ea commit 8a4f5c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions examples/StreetlightsAPI.TopLevelStatement/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@
app.UseRouting();
app.UseCors(configure => configure.AllowAnyOrigin().AllowAnyMethod());

// to be fixed with issue #173
#pragma warning disable ASP0014 // Suggest using top level route registrations instead of UseEndpoints
app.UseEndpoints(endpoints =>
{
endpoints.MapAsyncApiDocuments();
endpoints.MapAsyncApiUi();
endpoints.MapControllers();
});
#pragma warning restore ASP0014 // Suggest using top level route registrations instead of UseEndpoints

await app.StartAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
the AsyncAPI.Saunter.Generator.Cli tool can generate specs for projects targetting .NET6 and .NET8. -->
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>

<!-- ASP0014: Suggest using top level route registrations instead of UseEndpoints: to be fixed with issue #173 -->
<NoWarn>$(NoWarn);ASP0014</NoWarn>

<!-- Example settings for "AsyncAPI.Saunter.Generator.Build", they are all option though -->
<AsyncAPIGenerateDocumentsOnBuild>true</AsyncAPIGenerateDocumentsOnBuild>
Expand Down
2 changes: 2 additions & 0 deletions src/AsyncAPI.Saunter.Generator.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
var app = ConsoleApp.Create();
app.Add<ToFileCommand>();
app.Run(args);

Environment.ExitCode = 0;

0 comments on commit 8a4f5c6

Please sign in to comment.