diff --git a/Abstractions/Abstractions.csproj b/Abstractions/Abstractions.csproj index 3a63532..17b910f 100644 --- a/Abstractions/Abstractions.csproj +++ b/Abstractions/Abstractions.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable diff --git a/Api/Api.csproj b/Api/Api.csproj index 62200cf..5d697fa 100644 --- a/Api/Api.csproj +++ b/Api/Api.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable W542.GandalfReborn @@ -9,18 +9,17 @@ - + - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + diff --git a/Api/Program.cs b/Api/Program.cs index 4851be8..f30aa6f 100644 --- a/Api/Program.cs +++ b/Api/Program.cs @@ -12,12 +12,9 @@ using W542.GandalfReborn.Data.Database.Repositories; var builder = WebApplication.CreateBuilder(args); -// Add services to the container. -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddSingleton(TimeProvider.System); builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); builder.Services.AddDbContext(cfg => cfg .UseNpgsql( builder.Configuration.GetConnectionString("DefaultConnection"), @@ -56,6 +53,7 @@ builder.Services.AddMediatR(config => { config.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly()); }); +builder.Services.AddOpenApi(); var app = builder.Build(); var scope = app.Services.CreateScope(); @@ -66,8 +64,7 @@ applicationContext.AddVersionTriggers(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); } app.UseHttpsRedirection(); diff --git a/Data/Data.csproj b/Data/Data.csproj index 56d3967..2230b73 100644 --- a/Data/Data.csproj +++ b/Data/Data.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable W542.GandalfReborn.Data @@ -9,10 +9,10 @@ - + - - + + diff --git a/Security/Security.csproj b/Security/Security.csproj index a2b46fe..df01195 100644 --- a/Security/Security.csproj +++ b/Security/Security.csproj @@ -1,15 +1,15 @@  - net8.0 + net9.0 enable enable - - + +