diff --git a/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/3.0/TodoApi.Swashbuckle/Startup2.cs b/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/3.0/TodoApi.Swashbuckle/Startup2.cs index 8606abf46e..aac4d3a240 100644 --- a/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/3.0/TodoApi.Swashbuckle/Startup2.cs +++ b/aspnetcore/tutorials/web-api-help-pages-using-swagger/samples/3.0/TodoApi.Swashbuckle/Startup2.cs @@ -26,12 +26,8 @@ namespace TodoApi // Enable middleware to serve generated Swagger as a JSON endpoint. app.UseSwagger(); - // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), - // specifying the Swagger JSON endpoint. - app.UseSwaggerUI(c => - { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); - }); + // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.) + app.UseSwaggerUI(); app.UseRouting(); app.UseEndpoints(endpoints =>