Maple.Result.Extensions.AspNetCore
0.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Maple.Result.Extensions.AspNetCore --version 0.2.0
NuGet\Install-Package Maple.Result.Extensions.AspNetCore -Version 0.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Maple.Result.Extensions.AspNetCore" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Maple.Result.Extensions.AspNetCore" Version="0.2.0" />
<PackageReference Include="Maple.Result.Extensions.AspNetCore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Maple.Result.Extensions.AspNetCore --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Maple.Result.Extensions.AspNetCore, 0.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Maple.Result.Extensions.AspNetCore@0.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Maple.Result.Extensions.AspNetCore&version=0.2.0
#tool nuget:?package=Maple.Result.Extensions.AspNetCore&version=0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Maple.Result.Extensions.AspNetCore
Maps the Maple.Result to the HTTP response (ASP.NET Core version)
Project status: EARLY STAGE
Check also my library: Maple.Result
Give it a star ⭐
Do you like it? Show your support by giving this project a star!
Why❓
I decided to create a new implementation to address a few missing functionalities in other libraries (e.g., i18n, support for more precise error descriptions) and to better follow industry standards (RFC 9457).
Example Error Response
Example
{
"type": "https://example.com/probs/out-of-credit",
"status": 400,
"title": "You do not have enough credit.",
"detail": "Your current balance is 30, but that costs 50.",
"instance": "/accounts/12345/msgs/abc",
"errors": [
{
"pointer": "#/age",
"detail": "must be a positive integer",
"detailTemplate": {
"messageId":"user.details.age.mustBePositive"
}
},
{
"pointer": "#/profile/colour",
"detail": "must be ‘green’, ‘red’ or ‘blue’",
"detailTemplate": {
"messageId": "user.profile.colour",
"params": {
"validValueIds": [
"user.profile.colour.green",
"user.profile.colour.red",
"user.profile.colour.blue"
]
}
}
}
],
"detailTemplate": {
"messageId": "user.account.balance.tooLow",
"params": {
"errorCode": "UAB17",
"accounts": [
{
"title": "Main (***9456)",
"url": "/accounts/12345"
},
{
"title": "Main (***3357)",
"url": "/accounts/67890"
}
],
"currentBalance": 30,
"requiredBalance": 50
}
}
}
See also
- Problem Details for HTTP APIs - RFC 7807 is dead, long live RFC 9457
- tag URI scheme
- RFC 1738: Uniform Resource Locators (URL)
- RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
- RFC 4151: The 'tag' URI Scheme
- RFC 6901: JavaScript Object Notation (JSON) Pointer
- RFC 9457: Problem Details for HTTP APIs
Contribution
Please contact author: engineer(at sign)blumail(dot)me
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Maple.Result (>= 1.38.7)
-
net8.0
- Maple.Result (>= 1.38.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.