79727586

Date: 2025-08-06 16:37:13
Score: 0.5
Natty:
Report link

Based on both answers above, this is the minimum code I could get it to work on .NET 8.

//1. Add SwaggerUI
app.UseSwaggerUI(c =>
{
  c.RoutePrefix = "api/something/else/swagger";
});

//2. Set BasePath
app.UsePathBase("/api/something/else");

//3. Add Swagger
app.UseSwagger();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: user27465760