I am using .NET CORE 3.1 web application and have setup swagger (Swashbuckle). I am trying to customize the swagger UI URL to be /abc/swagger
and below is the configuration I am trying -
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
c.RoutePrefix = "abc";
});
But I am getting this error -
and the UI works only on /abc
and not on /abc/swagger
. I am lost as this does not match with the doc I was trying to follow.
Can someone help me setup a custom route for the swagger UI, TIA.
Tried this https://stackoverflow.com/a/55732702/1182982 but didnt work for me, the URL return 404.