Adds strongly typed IOptions<T> binding, with Fluent Validation and shared appsettings

- Adds strongly typed binding for IOptions<T> to map configuration sections from appsettings.json.
- Integrates FluentValidation for validating bound properties.
- Introduces appsettings.shared.json for shared configurations across applications.
Updates application-specific appsettings.json to focus on individual settings.
This commit is contained in:
BinaryAlley committed 2024-08-25 16:59:19 +03:00
1 parent b9dcb831e9
commit 433f0c2ad5
17 files changed
+383 -7

No files matched your search

+17 -5
View File
@@ -1,9 +1,21 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
"Serilog": {
"WriteTo": [
{
"Name": "Debug"
},
{
"Name": "Console"
},
{
"Name": "File",
"Args": {
"path": "Logs/lumina_api_.log",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}"
}
}
]
},
"AllowedHosts": "*"
}