Maple.Result.Extensions.AspNetCore
0.9.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.9.0
NuGet\Install-Package Maple.Result.Extensions.AspNetCore -Version 0.9.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.9.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.9.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.9.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Maple.Result.Extensions.AspNetCore, 0.9.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.9.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.9.0
#tool nuget:?package=Maple.Result.Extensions.AspNetCore&version=0.9.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 libraries:
- Maple.Result,
- <i>Maple.Result.Extensions.Functions.Worker</i> (coming soon),
- Maple.Result.Extensions.HttpClient.
Give it a star ⭐
Do you like it? Show your support by giving this project a star!
Status
✅ Basic mapping without configuration.
✅ Integration tests.
✅ Configuration passed as a parameter to the extension method.
✅ Support for global configuration.
✅ Support for multiple successful codes.
✅ Support for Created (201) with Location header.
🔲 Documentation.
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",
"detailTemplated": {
"messageId":"user.details.age.mustBePositive"
}
},
{
"pointer": "#/profile/colour",
"detail": "must be ‘green’, ‘red’ or ‘blue’",
"detailTemplated": {
"messageId": "user.profile.colour",
"params": {
"validValueIds": [
"user.profile.colour.green",
"user.profile.colour.red",
"user.profile.colour.blue"
]
}
}
}
],
"detailTemplated": {
"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 | 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 (>= 2.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.