Namespace Codebelt.Extensions.AspNetCore.Text.Yaml.Formatters
Configure YAML formatting options and register exception response formatters in ASP.NET Core.
The Codebelt.Extensions.AspNetCore.Text.Yaml.Formatters namespace provides service collection extensions to configure YamlFormatterOptions and register HTTP exception response formatters that serialize errors to YAML. Use this namespace to customize YAML formatting behavior (naming conventions, sensitivity levels) and handle error responses.
Availability: .NET 10 and .NET 9
Start with: ServiceCollectionExtensions.AddYamlFormatterOptions to configure YAML formatting, or ServiceCollectionExtensions.AddYamlExceptionResponseFormatter to handle error responses.
When to use:
- Configure YAML formatter options (naming conventions, custom converters, sensitivity details) for the application
- Register YAML-based exception/failure formatters for HTTP error responses
- Customize how exceptions, problem details, and diagnostic information appear in YAML responses
Related: Codebelt.Extensions.AspNetCore.Text.Yaml · Codebelt.Extensions.AspNetCore.Text.Yaml.Converters · Codebelt.Extensions.YamlDotNet.Formatters
Extension Members
| Type | Ext | Methods |
|---|---|---|
| IServiceCollection | ⬇️ | AddYamlFormatterOptions, AddYamlExceptionResponseFormatter |
Classes
- ServiceCollectionExtensions
Extension methods for the IServiceCollection interface.