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/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 1c9bc44..50c1a70 100644 --- a/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj +++ b/BrixelAPI.SpaceAPI/BrixelAPI.SpaceState.csproj @@ -9,16 +9,17 @@ - - - - - - - - + + + + + + + + + - + 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..01a0e6e 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 93a9739..ffa86a0 100644 --- a/SpaceAPI.Test/SpaceAPI.Test.csproj +++ b/SpaceAPI.Test/SpaceAPI.Test.csproj @@ -7,12 +7,12 @@ - - - - - - + + + + + + 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