builder.Services.AddControllers();
builder.Services.AddOpenApi();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
appsettings.json
"profiles": {
"http": {
..
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5172",
..
}
},