OpSolutions.ConfigurationUi
1.0.0-beta2
See the version list below for details.
dotnet add package OpSolutions.ConfigurationUi --version 1.0.0-beta2
NuGet\Install-Package OpSolutions.ConfigurationUi -Version 1.0.0-beta2
<PackageReference Include="OpSolutions.ConfigurationUi" Version="1.0.0-beta2" />
paket add OpSolutions.ConfigurationUi --version 1.0.0-beta2
#r "nuget: OpSolutions.ConfigurationUi, 1.0.0-beta2"
// Install OpSolutions.ConfigurationUi as a Cake Addin #addin nuget:?package=OpSolutions.ConfigurationUi&version=1.0.0-beta2&prerelease // Install OpSolutions.ConfigurationUi as a Cake Tool #tool nuget:?package=OpSolutions.ConfigurationUi&version=1.0.0-beta2&prerelease
ConfigurationUI
ConfigurationUI is .Net library for managing Asp.Net Core configuration. <br>
It can parse configuration schema from arbitrary .Net type and generate web-page for displaying/editing configuration in
user-friendly manner. <br>
ConfigurationUI is fully integrated with with built-in asp.net core
configuration Microsoft.Extensions.Configuration
, so developers don't have to change existing code, just
continue using well-known patterns: OptionsMonitor<T>
, IConfiguration
, etc ...
Installation & Setup
Using ConfigurationUI is very simple, it is done in 4 steps:
- Install nuget package OpSolutions.ConfigurationUI
- Create class(es) for describing your application configuration (if not already have):
public class Settings { public string StringSetting { get; set; } public int IntegerSetting { get; set; } public bool BooleanSetting { get; set; } public SettingSubSection SettingsSubSection { get; set; } } public class SettingSubSection { public string StringSetting { get; set; } public MyEnum EnumSetting { get; set; } public bool BooleanSetting { get; set; } public string[] ArraySetting { get; set; } } public enum MyEnum { FirstValue, SecondValue }
- Modify Program.cs and insert
.AddConfigurationUi()
method call:public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .AddConfigurationUi<Settings>("settings.json") // insert this line .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }); }
- Modify
Startup.Configure
method and add configuration middleware withapp.UseConfigurationUi("/configuration")
:public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseConfigurationUi("/configuration"); // insert this line app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
It's done. Navigate to /configuration
in browser and you will see configuration editor page: <br> <br>
Important Notes
- Library does not support authorization out of box yet. Make sure to place some custom authorization/authentication
middleware before
app.UseConfigurationUi("/configuration");
so configuration endpoint will not be accessible to everyone - Currently web editor does not support or may not work as expected for following .Net types:
- Dictionaries
FlagsAttribute
decorated enums- Nullable value types
Any Contribution, Feature Request or Bug Report is welcome.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Configuration (>= 5.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 5.0.0)
- Microsoft.Extensions.Configuration.Json (>= 5.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 5.0.0)
- Newtonsoft.Json (>= 13.0.1)
- NJsonSchema (>= 10.5.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta9 | 185 | 9/23/2021 |
1.0.0-beta8 | 143 | 9/17/2021 |
1.0.0-beta7 | 163 | 9/16/2021 |
1.0.0-beta6 | 149 | 9/15/2021 |
1.0.0-beta5 | 159 | 9/15/2021 |
1.0.0-beta4 | 169 | 9/15/2021 |
1.0.0-beta3 | 176 | 9/15/2021 |
1.0.0-beta2 | 162 | 9/15/2021 |
1.0.0-beta | 149 | 9/14/2021 |