From 3dea17b00d83e07323f9260954d1452c699deb77 Mon Sep 17 00:00:00 2001 From: Berend Wouters Date: Tue, 17 Jun 2025 21:58:56 +0200 Subject: [PATCH 1/4] chore: update nuget package --- BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj | 2 +- SpaceAPI.Test/SpaceAPI.Test.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj index 1c9bc44..7c63825 100644 --- a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj +++ b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj @@ -9,7 +9,7 @@ - + diff --git a/SpaceAPI.Test/SpaceAPI.Test.csproj b/SpaceAPI.Test/SpaceAPI.Test.csproj index 93a9739..b4ad5ff 100644 --- a/SpaceAPI.Test/SpaceAPI.Test.csproj +++ b/SpaceAPI.Test/SpaceAPI.Test.csproj @@ -7,7 +7,7 @@ - + From bf587869a274b2f69c871d2ee30b9d602da04c84 Mon Sep 17 00:00:00 2001 From: Berend Wouters Date: Tue, 17 Jun 2025 22:19:22 +0200 Subject: [PATCH 2/4] chore: upgrade nuget packages --- BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj | 16 ++++++++-------- .../Properties/launchSettings.json | 12 ++++++++++++ SpaceAPI.Host/SpaceAPI.Host.csproj | 15 +++++++-------- SpaceAPI.Host/Startup.cs | 3 +-- SpaceAPI.Test/SpaceAPI.Test.csproj | 10 +++++----- 5 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 BrixelAPI.SpaceAPI/Properties/launchSettings.json diff --git a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj index 7c63825..4217c52 100644 --- a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj +++ b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj @@ -10,15 +10,15 @@ - - - - - - - + + + + + + + - + diff --git a/BrixelAPI.SpaceAPI/Properties/launchSettings.json b/BrixelAPI.SpaceAPI/Properties/launchSettings.json new file mode 100644 index 0000000..11c9ef6 --- /dev/null +++ b/BrixelAPI.SpaceAPI/Properties/launchSettings.json @@ -0,0 +1,12 @@ +{ + "profiles": { + "BrixelAPI.SpaceState": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:60676;http://localhost:60677" + } + } +} \ No newline at end of file diff --git a/SpaceAPI.Host/SpaceAPI.Host.csproj b/SpaceAPI.Host/SpaceAPI.Host.csproj index 460549f..1a4eece 100644 --- a/SpaceAPI.Host/SpaceAPI.Host.csproj +++ b/SpaceAPI.Host/SpaceAPI.Host.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -8,18 +8,17 @@ - - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + diff --git a/SpaceAPI.Host/Startup.cs b/SpaceAPI.Host/Startup.cs index e1ba4ef..e350cd8 100644 --- a/SpaceAPI.Host/Startup.cs +++ b/SpaceAPI.Host/Startup.cs @@ -1,6 +1,5 @@ using System.Reflection; using BrixelAPI.SpaceState; -using FluentValidation.AspNetCore; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Builder; @@ -93,7 +92,7 @@ public void ConfigureServices(IServiceCollection services) }); services.AddMvcCore() .AddApiExplorer(); - services.AddFluentValidationAutoValidation().AddFluentValidationClientsideAdapters(); + //services.AddValidatorsFromAssemblyContaining< ConfigureVerticals(services, Configuration); } diff --git a/SpaceAPI.Test/SpaceAPI.Test.csproj b/SpaceAPI.Test/SpaceAPI.Test.csproj index b4ad5ff..ffa86a0 100644 --- a/SpaceAPI.Test/SpaceAPI.Test.csproj +++ b/SpaceAPI.Test/SpaceAPI.Test.csproj @@ -8,11 +8,11 @@ - - - - - + + + + + From 19006a016b8525834703d78056c822b5ac476112 Mon Sep 17 00:00:00 2001 From: Berend Wouters Date: Tue, 17 Jun 2025 22:23:27 +0200 Subject: [PATCH 3/4] chore: replace FluentValidation.AspNetCore with DependencyInjection --- BrixelAPI.SpaceAPI/Bootstrapper.cs | 2 ++ BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj | 1 + SpaceAPI.Host/SpaceAPI.Host.csproj | 1 + SpaceAPI.Host/Startup.cs | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BrixelAPI.SpaceAPI/Bootstrapper.cs b/BrixelAPI.SpaceAPI/Bootstrapper.cs index 2f30fff..e190bb3 100644 --- a/BrixelAPI.SpaceAPI/Bootstrapper.cs +++ b/BrixelAPI.SpaceAPI/Bootstrapper.cs @@ -1,5 +1,6 @@ using BrixelAPI.SpaceState.Features.UpdateState; using BrixelAPI.SpaceState.Infrastructure; +using FluentValidation; using MediatR; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; @@ -19,6 +20,7 @@ public static void Configure(IServiceCollection serviceCollection, IConfiguratio serviceCollection.AddDbContext(options => options.UseSqlServer(configuration.GetConnectionString("SpaceAPIConnection"))); + serviceCollection.AddValidatorsFromAssemblyContaining(); } } } diff --git a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj index 4217c52..50c1a70 100644 --- a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj +++ b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj @@ -11,6 +11,7 @@ + diff --git a/SpaceAPI.Host/SpaceAPI.Host.csproj b/SpaceAPI.Host/SpaceAPI.Host.csproj index 1a4eece..2a7e1ea 100644 --- a/SpaceAPI.Host/SpaceAPI.Host.csproj +++ b/SpaceAPI.Host/SpaceAPI.Host.csproj @@ -9,6 +9,7 @@ + all diff --git a/SpaceAPI.Host/Startup.cs b/SpaceAPI.Host/Startup.cs index e350cd8..01a0e6e 100644 --- a/SpaceAPI.Host/Startup.cs +++ b/SpaceAPI.Host/Startup.cs @@ -92,7 +92,7 @@ public void ConfigureServices(IServiceCollection services) }); services.AddMvcCore() .AddApiExplorer(); - //services.AddValidatorsFromAssemblyContaining< + //services.AddValidatorsFromAssemblyContaining < ConfigureVerticals(services, Configuration); } From 09330c492669507f913dc0247e653d648f198e5b Mon Sep 17 00:00:00 2001 From: Berend Wouters Date: Tue, 17 Jun 2025 22:26:55 +0200 Subject: [PATCH 4/4] test: update testsrunner --- .github/workflows/test.yml | 2 +- SpaceAPI.Host/SpaceAPI.Host.csproj | 1 - SpaceAPI.sln | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12c8215..09d396d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Test run: dotnet test --verbosity normal --logger "trx;LogFileName=test-results.trx" - name: Test Reporter diff --git a/SpaceAPI.Host/SpaceAPI.Host.csproj b/SpaceAPI.Host/SpaceAPI.Host.csproj index 2a7e1ea..1a4eece 100644 --- a/SpaceAPI.Host/SpaceAPI.Host.csproj +++ b/SpaceAPI.Host/SpaceAPI.Host.csproj @@ -9,7 +9,6 @@ - all diff --git a/SpaceAPI.sln b/SpaceAPI.sln index ff80d86..9ccfdb9 100644 --- a/SpaceAPI.sln +++ b/SpaceAPI.sln @@ -12,6 +12,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}" ProjectSection(SolutionItems) = preProject docker-compose.yml = docker-compose.yml + .github\workflows\test.yml = .github\workflows\test.yml EndProjectSection EndProject Global