The arguments are optional and not normally required
pull/23447/head
Jonathan 2021-10-04 18:40:58 +02:00 committed by GitHub
parent 9d3cea74ef
commit 9cc9deab33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -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 =>