Swagger documentation added to my API but - how to prevent redirection to petstore example.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2020
01:12 PM
01-17-2020
01:12 PM
Swagger documentation added to my API but - how to prevent redirection to petstore example.
and it works great if you use
localhost:port/Swagger
however, if the user specifies
localHost:port/Swagger,
swagger defaults to the petstore example.
This looks bad. How can this be disabled.
aspnetcore 3.1 and
"Swashbuckle.AspNetCore" Version="5.0.0"
"Swashbuckle.AspNetCore.Swagger" Version="5.0.0"
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint(@"/swagger/v1/swagger.json", "Versioned API v1.0");
});
thanks
0 REPLIES 0
