Utility code for working with ProblemDetails.
- HttpContentExtensions: extension methods for reading the HTTP content as a
ProblemDetails
- HttpResponseMessageExtensions: drop-in replacement for
EnsureSuccessStatusCode
that will throw aProblemDetailsException
- JsonProblemDetailsConverter: convenience class for serializing/deserializing
ProblemDetails
- ProblemDetailsExtensions: extension methods for
ProblemDetails
- GET, POST, PUT, DELETE extension methods that compliments / replaces System.Net.Http.Json.HttpClientJsonExtensions
Install package
Install-Package CcAcca.ProblemDetails.Helpers
To build and run tests you can use:
- the dotnet cli tool
- any IDE/editor that understands MSBuild eg Visual Studio or Visual Studio Code
- Develop on a feature branch created from master:
- create a branch from master.
- perform all the code changes into the newly created branch.
- merge master into your branch, then run tests locally (eg
dotnet test tests/CcAcca.ProblemDetails.Helpers.Tests
) - on the new branch, bump the version number in CcAcca.ProblemDetails.Helpers.csproj; follow semver
- update CHANGELOG.md
- raise the PR (pull request) for code review & merge request to master branch.
- PR will auto trigger a limited CI build (compile and test only)
- approval of the PR will merge your branch code changes into the master
Github actions is used to run the dotnet cli tool to perform the build and test. See the yaml build definition for details.
Notes:
- The CI build is configured to run on every commit to any branch
- PR completion to master will also publish the nuget package for CcAcca.ProblemDetails.Helpers to Nuget gallery