Automatically generate comprehensive documentation for your .NET application configuration settings. Keep your 'appsettings.json' files documented, validated, and always up-to-date with JSON schemas, Markdown, and HTML documentation.
Install
| Product | Versions |
|---|---|
| .NET Standard |
README
TomsToolbox.Settings.Documentation.Abstractions
Provides attributes for documenting and configuring .NET application settings classes.
Overview
This package contains a set of attributes that help document configuration settings in .NET applications. These attributes work with configuration documentation generators to produce clear, structured documentation of your application's configuration options.
Attributes
SettingsSectionAttribute
Marks a class as settings class, and optionally specifies the configuration section name associated with the settings class.
[SettingsSection("MyApp")]
public class MyAppSettings
{
public string ApiUrl { get; set; }
}
SettingsIgnoreAttribute
Excludes a class or property from settings documentation.
public class Settings
{
public string DocumentedProperty { get; set; }
[SettingsIgnore]
public string InternalProperty { get; set; }
}
SettingsSecretAttribute
Marks properties containing sensitive data (passwords, API keys, etc.) to be masked in documentation.
public class DatabaseSettings
{
public string Server { get; set; }
[SettingsSecret]
public string Password { get; set; }
}
SettingsAddOptionsInvocatorAttribute
Identifies methods that register configuration options with the dependency injection container.
[SettingsAddOptionsInvocator]
public static void CustomAddOptions<T>(IServiceCollection services)
{
services.AddOptions<T>().BindConfiguration(typeof(T).Name);
}
Requirements
- .NET Standard 2.1 or higher
Related Packages
- TomsToolbox.Settings.Documentation.Builder - Runtime library for generating documentation
- TomsToolbox.Settings.Documentation.Analyzer - Roslyn analyzer for compile-time validation
License
MIT License
Part of the TomsToolbox library suite.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.