diff --git a/MyApp.csproj b/MyApp.csproj index 85983f6..a37aaa4 100644 --- a/MyApp.csproj +++ b/MyApp.csproj @@ -8,6 +8,7 @@ + diff --git a/Program.cs b/Program.cs index 6189b36..d6362c2 100644 --- a/Program.cs +++ b/Program.cs @@ -1,8 +1,10 @@ +using Scalar.AspNetCore; + var builder = WebApplication.CreateBuilder(args); // Add services to the container. - builder.Services.AddControllers(); + // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi builder.Services.AddOpenApi(); @@ -12,12 +14,9 @@ var app = builder.Build(); if (app.Environment.IsDevelopment()) { app.MapOpenApi(); + app.MapScalarApiReference(); } -app.UseHttpsRedirection(); - app.UseAuthorization(); - app.MapControllers(); - app.Run();