Merge pull request #32372 from dotnet/captainsafia-patch-1
Put Swagger UI behind an environment checkpull/32374/head
commit
b4ee3c601d
|
@ -28,10 +28,13 @@ namespace TodoApi
|
|||
|
||||
// Register the Swagger generator and the Swagger UI middlewares
|
||||
app.UseOpenApi();
|
||||
app.UseSwaggerUi3();
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwaggerUi3();
|
||||
}
|
||||
|
||||
app.UseMvc();
|
||||
}
|
||||
// </snippet_Configure>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue