New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add overloads for validation problem results that accept IReadOnlyDictionary<string, string[]> #41899
Comments
Thanks for contacting us. We're moving this issue to the |
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Triage: Marking this as ready for API review. Once it is approved for API review, this would be a good candidate for |
API Review Notes:
API Approved! namespace Microsoft.AspNetCore.Http;
public static class Results
{
+ public static IResult ValidationProblem(IEnumerable<KeyValuePair<string, string[]>> errors,
+ string? detail = null,
+ string? instance = null,
+ int? statusCode = null,
+ string? title = null,
+ string? type = null,
+ IEnumerable<KeyValuePair<string, object?>>? extensions = null);
+ public static IResult Problem(
+ string? detail = null,
+ string? instance = null,
+ int? statusCode = null,
+ string? title = null,
+ string? type = null,
+ IEnumerable<KeyValuePair<string, object?>>? extensions = null);
}
public static class TypedResults
{
+ public static ValidationProblem ValidationProblem(IEnumerable<KeyValuePair<string, string[]>> errors,
+ string? detail = null,
+ string? instance = null,
+ string? title = null,
+ string? type = null,
+ IEnumerable<KeyValuePair<string, object?>>? extensions = null);
+ public static ProblemHttpResult Problem(
+ string? detail = null,
+ string? instance = null,
+ string? title = null,
+ string? type = null,
+ IEnumerable<KeyValuePair<string, object?>>? extensions = null);
} |
I'm trying to implement this proposal but I have some questions:
|
Sometimes all you have is a
IReadOnlyDictionary
and you don't want to have to downcast it or wrap it to pass it to the helper methods.The text was updated successfully, but these errors were encountered: