feat: Add support for ProblemDetails extensions #788
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Updates the ProblemDetails to support extensions to the spec. This behaves the same as the MS implementation of ProblemDetails extensions: https://github.com/aspnet/Mvc/blob/master/src/Microsoft.AspNetCore.Mvc.Core/ProblemDetails.cs#L62
This means additional properties on the response will be populated in the new Extensions property.
I have chosen to not change the behaviour of the Errors property in case it's a breaking change for other users.
What is the current behavior?
Extension problem details extension properties are ignored
What is the new behavior?
Extension properties on the problem details response are populated in to new property
What might this PR break?
It shouldn't cause any regressions with this being additive.
Please check if the PR fulfills these requirements
Other information:
If you'd like to discuss further I'm "syrus" on reactivex.slack.com