diff --git a/src/Fusion.Resources.Functions.Common/Fusion.Resources.Functions.Common.csproj b/src/Fusion.Resources.Functions.Common/Fusion.Resources.Functions.Common.csproj index 49ab0d6b1..ecd364778 100644 --- a/src/Fusion.Resources.Functions.Common/Fusion.Resources.Functions.Common.csproj +++ b/src/Fusion.Resources.Functions.Common/Fusion.Resources.Functions.Common.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Fusion.Summary.Api/Fusion.Summary.Api.csproj b/src/Fusion.Summary.Api/Fusion.Summary.Api.csproj index 0a9d61b22..993f08fd3 100644 --- a/src/Fusion.Summary.Api/Fusion.Summary.Api.csproj +++ b/src/Fusion.Summary.Api/Fusion.Summary.Api.csproj @@ -13,35 +13,33 @@ - + - - - - + + + - - - + + - - - - - + + + + + - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Fusion.Summary.Api/Program.cs b/src/Fusion.Summary.Api/Program.cs index 4a7192148..9c2ca4d8a 100644 --- a/src/Fusion.Summary.Api/Program.cs +++ b/src/Fusion.Summary.Api/Program.cs @@ -23,11 +23,11 @@ builder.AddKeyVault(); } -var azureAdClientId = builder.Configuration["AzureAd:ClientId"]; +var azureAdClientId = builder.Configuration["AzureAd:ClientId"] ?? throw new InvalidOperationException("Missing AzureAd:ClientId"); var azureAdClientSecret = builder.Configuration["AzureAd:ClientSecret"]; var certThumbprint = builder.Configuration["Config:CertThumbprint"]; -var environment = builder.Configuration["Environment"]; -var fusionEnvironment = builder.Configuration["FUSION_ENVIRONMENT"]; +var environment = builder.Configuration["Environment"] ?? "Development"; +var fusionEnvironment = builder.Configuration["FUSION_ENVIRONMENT"] ?? "ci"; var databaseConnectionString = builder.Configuration.GetConnectionString(nameof(SummaryDbContext))!; builder.Services.AddControllers(); @@ -60,10 +60,10 @@ { f.AddFusionAuthorization(); f.UseServiceInformation("Fusion.Summary.Api", environment); - f.UseDefaultEndpointResolver(fusionEnvironment ?? "ci"); + f.UseDefaultEndpointResolver(fusionEnvironment); f.UseDefaultTokenProvider(opts => { - opts.ClientId = azureAdClientId ?? throw new InvalidOperationException("Missing AzureAd:ClientId"); + opts.ClientId = azureAdClientId; opts.ClientSecret = azureAdClientSecret; opts.CertificateThumbprint = certThumbprint; }); diff --git a/src/backend/Fusion.Resources.Authorization/Fusion.Resources.Authorization.csproj b/src/backend/Fusion.Resources.Authorization/Fusion.Resources.Authorization.csproj index 494ada828..38bf6eb71 100644 --- a/src/backend/Fusion.Resources.Authorization/Fusion.Resources.Authorization.csproj +++ b/src/backend/Fusion.Resources.Authorization/Fusion.Resources.Authorization.csproj @@ -12,8 +12,9 @@ PreserveNewest + - + diff --git a/src/backend/Fusion.Resources.Infrastructure/Fusion.Resources.Infrastructure.csproj b/src/backend/Fusion.Resources.Infrastructure/Fusion.Resources.Infrastructure.csproj index d649f9f74..79cab7879 100644 --- a/src/backend/Fusion.Resources.Infrastructure/Fusion.Resources.Infrastructure.csproj +++ b/src/backend/Fusion.Resources.Infrastructure/Fusion.Resources.Infrastructure.csproj @@ -7,12 +7,13 @@ - - + + + - - - + + + diff --git a/src/backend/api/Fusion.Resources.Api/Controllers/Personnel/InternalPersonnelController.cs b/src/backend/api/Fusion.Resources.Api/Controllers/Personnel/InternalPersonnelController.cs index e652d41d7..d04cfff94 100644 --- a/src/backend/api/Fusion.Resources.Api/Controllers/Personnel/InternalPersonnelController.cs +++ b/src/backend/api/Fusion.Resources.Api/Controllers/Personnel/InternalPersonnelController.cs @@ -18,6 +18,7 @@ namespace Fusion.Resources.Api.Controllers [ApiController] [ApiVersion("1.0-preview")] [ApiVersion("1.0")] + [ApiVersion("2.0")] public partial class InternalPersonnelController : ResourceControllerBase { diff --git a/src/backend/api/Fusion.Resources.Api/Controllers/Requests/AnalyticsController.cs b/src/backend/api/Fusion.Resources.Api/Controllers/Requests/AnalyticsController.cs index 7d64819b2..12e76b872 100644 --- a/src/backend/api/Fusion.Resources.Api/Controllers/Requests/AnalyticsController.cs +++ b/src/backend/api/Fusion.Resources.Api/Controllers/Requests/AnalyticsController.cs @@ -14,6 +14,7 @@ namespace Fusion.Resources.Api.Controllers { [ApiVersion("1.0-preview")] [ApiVersion("1.0")] + [ApiVersion("2.0")] [Authorize] [ApiController] public class AnalyticsController : ResourceControllerBase @@ -44,6 +45,7 @@ public async Task>> GetPersonsAbsence([FromQuery] ODataQueryParams query) { diff --git a/src/backend/api/Fusion.Resources.Api/Fusion.Resources.Api.csproj b/src/backend/api/Fusion.Resources.Api/Fusion.Resources.Api.csproj index 98ea6d587..b4812d649 100644 --- a/src/backend/api/Fusion.Resources.Api/Fusion.Resources.Api.csproj +++ b/src/backend/api/Fusion.Resources.Api/Fusion.Resources.Api.csproj @@ -11,39 +11,36 @@ + + - - - - - - - - - - - - - + + + + + + + + + + + - + - - - - - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/backend/api/Fusion.Resources.Api/Startup.cs b/src/backend/api/Fusion.Resources.Api/Startup.cs index e7b22b035..37fce88f2 100644 --- a/src/backend/api/Fusion.Resources.Api/Startup.cs +++ b/src/backend/api/Fusion.Resources.Api/Startup.cs @@ -23,6 +23,7 @@ using Microsoft.Extensions.Hosting; using SixLabors.ImageSharp; using System.Reflection; +using Fusion.AspNetCore.Versioning; namespace Fusion.Resources.Api { @@ -58,7 +59,7 @@ public void ConfigureServices(IServiceCollection services) s.ReportApiVersions = true; s.AssumeDefaultVersionWhenUnspecified = true; s.DefaultApiVersion = new Microsoft.AspNetCore.Mvc.ApiVersion(1, 0); - s.ApiVersionReader = new Fusion.AspNetCore.Mvc.Versioning.HeaderOrQueryVersionReader("api-version"); + s.ApiVersionReader = new HeaderOrQueryVersionReader("api-version"); }); services.AddHttpContextAccessor(); diff --git a/src/backend/api/Fusion.Resources.Application/Fusion.Resources.Application.csproj b/src/backend/api/Fusion.Resources.Application/Fusion.Resources.Application.csproj index 87c165680..25743785f 100644 --- a/src/backend/api/Fusion.Resources.Application/Fusion.Resources.Application.csproj +++ b/src/backend/api/Fusion.Resources.Application/Fusion.Resources.Application.csproj @@ -6,10 +6,10 @@ - - - - + + + + diff --git a/src/backend/api/Fusion.Resources.Database/Fusion.Resources.Database.csproj b/src/backend/api/Fusion.Resources.Database/Fusion.Resources.Database.csproj index af751439a..a1caa516c 100644 --- a/src/backend/api/Fusion.Resources.Database/Fusion.Resources.Database.csproj +++ b/src/backend/api/Fusion.Resources.Database/Fusion.Resources.Database.csproj @@ -7,13 +7,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/backend/api/Fusion.Resources.Domain/Fusion.Resources.Domain.csproj b/src/backend/api/Fusion.Resources.Domain/Fusion.Resources.Domain.csproj index 4eee602ef..d5a428afd 100644 --- a/src/backend/api/Fusion.Resources.Domain/Fusion.Resources.Domain.csproj +++ b/src/backend/api/Fusion.Resources.Domain/Fusion.Resources.Domain.csproj @@ -6,15 +6,14 @@ - - - - - + + + + - - - + + + diff --git a/src/backend/tests/Fusion.Resources.Api.Tests/Fusion.Resources.Api.Tests.csproj b/src/backend/tests/Fusion.Resources.Api.Tests/Fusion.Resources.Api.Tests.csproj index 0f0188b89..ddf7f2e13 100644 --- a/src/backend/tests/Fusion.Resources.Api.Tests/Fusion.Resources.Api.Tests.csproj +++ b/src/backend/tests/Fusion.Resources.Api.Tests/Fusion.Resources.Api.Tests.csproj @@ -22,9 +22,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -32,7 +32,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/backend/tests/Fusion.Resources.Domain.Tests/Fusion.Resources.Domain.Tests.csproj b/src/backend/tests/Fusion.Resources.Domain.Tests/Fusion.Resources.Domain.Tests.csproj index 3b2f41785..5e06a62de 100644 --- a/src/backend/tests/Fusion.Resources.Domain.Tests/Fusion.Resources.Domain.Tests.csproj +++ b/src/backend/tests/Fusion.Resources.Domain.Tests/Fusion.Resources.Domain.Tests.csproj @@ -14,10 +14,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/backend/tests/Fusion.Resources.Functions.Tests/Fusion.Resources.Functions.Tests.csproj b/src/backend/tests/Fusion.Resources.Functions.Tests/Fusion.Resources.Functions.Tests.csproj index de22843f3..5330a4b2f 100644 --- a/src/backend/tests/Fusion.Resources.Functions.Tests/Fusion.Resources.Functions.Tests.csproj +++ b/src/backend/tests/Fusion.Resources.Functions.Tests/Fusion.Resources.Functions.Tests.csproj @@ -7,15 +7,15 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/backend/tests/Fusion.Resources.Logic.Tests/Fusion.Resources.Logic.Tests.csproj b/src/backend/tests/Fusion.Resources.Logic.Tests/Fusion.Resources.Logic.Tests.csproj index cd841747c..5aca3fc5e 100644 --- a/src/backend/tests/Fusion.Resources.Logic.Tests/Fusion.Resources.Logic.Tests.csproj +++ b/src/backend/tests/Fusion.Resources.Logic.Tests/Fusion.Resources.Logic.Tests.csproj @@ -11,9 +11,9 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/backend/tests/Fusion.Resources.Test.Core/Fusion.Resources.Test.Core.csproj b/src/backend/tests/Fusion.Resources.Test.Core/Fusion.Resources.Test.Core.csproj index 507f1b6b5..90528eb59 100644 --- a/src/backend/tests/Fusion.Resources.Test.Core/Fusion.Resources.Test.Core.csproj +++ b/src/backend/tests/Fusion.Resources.Test.Core/Fusion.Resources.Test.Core.csproj @@ -5,9 +5,9 @@ - - - + + + diff --git a/src/backend/tests/Fusion.Testing.Authentication/Fusion.Testing.Authentication.csproj b/src/backend/tests/Fusion.Testing.Authentication/Fusion.Testing.Authentication.csproj index 32effd02d..bd289437f 100644 --- a/src/backend/tests/Fusion.Testing.Authentication/Fusion.Testing.Authentication.csproj +++ b/src/backend/tests/Fusion.Testing.Authentication/Fusion.Testing.Authentication.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/src/backend/tests/Fusion.Testing.Core/Fusion.Testing.Core.csproj b/src/backend/tests/Fusion.Testing.Core/Fusion.Testing.Core.csproj index a2e84d19a..17309ac8e 100644 --- a/src/backend/tests/Fusion.Testing.Core/Fusion.Testing.Core.csproj +++ b/src/backend/tests/Fusion.Testing.Core/Fusion.Testing.Core.csproj @@ -6,10 +6,10 @@ - + - + diff --git a/src/backend/tests/Fusion.Testing.Mocks.ContextService/Fusion.Testing.Mocks.ContextService.csproj b/src/backend/tests/Fusion.Testing.Mocks.ContextService/Fusion.Testing.Mocks.ContextService.csproj index 6819b7e60..aa085d54e 100644 --- a/src/backend/tests/Fusion.Testing.Mocks.ContextService/Fusion.Testing.Mocks.ContextService.csproj +++ b/src/backend/tests/Fusion.Testing.Mocks.ContextService/Fusion.Testing.Mocks.ContextService.csproj @@ -5,10 +5,10 @@ - - - - + + + + diff --git a/src/backend/tests/Fusion.Testing.Mocks.LineOrgService/Fusion.Testing.Mocks.LineOrgService.csproj b/src/backend/tests/Fusion.Testing.Mocks.LineOrgService/Fusion.Testing.Mocks.LineOrgService.csproj index 551f1bbed..c323300f9 100644 --- a/src/backend/tests/Fusion.Testing.Mocks.LineOrgService/Fusion.Testing.Mocks.LineOrgService.csproj +++ b/src/backend/tests/Fusion.Testing.Mocks.LineOrgService/Fusion.Testing.Mocks.LineOrgService.csproj @@ -6,9 +6,9 @@ - - - + + + diff --git a/src/backend/tests/Fusion.Testing.Mocks.OrgService/Fusion.Testing.Mocks.OrgService.csproj b/src/backend/tests/Fusion.Testing.Mocks.OrgService/Fusion.Testing.Mocks.OrgService.csproj index 66df1c883..e822ee9d0 100644 --- a/src/backend/tests/Fusion.Testing.Mocks.OrgService/Fusion.Testing.Mocks.OrgService.csproj +++ b/src/backend/tests/Fusion.Testing.Mocks.OrgService/Fusion.Testing.Mocks.OrgService.csproj @@ -13,13 +13,13 @@ - - - - - - - + + + + + + + diff --git a/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Api/PersonsController.cs b/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Api/PersonsController.cs index 2c80dc61f..fa9fa300c 100644 --- a/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Api/PersonsController.cs +++ b/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Api/PersonsController.cs @@ -16,6 +16,8 @@ namespace Fusion.Testing.Mocks.ProfileService.Api { [ApiController] [ApiVersion("1.0")] + [ApiVersion("2.0")] + [ApiVersion("3.0")] public class PersonsController : ControllerBase { [MapToApiVersion("3.0")] diff --git a/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Fusion.Testing.Mocks.ProfileService.csproj b/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Fusion.Testing.Mocks.ProfileService.csproj index bfb5bf385..c7d10d8aa 100644 --- a/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Fusion.Testing.Mocks.ProfileService.csproj +++ b/src/backend/tests/Fusion.Testing.Mocks.ProfileService/Fusion.Testing.Mocks.ProfileService.csproj @@ -6,12 +6,12 @@ - - - - - - + + + + + + diff --git a/src/tests/Fusion.Summary.Api.Tests/Fusion.Summary.Api.Tests.csproj b/src/tests/Fusion.Summary.Api.Tests/Fusion.Summary.Api.Tests.csproj index 2a771144f..b4f1bf846 100644 --- a/src/tests/Fusion.Summary.Api.Tests/Fusion.Summary.Api.Tests.csproj +++ b/src/tests/Fusion.Summary.Api.Tests/Fusion.Summary.Api.Tests.csproj @@ -22,7 +22,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -31,10 +31,10 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive