Skip to main content

RA.Utilities.Data.Entities

· 2 min read
Redon Alla
.NET, React, Angular Developer

Version 10.0.0-rc.2

NuGet version

This is the initial release of RA.Utilities.Data.Entities, a library providing core abstractions for data models.

RA.Utilities.Feature

· 2 min read
Redon Alla
.NET, React, Angular Developer

Version 10.0.0-rc.2

NuGet version

This release modernizes the RA.Utilities.Feature package, providing a foundational toolkit for implementing the Vertical Slice Architecture pattern using CQRS. It offers base handlers, validation behaviors, and seamless integration with the Result<T> type to streamline feature development.

RA.Utilities.Logging.Shared

· One min read
Redon Alla
.NET, React, Angular Developer

Version 10.0.0-rc.2

NuGet version

This release modernizes the RA.Utilities.Integrations package, providing a robust and repeatable pattern for managing external API integrations. It centralizes configuration, simplifies registration, and improves resilience with built-in retry policies.

RA.Utilities.Logging.Core

· One min read
Redon Alla
.NET, React, Angular Developer

Version 10.0.0-rc.2

NuGet version

  • Initial release of the core logging package.
  • Provides AddRaSerilog extension method for opinionated Serilog configuration.
  • Includes setup for Console and File sinks with asynchronous support.
  • Integrates enrichers for exceptions and sensitive data redaction out of the box.

RA.Utilities.Integrations

· One min read
Redon Alla
.NET, React, Angular Developer

Version 10.0.0-rc.2

NuGet version

This is the initial preview release of the RA.Utilities.Integrations package. It provides a standardized and resilient way to manage HTTP client integrations in .NET applications.

RA.Utilities.OpenApi

· 3 min read
Redon Alla
.NET, React, Angular Developer

NuGet version

This release of RA.Utilities.OpenApi provides a robust set of tools to enhance and customize OpenAPI (Swagger) documentation in ASP.NET Core applications. It automates common modifications to your generated OpenAPI specification, reducing boilerplate and enforcing consistency.

✨ Key Features

  • DocumentInfoTransformer: Populates the top-level info object of your OpenAPI document (title, version, description, etc.) directly from your appsettings.json configuration, allowing you to update documentation details without code changes.

  • BearerSecuritySchemeTransformer: Automatically adds a "Bearer" security scheme to your OpenAPI document when JWT authentication is detected, enabling the "Authorize" button in Swagger UI for testing protected endpoints.

  • HeadersParameterTransformer: Adds common, configurable headers (like x-request-id) to every API operation, ensuring consistent documentation for tracing and correlation in distributed systems.

  • ResponsesDocumentTransformer: Automatically adds standardized OpenAPI responses for common HTTP status codes (400, 404, 409, 500), using schema models from RA.Utilities.Api.Results to ensure your error contracts are clearly documented.

  • Simplified Setup: Includes an AddDefaultsDocumentTransformer() extension method to register the most common transformers (DocumentInfo, BearerSecurityScheme, and HeadersParameter) with a single line of code.

  • Configuration-Driven: All transformers are configurable via appsettings.json using strongly-typed settings classes (OpenApiInfoSettings, HeadersParameterSettings), keeping your application code clean and focused.

🚀 Getting Started

  1. Configure Settings: Add OpenApiInfoSettings and OpenApiHeaders sections to your appsettings.json.
  2. Register Services: In Program.cs, configure the settings classes:
    builder.Services.Configure<OpenApiInfoSettings>(builder.Configuration.GetSection(OpenApiInfoSettings.AppSettingsKey));
    builder.Services.Configure<HeadersParameterSettings>(builder.Configuration.GetSection("OpenApiHeaders"));
  3. Add Transformers: Use the extension methods to register the transformers:
    builder.Services.AddOpenApi()
    .AddDefaultsDocumentTransformer(); // Adds Info, Bearer, and Headers transformers

    // Register other transformers individually
    builder.Services.AddOpenApiDocumentTransformer<ResponsesDocumentTransformer>();
  4. Map Endpoints: Finally, map the OpenAPI endpoints in your request pipeline:
    app.MapOpenApi();