1 type derived from HttpValidationProblemDetails
Microsoft.AspNetCore.Mvc.Core (1)
ValidationProblemDetails.cs (1)
14public class ValidationProblemDetails : HttpValidationProblemDetails
29 instantiations of HttpValidationProblemDetails
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
HttpValidationProblemDetailsJsonConverterTest.cs (1)
17var problemDetails = new HttpValidationProblemDetails();
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsDefaultWriterTest.cs (2)
252var expectedProblem = new HttpValidationProblemDetails() 295var expectedProblem = new HttpValidationProblemDetails()
Microsoft.AspNetCore.Http.Results (2)
Results.cs (1)
802var problemDetails = new HttpValidationProblemDetails(errors)
TypedResults.cs (1)
857var problemDetails = new HttpValidationProblemDetails(errors)
Microsoft.AspNetCore.Http.Results.Tests (23)
AcceptedAtRouteOfTResultTests.cs (1)
26var obj = new HttpValidationProblemDetails();
AcceptedOfTResultTests.cs (1)
53var obj = new HttpValidationProblemDetails();
BadRequestOfTResultTests.cs (1)
36var obj = new HttpValidationProblemDetails();
CreatedAtRouteOfTResultTests.cs (1)
27var obj = new HttpValidationProblemDetails();
CreatedOfTResultTests.cs (1)
23var obj = new HttpValidationProblemDetails();
InternalServerErrorOfTResultTests.cs (1)
36var obj = new HttpValidationProblemDetails();
JsonResultTests.cs (2)
145var details = new HttpValidationProblemDetails(); 206var details = new HttpValidationProblemDetails();
NotFoundOfTResultTests.cs (1)
21var obj = new HttpValidationProblemDetails();
OkOfTResultTests.cs (1)
34var obj = new HttpValidationProblemDetails();
ProblemResultTests.cs (2)
80var details = new HttpValidationProblemDetails(); 141var details = new HttpValidationProblemDetails(new Dictionary<string, string[]>
ResultsTests.cs (1)
1377var problem = new HttpValidationProblemDetails { Title = "Test title" };
TypedResultsTests.cs (1)
1169var problem = new HttpValidationProblemDetails { Title = "Test title" };
UnprocessableEntityOfTResultTests.cs (1)
22var obj = new HttpValidationProblemDetails();
ValidationProblemResultTests.cs (8)
23var details = new HttpValidationProblemDetails(); 52var details = new HttpValidationProblemDetails(); 90new HttpValidationProblemDetails { Status = StatusCodes.Status413RequestEntityTooLarge, })); 115var result = new ValidationProblem(new()); 134var result = Assert.IsAssignableFrom<IStatusCodeHttpResult>(new ValidationProblem(new HttpValidationProblemDetails())); 142var value = new HttpValidationProblemDetails(); 154var value = new HttpValidationProblemDetails(); 169var result = Assert.IsAssignableFrom<IContentTypeHttpResult>(new ValidationProblem(new()));
MinimalSample (1)
Program.cs (1)
88"objectValidation" => Results.Problem(new HttpValidationProblemDetails(errors) { Status = 400, Extensions = { { "traceId", "traceId123" } } }),
96 references to HttpValidationProblemDetails
Microsoft.AspNetCore.Http.Abstractions (4)
ProblemDetails\HttpValidationProblemDetails.cs (4)
15/// Initializes a new instance of <see cref="HttpValidationProblemDetails"/>. 23/// Initializes a new instance of <see cref="HttpValidationProblemDetails"/> using the specified <paramref name="errors"/>. 32/// Initializes a new instance of <see cref="HttpValidationProblemDetails"/> using the specified <paramref name="errors"/>. 47/// Gets the validation errors associated with this instance of <see cref="HttpValidationProblemDetails"/>.
Microsoft.AspNetCore.Http.Abstractions.Tests (7)
HttpValidationProblemDetailsJsonConverterTest.cs (7)
17var problemDetails = new HttpValidationProblemDetails(); 63var problemDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(ref reader, JsonSerializerOptions); 106var problemDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(ref reader, JsonSerializerOptions); 145var problemDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(json, JsonSerializerOptions);
Microsoft.AspNetCore.Http.Extensions (3)
ProblemDetailsJsonContext.cs (1)
11[JsonSerializable(typeof(HttpValidationProblemDetails))]
Properties\AssemblyInfo.cs (1)
7[assembly: TypeForwardedTo(typeof(Microsoft.AspNetCore.Http.HttpValidationProblemDetails))]
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
183problemDetails.Status = problemDetails is HttpValidationProblemDetails ?
Microsoft.AspNetCore.Http.Extensions.Tests (6)
ProblemDetailsDefaultWriterTest.cs (6)
252var expectedProblem = new HttpValidationProblemDetails() 273var problemDetails = await JsonSerializer.DeserializeAsync<HttpValidationProblemDetails>(stream, SerializerOptions); 295var expectedProblem = new HttpValidationProblemDetails() 316var problemDetails = await JsonSerializer.DeserializeAsync<HttpValidationProblemDetails>(stream, SerializerOptions);
Microsoft.AspNetCore.Http.Results (15)
Results.cs (4)
754/// with a <see cref="HttpValidationProblemDetails"/> value. 778/// with a <see cref="HttpValidationProblemDetails"/> value. 802var problemDetails = new HttpValidationProblemDetails(errors) 817private static void CopyExtensions(IEnumerable<KeyValuePair<string, object?>>? extensions, HttpValidationProblemDetails problemDetails)
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
183problemDetails.Status = problemDetails is HttpValidationProblemDetails ?
TypedResults.cs (3)
815/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response with an <see cref="HttpValidationProblemDetails"/> value. 836/// Produces a <see cref="StatusCodes.Status400BadRequest"/> response with an <see cref="HttpValidationProblemDetails"/> value. 857var problemDetails = new HttpValidationProblemDetails(errors)
ValidationProblem.cs (7)
16public sealed class ValidationProblem : IResult, IEndpointMetadataProvider, IStatusCodeHttpResult, IContentTypeHttpResult, IValueHttpResult, IValueHttpResult<HttpValidationProblemDetails> 18internal ValidationProblem(HttpValidationProblemDetails problemDetails) 31/// Gets the <see cref="HttpValidationProblemDetails"/> instance. 33public HttpValidationProblemDetails ProblemDetails { get; } 37HttpValidationProblemDetails? IValueHttpResult<HttpValidationProblemDetails>.Value => ProblemDetails; 79builder.Metadata.Add(ProducesResponseTypeMetadata.CreateUnvalidated(typeof(HttpValidationProblemDetails), StatusCodes.Status400BadRequest, ContentTypeConstants.ProblemDetailsContentTypes));
Microsoft.AspNetCore.Http.Results.Tests (48)
AcceptedAtRouteOfTResultTests.cs (2)
26var obj = new HttpValidationProblemDetails(); 27var result = new AcceptedAtRoute<HttpValidationProblemDetails>(routeValues, obj);
AcceptedOfTResultTests.cs (2)
53var obj = new HttpValidationProblemDetails(); 54var result = new Accepted<HttpValidationProblemDetails>(expectedUrl, obj);
BadRequestOfTResultTests.cs (2)
36var obj = new HttpValidationProblemDetails(); 37var result = new BadRequest<HttpValidationProblemDetails>(obj);
CreatedAtRouteOfTResultTests.cs (2)
27var obj = new HttpValidationProblemDetails(); 28var result = new CreatedAtRoute<HttpValidationProblemDetails>(routeValues, obj);
CreatedOfTResultTests.cs (2)
23var obj = new HttpValidationProblemDetails(); 24var result = new Created<HttpValidationProblemDetails>(expectedUrl, obj);
InternalServerErrorOfTResultTests.cs (2)
36var obj = new HttpValidationProblemDetails(); 37var result = new InternalServerError<HttpValidationProblemDetails>(obj);
JsonResultTests.cs (8)
145var details = new HttpValidationProblemDetails(); 147var result = new JsonHttpResult<HttpValidationProblemDetails>(details, jsonSerializerOptions: JsonSerializerOptions.Web); 164var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 196var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 206var details = new HttpValidationProblemDetails(); 208var result = new JsonHttpResult<HttpValidationProblemDetails>(details, jsonSerializerOptions: null, StatusCodes.Status422UnprocessableEntity);
NotFoundOfTResultTests.cs (2)
21var obj = new HttpValidationProblemDetails(); 22var result = new NotFound<HttpValidationProblemDetails>(obj);
OkOfTResultTests.cs (2)
34var obj = new HttpValidationProblemDetails(); 35var result = new Ok<HttpValidationProblemDetails>(obj);
ProblemResultTests.cs (8)
80var details = new HttpValidationProblemDetails(); 99var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 131var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web); 141var details = new HttpValidationProblemDetails(new Dictionary<string, string[]> 163var responseDetails = JsonSerializer.Deserialize<HttpValidationProblemDetails>(stream, JsonSerializerOptions.Web);
ResultsTests.cs (5)
1377var problem = new HttpValidationProblemDetails { Title = "Test title" }; 1414Assert.IsType<HttpValidationProblemDetails>(result.ProblemDetails); 1415Assert.Equal(errors, ((HttpValidationProblemDetails)result.ProblemDetails).Errors); 1445Assert.IsType<HttpValidationProblemDetails>(result.ProblemDetails); 1446Assert.Equal(errors, ((HttpValidationProblemDetails)result.ProblemDetails).Errors);
TypedResultsTests.cs (1)
1169var problem = new HttpValidationProblemDetails { Title = "Test title" };
UnprocessableEntityOfTResultTests.cs (2)
22var obj = new HttpValidationProblemDetails(); 23var result = new UnprocessableEntity<HttpValidationProblemDetails>(obj);
ValidationProblemResultTests.cs (8)
23var details = new HttpValidationProblemDetails(); 52var details = new HttpValidationProblemDetails(); 107Assert.Equal(typeof(HttpValidationProblemDetails), producesResponseTypeMetadata.Type); 142var value = new HttpValidationProblemDetails(); 146Assert.IsType<HttpValidationProblemDetails>(result.Value); 154var value = new HttpValidationProblemDetails(); 157var result = Assert.IsAssignableFrom<IValueHttpResult<HttpValidationProblemDetails>>(new ValidationProblem(value)); 158Assert.IsType<HttpValidationProblemDetails>(result.Value);
Microsoft.AspNetCore.Identity.FunctionalTests (4)
MapIdentityApiTests.cs (4)
1450var problem = await response.Content.ReadFromJsonAsync<HttpValidationProblemDetails>(); 1460var problem = await response.Content.ReadFromJsonAsync<HttpValidationProblemDetails>();
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
936Assert.Equal(typeof(HttpValidationProblemDetails), responseType.Type);
Microsoft.AspNetCore.Mvc.Core (2)
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
183problemDetails.Status = problemDetails is HttpValidationProblemDetails ?
ValidationProblemDetails.cs (1)
83/// Gets the validation errors associated with this instance of <see cref="HttpValidationProblemDetails"/>.
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
588new ProducesResponseTypeMetadata(StatusCodes.Status400BadRequest, typeof(HttpValidationProblemDetails), new[] { "application/problem+json" }),
Microsoft.AspNetCore.Routing (4)
Builder\OpenApiRouteHandlerBuilderExtensions.cs (4)
134/// Adds an <see cref="IProducesResponseTypeMetadata"/> with a <see cref="HttpValidationProblemDetails"/> type 151return Produces(builder, statusCode, typeof(HttpValidationProblemDetails), contentType); 155/// Adds an <see cref="IProducesResponseTypeMetadata"/> with a <see cref="HttpValidationProblemDetails"/> type 175return builder.WithMetadata(new ProducesResponseTypeMetadata(statusCode, typeof(HttpValidationProblemDetails), [contentType]));
Microsoft.AspNetCore.Routing.Tests (1)
Builder\OpenApiRouteHandlerBuilderExtensionsTest.cs (1)
98Assert.Equal(typeof(HttpValidationProblemDetails), metadata.Type);