Skip to main content

RA.Utilities.Api.Results

NuGet version Codecov GitHub license NuGet Downloads

RA.Utilities.Api.Results provides a standardized set of models for creating consistent API responses within the RA.Utilities ecosystem. This package includes generic wrappers for success, error, and validation failure scenarios, helping to streamline API development and improve client-side handling.

๐ŸŽฏ Purposeโ€‹

When building APIs, it's crucial to have a consistent and predictable response structure. This package provides a set of ready-to-use C# records that can be returned from your ASP.NET Core controller actions. These models ensure that every responseโ€”whether it's a success, a generic error, or a detailed validation failureโ€”has the same shape, making it easier for clients to parse and handle.

This library is designed to work seamlessly with the other RA.Utilities packages, such as RA.Utilities.Core.Constants for status codes and messages.

๐Ÿ› ๏ธ Installationโ€‹

You can install the package via the .NET CLI:

dotnet add package RA.Utilities.Api.Results

Or through the NuGet Package Manager console:

Install-Package RA.Utilities.Api.Results

Or through the NuGet Package Manager in Visual Studio.

๐Ÿ”— Dependenciesโ€‹