-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Closed
Copy link
Description
Update the code in the Web API sample projects to only use Swagger / Swagger UI when in the development environment.
Original
Lines 97 to 101 in a262b18
| app.UseSwagger() | |
| .UseSwaggerUI(c => | |
| { | |
| c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "eShopDashboard.API V1"); | |
| }); |
Update code
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}Metadata
Metadata
Assignees
Labels
No labels