From 092ca0b4b542f4fae8cb784e243381daf9f910da Mon Sep 17 00:00:00 2001 From: Matthias Gernand Date: Tue, 13 Dec 2022 10:50:21 +0100 Subject: [PATCH] Reduced JSON configuration section nesting. (#68) --- .../Example.Infrastructure.csproj | 1 - .../AuthenticationModule.cs | 3 +- .../ConfigurationSectionUtil.cs | 29 ------- .../ConfigureOptionsContributorBase.cs | 2 +- ...a.Extensions.Hosting.Modules.Domain.csproj | 2 +- .../TenantOptions.cs | 2 +- .../HostBuilderExtensions.cs | 3 +- ...les.Persistence.EntityFrameworkCore.csproj | 2 +- ...osting.Modules.Persistence.InMemory.csproj | 2 +- ....Hosting.Modules.Persistence.LiteDB.csproj | 2 +- ...Hosting.Modules.Persistence.MongoDB.csproj | 2 +- ...ensions.Hosting.Modules.Persistence.csproj | 4 +- .../appsettings.json | 86 +++++++++---------- .../appsettings.json | 16 ++-- .../appsettings.json | 28 +++--- .../appsettings.json | 7 +- .../appsettings.json | 8 +- .../appsettings.json | 7 +- .../appsettings.json | 32 +++---- .../appsettings.json | 14 ++- .../appsettings.json | 12 +-- .../appsettings.json | 8 +- .../appsettings.json | 4 - .../appsettings.json | 14 ++- .../appsettings.json | 8 +- .../appsettings.json | 8 +- .../appsettings.json | 27 +++--- .../appsettings.json | 14 ++- .../appsettings.json | 8 +- .../appsettings.json | 22 ++--- .../appsettings.json | 7 +- 31 files changed, 133 insertions(+), 251 deletions(-) delete mode 100644 src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigurationSectionUtil.cs diff --git a/samples/Example.Infrastructure/Example.Infrastructure.csproj b/samples/Example.Infrastructure/Example.Infrastructure.csproj index ba8b72a1..07924790 100644 --- a/samples/Example.Infrastructure/Example.Infrastructure.csproj +++ b/samples/Example.Infrastructure/Example.Infrastructure.csproj @@ -23,7 +23,6 @@ - diff --git a/src/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication/AuthenticationModule.cs b/src/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication/AuthenticationModule.cs index 4bfe05ed..c7dca291 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication/AuthenticationModule.cs +++ b/src/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication/AuthenticationModule.cs @@ -1,7 +1,6 @@ namespace Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication { using Fluxera.Extensions.DependencyInjection; - using Fluxera.Extensions.Hosting.Modules.Configuration; using JetBrains.Annotations; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Configuration; @@ -20,7 +19,7 @@ public override void PreConfigureServices(IServiceConfigurationContext context) // Add the authentication services. AuthenticationBuilder builder = context.Log("AddAuthentication", services => { - IConfigurationSection section = context.Configuration.GetSection(ConfigurationSectionUtil.GetSectionName("AspNetCore:Authentication")); + IConfigurationSection section = context.Configuration.GetSection("AspNetCore:Authentication"); AuthenticationOptions authenticationOptions = section.Get(); return services.AddAuthentication(options => diff --git a/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigurationSectionUtil.cs b/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigurationSectionUtil.cs deleted file mode 100644 index 2d0f0bcb..00000000 --- a/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigurationSectionUtil.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Fluxera.Extensions.Hosting.Modules.Configuration -{ - using Fluxera.Guards; - using JetBrains.Annotations; - - /// - /// Utility class that helps getting the correct section name. - /// - [PublicAPI] - public static class ConfigurationSectionUtil - { - /// - /// The prefix for every modules configuration section. - /// - public const string ModuleSectionNamePrefix = "Hosting:Modules"; - - /// - /// Gets the configuration section for the given module. - /// - /// - /// - public static string GetSectionName(string moduleSectionName) - { - Guard.Against.NullOrWhiteSpace(moduleSectionName, nameof(moduleSectionName)); - - return $"{ModuleSectionNamePrefix}:{moduleSectionName}"; - } - } -} diff --git a/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigureOptionsContributorBase.cs b/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigureOptionsContributorBase.cs index 21e0efe5..661dffe8 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigureOptionsContributorBase.cs +++ b/src/Fluxera.Extensions.Hosting.Modules.Configuration/ConfigureOptionsContributorBase.cs @@ -17,7 +17,7 @@ public abstract class ConfigureOptionsContributorBase : IConfigureOpti public void Configure(IServiceConfigurationContext context) { string optionsTypeName = typeof(TOptions).Name; - IConfigurationSection section = context.Configuration.GetSection(ConfigurationSectionUtil.GetSectionName(this.SectionName)); + IConfigurationSection section = context.Configuration.GetSection(this.SectionName); TOptions options = section.Get() ?? new TOptions(); // Configure as IOptions diff --git a/src/Fluxera.Extensions.Hosting.Modules.Domain/Fluxera.Extensions.Hosting.Modules.Domain.csproj b/src/Fluxera.Extensions.Hosting.Modules.Domain/Fluxera.Extensions.Hosting.Modules.Domain.csproj index a1d941bd..5f32d2d7 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Domain/Fluxera.Extensions.Hosting.Modules.Domain.csproj +++ b/src/Fluxera.Extensions.Hosting.Modules.Domain/Fluxera.Extensions.Hosting.Modules.Domain.csproj @@ -26,7 +26,7 @@ - + all diff --git a/src/Fluxera.Extensions.Hosting.Modules.MultiTenancy/TenantOptions.cs b/src/Fluxera.Extensions.Hosting.Modules.MultiTenancy/TenantOptions.cs index eeb4a23d..27abad05 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.MultiTenancy/TenantOptions.cs +++ b/src/Fluxera.Extensions.Hosting.Modules.MultiTenancy/TenantOptions.cs @@ -14,7 +14,7 @@ public sealed class TenantOptions /// public TenantOptions() { - this.Enabled = false; + this.Enabled = true; this.Mode = MultiTenancyMode.DatabasePerTenant; } diff --git a/src/Fluxera.Extensions.Hosting.Modules.OpenTelemetry/HostBuilderExtensions.cs b/src/Fluxera.Extensions.Hosting.Modules.OpenTelemetry/HostBuilderExtensions.cs index 1f6d6036..53de56dd 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.OpenTelemetry/HostBuilderExtensions.cs +++ b/src/Fluxera.Extensions.Hosting.Modules.OpenTelemetry/HostBuilderExtensions.cs @@ -1,7 +1,6 @@ namespace Fluxera.Extensions.Hosting.Modules.OpenTelemetry { using System; - using Fluxera.Extensions.Hosting.Modules.Configuration; using global::OpenTelemetry.Logs; using JetBrains.Annotations; using Microsoft.Extensions.Configuration; @@ -24,7 +23,7 @@ public static IHostBuilder AddOpenTelemetryLogging(this IHostBuilder builder, Ac { return builder.ConfigureLogging((context, loggingBuilder) => { - IConfigurationSection section = context.Configuration.GetSection(ConfigurationSectionUtil.GetSectionName("OpenTelemetry")); + IConfigurationSection section = context.Configuration.GetSection("OpenTelemetry"); OpenTelemetryOptions telemetryOptions = section.Get() ?? new OpenTelemetryOptions(); loggingBuilder.AddOpenTelemetry(loggerOptions => diff --git a/src/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore.csproj b/src/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore.csproj index e9d42e68..3413d35d 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore.csproj +++ b/src/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore/Fluxera.Extensions.Hosting.Modules.Persistence.EntityFrameworkCore.csproj @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory.csproj b/src/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory.csproj index 8866e808..6ee674bb 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory.csproj +++ b/src/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory/Fluxera.Extensions.Hosting.Modules.Persistence.InMemory.csproj @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB.csproj b/src/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB.csproj index 4d64f5fe..aecf7c16 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB.csproj +++ b/src/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB/Fluxera.Extensions.Hosting.Modules.Persistence.LiteDB.csproj @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB.csproj b/src/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB.csproj index 8aab6494..4718a40a 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB.csproj +++ b/src/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB/Fluxera.Extensions.Hosting.Modules.Persistence.MongoDB.csproj @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Fluxera.Extensions.Hosting.Modules.Persistence/Fluxera.Extensions.Hosting.Modules.Persistence.csproj b/src/Fluxera.Extensions.Hosting.Modules.Persistence/Fluxera.Extensions.Hosting.Modules.Persistence.csproj index f2ec2de5..d0b5db4f 100644 --- a/src/Fluxera.Extensions.Hosting.Modules.Persistence/Fluxera.Extensions.Hosting.Modules.Persistence.csproj +++ b/src/Fluxera.Extensions.Hosting.Modules.Persistence/Fluxera.Extensions.Hosting.Modules.Persistence.csproj @@ -25,8 +25,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication.UnitTests/appsettings.json index 16d1e3d7..b83fca0f 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Authentication.UnitTests/appsettings.json @@ -1,50 +1,46 @@ { - "Hosting": { - "Modules": { - "AspNetCore": { - "Authentication": { - "DefaultScheme": "ApiKey-Second", - "Schemes": { - "ApiKey": { - "Default": { - "Realm": "MyApiKeyRealm-1", - "KeyName": "X-MyKey-1" - }, - "Second": { - "Realm": "MyApiKeyRealm-2", - "KeyName": "X-MyKey-2" - } - }, - "Basic": { - "Default": { - "Realm": "MyBasicRealm-1" - }, - "Second": { - "Realm": "MyBasicRealm-2" - } - }, - "Cookies": { - "Default": { - "Cookie": { - "Name": "_MyAuthCookie_1" - } - }, - "Second": { - "Cookie": { - "Name": "_MyAuthCookie_2" - } - } - }, - "JwtBearer": { - "Default": { - "Authority": "MyAuthority-1", - "SigningKey": "MySigningKey-1" - }, - "Second": { - "Authority": "MyAuthority-2", - "SigningKey": "MySigningKey-2" - } + "AspNetCore": { + "Authentication": { + "DefaultScheme": "ApiKey-Second", + "Schemes": { + "ApiKey": { + "Default": { + "Realm": "MyApiKeyRealm-1", + "KeyName": "X-MyKey-1" + }, + "Second": { + "Realm": "MyApiKeyRealm-2", + "KeyName": "X-MyKey-2" + } + }, + "Basic": { + "Default": { + "Realm": "MyBasicRealm-1" + }, + "Second": { + "Realm": "MyBasicRealm-2" + } + }, + "Cookies": { + "Default": { + "Cookie": { + "Name": "_MyAuthCookie_1" } + }, + "Second": { + "Cookie": { + "Name": "_MyAuthCookie_2" + } + } + }, + "JwtBearer": { + "Default": { + "Authority": "MyAuthority-1", + "SigningKey": "MySigningKey-1" + }, + "Second": { + "Authority": "MyAuthority-2", + "SigningKey": "MySigningKey-2" } } } diff --git a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Cors.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Cors.UnitTests/appsettings.json index 7430872e..2dc6bf26 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Cors.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Cors.UnitTests/appsettings.json @@ -1,14 +1,10 @@ { - "Hosting": { - "Modules": { - "AspNetCore": { - "Cors": { - "Origins": [ - "http://localhost:5000", - "https://localhost:5001" - ] - } - } + "AspNetCore": { + "Cors": { + "Origins": [ + "http://localhost:5000", + "https://localhost:5001" + ] } } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.HttpApi.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.HttpApi.UnitTests/appsettings.json index b27989e5..a4522cc2 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.HttpApi.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.HttpApi.UnitTests/appsettings.json @@ -1,20 +1,16 @@ { - "Hosting": { - "Modules": { - "AspNetCore": { - "HttpApi": { - "Descriptions": { - "v1": { - "Version": "1.0", - "Title": "My API", - "Description": "This is my nice API." - }, - "v2": { - "Version": "2.0", - "Title": "My API", - "Description": "This is my nice API." - } - } + "AspNetCore": { + "HttpApi": { + "Descriptions": { + "v1": { + "Version": "1.0", + "Title": "My API", + "Description": "This is my nice API." + }, + "v2": { + "Version": "2.0", + "Title": "My API", + "Description": "This is my nice API." } } } diff --git a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Principal.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Principal.UnitTests/appsettings.json index 4951e2d4..e02cd1d4 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Principal.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.Principal.UnitTests/appsettings.json @@ -1,8 +1,3 @@ { - "Hosting": { - "Modules": { - "HttpPrincipal": { - } - } - } + "HttpPrincipal": {} } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.UnitTests/appsettings.json index e98e5cef..3d7a760c 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.AspNetCore.UnitTests/appsettings.json @@ -1,9 +1,5 @@ { - "Hosting": { - "Modules": { - "AspNetCore": { - "BaseUrl": "https://localhost:5001" - } - } + "AspNetCore": { + "BaseUrl": "https://localhost:5001" } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.AutoMapper.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.AutoMapper.UnitTests/appsettings.json index f19e7b31..86e1b7d8 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.AutoMapper.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.AutoMapper.UnitTests/appsettings.json @@ -1,8 +1,3 @@ { - "Hosting": { - "Modules": { - "AutoMapper": { - } - } - } + "AutoMapper": {} } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Caching.Redis.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Caching.Redis.UnitTests/appsettings.json index 362e3166..c3ef50ab 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Caching.Redis.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Caching.Redis.UnitTests/appsettings.json @@ -1,22 +1,18 @@ { - "Hosting": { - "Modules": { - "Caching": { - "MemoryCache": { - "AbsoluteExpiration": "12:00:00", - "AbsoluteExpirationRelativeToNow": "00:30:00", - "SlidingExpiration": "00:15:00" - }, - "DistributedCache": { - "AbsoluteExpiration": "12:00:00", - "AbsoluteExpirationRelativeToNow": "00:30:00", - "SlidingExpiration": "00:15:00" - }, - "Redis": { - "ConnectionStringName": "RedisServer", - "InstanceName": "RedisInstance", - } - }, + "Caching": { + "MemoryCache": { + "AbsoluteExpiration": "12:00:00", + "AbsoluteExpirationRelativeToNow": "00:30:00", + "SlidingExpiration": "00:15:00" + }, + "DistributedCache": { + "AbsoluteExpiration": "12:00:00", + "AbsoluteExpirationRelativeToNow": "00:30:00", + "SlidingExpiration": "00:15:00" + }, + "Redis": { + "ConnectionStringName": "RedisServer", + "InstanceName": "RedisInstance" } }, "ConnectionStrings": { diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Caching.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Caching.UnitTests/appsettings.json index 4f3b4beb..b4dc7ed4 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Caching.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Caching.UnitTests/appsettings.json @@ -1,13 +1,9 @@ { - "Hosting": { - "Modules": { - "Caching": { - "DistributedCache": { - "AbsoluteExpiration": "12:00:00", - "AbsoluteExpirationRelativeToNow": "00:30:00", - "SlidingExpiration": "00:15:00" - } - } + "Caching": { + "DistributedCache": { + "AbsoluteExpiration": "12:00:00", + "AbsoluteExpirationRelativeToNow": "00:30:00", + "SlidingExpiration": "00:15:00" } } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Configuration.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Configuration.UnitTests/appsettings.json index 59c03b48..79a5ed56 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Configuration.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Configuration.UnitTests/appsettings.json @@ -1,12 +1,6 @@ { - "Hosting": { - "AppName": "UnitTests", - "Version": "1.0.0", - "Modules": { - "Test": { - "Integer": 1, - "String": "Hello" - } - } + "Test": { + "Integer": 1, + "String": "Hello" } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.DataManagement.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.DataManagement.UnitTests/appsettings.json index e8f53da0..17300d22 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.DataManagement.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.DataManagement.UnitTests/appsettings.json @@ -1,13 +1,9 @@ { - "Hosting": { - "Modules": { - "DataManagement": { + "DataManagement": { - } - } }, "ConnectionStrings": { "Default": "localhost", - "Database": "server" + "Database": "server" } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Domain.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Domain.UnitTests/appsettings.json index dca188d7..7a73a41b 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Domain.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Domain.UnitTests/appsettings.json @@ -1,6 +1,2 @@ { - "Hosting": { - "Modules": { - } - } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.HttpClient.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.HttpClient.UnitTests/appsettings.json index 8563afbf..9de040a2 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.HttpClient.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.HttpClient.UnitTests/appsettings.json @@ -1,13 +1,9 @@ { - "Hosting": { - "Modules": { - "HttpClient": { - "RemoteServices": { - "Default": { - "BaseAddress": "https://localhost:5001/", - "Version": "v1" - } - } + "HttpClient": { + "RemoteServices": { + "Default": { + "BaseAddress": "https://localhost:5001/", + "Version": "v1" } } }, diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Localization.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Localization.UnitTests/appsettings.json index fa01da24..f4a6d168 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Localization.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Localization.UnitTests/appsettings.json @@ -1,9 +1,5 @@ { - "Hosting": { - "Modules": { - "Localization": { - "ResourcesPath": "Localizations" - } - } + "Localization": { + "ResourcesPath": "Localizations" } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Messaging.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Messaging.UnitTests/appsettings.json index 35211bda..cb681a29 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Messaging.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Messaging.UnitTests/appsettings.json @@ -1,9 +1,3 @@ { - "Hosting": { - "Modules": { - "Messaging": { - - } - } - } + "Messaging": {} } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.MultiTenancy.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.MultiTenancy.UnitTests/appsettings.json index ea0ac091..caedb478 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.MultiTenancy.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.MultiTenancy.UnitTests/appsettings.json @@ -1,21 +1,14 @@ { - "Hosting": { - "Modules": { - "Persistence": { - "Repositories": { - "Test": { - "ProviderName": "InMemory", - "DatabaseName": "database", - "DatabaseNamePrefix": "prefix", - "ConnectionStringName": "Default", - "Settings": { - "TestSetting": "TestValue" - }, - "MultiTenancy": { - "Enabled": true, - "Mode": "SingleDatabase" - } - } + "Persistence": { + "Repositories": { + "Test": { + "ProviderName": "InMemory", + "DatabaseName": "database", + "DatabaseNamePrefix": "prefix", + "ConnectionStringName": "Default", + "MultiTenancy": { + "Enabled": true, + "Mode": "SingleDatabase" } } } diff --git a/tests/Fluxera.Extensions.Hosting.Modules.ODataClient.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.ODataClient.UnitTests/appsettings.json index 8563afbf..9de040a2 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.ODataClient.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.ODataClient.UnitTests/appsettings.json @@ -1,13 +1,9 @@ { - "Hosting": { - "Modules": { - "HttpClient": { - "RemoteServices": { - "Default": { - "BaseAddress": "https://localhost:5001/", - "Version": "v1" - } - } + "HttpClient": { + "RemoteServices": { + "Default": { + "BaseAddress": "https://localhost:5001/", + "Version": "v1" } } }, diff --git a/tests/Fluxera.Extensions.Hosting.Modules.OpenTelemetry.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.OpenTelemetry.UnitTests/appsettings.json index a6b31b2f..34e593ef 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.OpenTelemetry.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.OpenTelemetry.UnitTests/appsettings.json @@ -1,9 +1,5 @@ { - "Hosting": { - "Modules": { - "OpenTelemetry": { - "Endpoint": "https://otlp-service:4317" - } - } + "OpenTelemetry": { + "Endpoint": "https://otlp-service:4317" } } \ No newline at end of file diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Persistence.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Persistence.UnitTests/appsettings.json index 3e5d43c2..ca1cdb9f 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Persistence.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Persistence.UnitTests/appsettings.json @@ -1,17 +1,13 @@ { - "Hosting": { - "Modules": { - "Persistence": { - "Repositories": { - "Test": { - "ProviderName": "InMemory", - "DatabaseName": "database", - "DatabaseNamePrefix": "prefix", - "ConnectionStringName": "Default", - "Settings": { - "TestSetting": "TestValue" - } - } + "Persistence": { + "Repositories": { + "Test": { + "ProviderName": "InMemory", + "DatabaseName": "database", + "DatabaseNamePrefix": "prefix", + "ConnectionStringName": "Default", + "Settings": { + "TestSetting": "TestValue" } } } diff --git a/tests/Fluxera.Extensions.Hosting.Modules.Principal.UnitTests/appsettings.json b/tests/Fluxera.Extensions.Hosting.Modules.Principal.UnitTests/appsettings.json index e60f0087..bbf54d93 100644 --- a/tests/Fluxera.Extensions.Hosting.Modules.Principal.UnitTests/appsettings.json +++ b/tests/Fluxera.Extensions.Hosting.Modules.Principal.UnitTests/appsettings.json @@ -1,8 +1,3 @@ { - "Hosting": { - "Modules": { - "Principal": { - } - } - } + "Principal": {} } \ No newline at end of file