Conversation
…json for centralized configuration and update project files to link and load settings.
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces an initial tenant configuration system (TenantSettings) intended to centralize tenant-specific/white-label settings and make them available across hosts.
Changes:
- Added
TenantSettingsmodel + validation/DI wiring viaAddTenantSettings. - Introduced a shared
appsettings.TenantSettings.jsonand wired it into MobileUI (embedded) and WebAPI (copied + loaded). - Added unit tests covering configuration binding and validation scenarios.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Application.UnitTests/Common/Configuration/TenantSettingsTests.cs | Adds unit tests for binding + validation (currently includes an invalid test expectation). |
| src/WebAPI/WebAPI.csproj | Links shared tenant settings JSON into WebAPI output (publish handling needs attention). |
| src/WebAPI/Program.cs | Loads appsettings.TenantSettings.json into configuration before DI setup. |
| src/MobileUI/MobileUI.csproj | Embeds shared tenant settings JSON as an assembly resource. |
| src/MobileUI/MauiProgram.cs | Loads embedded JSON into configuration and registers TenantSettings. |
| src/Common/Configuration/appsettings.TenantSettings.json | Adds the initial default tenant settings payload. |
| src/Common/Configuration/TenantSettingsExtensions.cs | Adds DI registration + manual validation helpers for TenantSettings. |
| src/Common/Configuration/TenantSettings.cs | Adds the TenantSettings configuration model with nested sections. |
| src/Application/ConfigureServices.cs | Registers TenantSettings as part of Application service registration. |
| src/AdminUI/AdminUI.csproj | Copies shared tenant settings JSON into wwwroot for AdminUI. |
tests/Application.UnitTests/Common/Configuration/TenantSettingsTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Member
|
The settings structure looks, I'm just wondering if they should be in the DB? That way we can make minor adjustments (mostly for AdminUI but to limited extend MobileUI). |
Member
|
I believe this is just a first step and that this config will be in DB later down the tracks, is that it @zacharykeeping ? |
Member
Author
|
I've updated this to move the handling to the DB. This is just the core structure for now - will be expanded in future PBIs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1485
Adds a core tenant config system, to be expanded in future PBIs.
No