NET Core 3.1 Web application with Swashbuckle.AspNetCore for swagger. I want to have a custom name added to both my swagger UI URL and swagger JSON URL. We have a proxy which redirects to different app based on URL, so I want to be able to identify this swagger URL is of my application and forward to it.
I am trying the below code
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/yasser-swagger/v1/swagger.json", "My API V1");
c.RoutePrefix = "yasser";
});
The swagger UI is able to load on https://localhost:6001/yasser which redirects to https://localhost:6001/yasser/index.html and shows Swagger UI
BUT, its throwing an error about not able to find the swagger.json file.
Any idea on how to get around this?
