1 instantiation of ValidationProblem
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
833return new(problemDetails);
19 references to ValidationProblem
Microsoft.AspNetCore.Http.Results (4)
TypedResults.cs (2)
811/// <returns>The created <see cref="HttpResults.ValidationProblem"/> for the response.</returns> 812public static ValidationProblem ValidationProblem(
ValidationProblem.cs (2)
23throw new ArgumentException($"{nameof(ValidationProblem)} only supports a 400 Bad Request response status code.", nameof(problemDetails)); 57var logger = loggerFactory.CreateLogger(typeof(ValidationProblem));
Microsoft.AspNetCore.Http.Results.Tests (7)
TypedResultsTests.cs (1)
1175var result = TypedResults.ValidationProblem(errors, detail, instance, title, type, extensions);
ValidationProblemResultTests.cs (6)
24var result = new ValidationProblem(details); 65ValidationProblem MyApi() { throw new NotImplementedException(); } 70PopulateMetadata<ValidationProblem>(((Delegate)MyApi).GetMethodInfo(), builder); 83var result = new ValidationProblem(new()); 94Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<ValidationProblem>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 95Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<ValidationProblem>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
Microsoft.AspNetCore.Identity (8)
IdentityApiEndpointRouteBuilderExtensions.cs (8)
57routeGroup.MapPost("/register", async Task<Results<Ok, ValidationProblem>> 206routeGroup.MapPost("/forgotPassword", async Task<Results<Ok, ValidationProblem>> 225routeGroup.MapPost("/resetPassword", async Task<Results<Ok, ValidationProblem>> 260accountGroup.MapPost("/2fa", async Task<Results<Ok<TwoFactorResponse>, ValidationProblem, NotFound>> 334accountGroup.MapGet("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 346accountGroup.MapPost("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 422private static ValidationProblem CreateValidationProblem(string errorCode, string errorDescription) => 427private static ValidationProblem CreateValidationProblem(IdentityResult result)