1 instantiation of ValidationProblem
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
868return new(problemDetails);
23 references to ValidationProblem
Microsoft.AspNetCore.Http.Results (6)
TypedResults.cs (4)
823/// <returns>The created <see cref="HttpResults.ValidationProblem"/> for the response.</returns> 824public static ValidationProblem ValidationProblem( 844/// <returns>The created <see cref="HttpResults.ValidationProblem"/> for the response.</returns> 846public 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 (9)
TypedResultsTests.cs (2)
1199var result = TypedResults.ValidationProblem(errors, detail, instance, title, type, extensions); 1225var result = TypedResults.ValidationProblem(errors, detail, instance, title, type, extensions);
ValidationProblemResultTests.cs (7)
24var result = new ValidationProblem(details); 54var result = new ValidationProblem(details); 97ValidationProblem MyApi() { throw new NotImplementedException(); } 102PopulateMetadata<ValidationProblem>(((Delegate)MyApi).GetMethodInfo(), builder); 115var result = new ValidationProblem(new()); 126Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<ValidationProblem>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0))); 127Assert.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>> 336accountGroup.MapGet("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 348accountGroup.MapPost("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 424private static ValidationProblem CreateValidationProblem(string errorCode, string errorDescription) => 429private static ValidationProblem CreateValidationProblem(IdentityResult result)