Skip to content

Commit

Permalink
fix: attempt to fix swagger ui in app service
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvink96 committed Nov 17, 2024
1 parent a6d68eb commit 0644390
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions AdminHubApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,23 @@
var app = builder.Build();

app.UseSwagger();
app.UseSwaggerUI();

app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Web API V1");

if (app.Environment.IsDevelopment())
{
options.RoutePrefix = "swagger";
}
else
{
options.RoutePrefix = string.Empty;
}
});

app.UseSwagger();
// app.UseSwaggerUI(options =>
// {
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Web API V1");
//
// if (app.Environment.IsDevelopment())
// {
// options.RoutePrefix = "swagger";
// }
// else
// {
// options.RoutePrefix = string.Empty;
// }
// });
//
// app.UseSwagger();

// // Configure the HTTP request pipeline.
// if (app.Environment.IsDevelopment())
Expand Down

0 comments on commit 0644390

Please sign in to comment.