the webapi system can host a swagger endpoint. instead of having to write /swagger, I'd like to simply redirect to the swagger page.
If I understand correctly, you want to display the swagger doc when using a browser and accessing the application root.
Create an MVC controller where the route in the root and redirect to swagger.
public class HomeController : Controller
{
[Route(""), HttpGet]
[ApiExplorerSettings(IgnoreApi = true)]
public RedirectResult Index()
{
return Redirect("/swagger/");
}
}