20 instantiations of ValidationProblemDetails
BasicWebSite (1)
Controllers\ContactApiController.cs (1)
120return BadRequest(new ValidationProblemDetails
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ProblemDetailsDefaultWriterTest.cs (1)
99var expectedProblem = new ValidationProblemDetails()
Microsoft.AspNetCore.Mvc.Core (2)
ControllerBase.cs (1)
1992validationProblem = new ValidationProblemDetails(modelStateDictionary)
Infrastructure\DefaultProblemDetailsFactory.cs (1)
76var problemDetails = new ValidationProblemDetails(modelStateDictionary)
Microsoft.AspNetCore.Mvc.Core.Test (8)
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (1)
77var factory = Mock.Of<ProblemDetailsFactory>(m => m.CreateValidationProblemDetails(It.IsAny<HttpContext>(), It.IsAny<ModelStateDictionary>(), null, null, null, null, null) == new ValidationProblemDetails
Infrastructure\ValidationProblemDetailsJsonConverterTest.cs (2)
139var problemDetails = new ValidationProblemDetails(new Dictionary<string, string[]>() { { "Property", new string[] { "error0" } } }) 169var problemDetails = new ValidationProblemDetails(errors)
ObjectResultTests.cs (1)
68var details = new ValidationProblemDetails(modelState);
ValidationProblemDetailsTest.cs (4)
14var problemDescription = new ValidationProblemDetails(); 32var problemDescription = new ValidationProblemDetails(modelStateDictionary); 62var problemDescription = new ValidationProblemDetails(modelStateDictionary); 86var problemDescription = new ValidationProblemDetails(errors);
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
ValidationProblemDetailsWrapper.cs (1)
21: this(new ValidationProblemDetails())
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (3)
ProblemDetailsWrapperProviderFactoryTest.cs (1)
44var instance = new ValidationProblemDetails();
ValidationProblemDetailsWrapperTest.cs (2)
140var problemDetails = new ValidationProblemDetails 189var problemDetails = new ValidationProblemDetails
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
ValidationProblemDetailsConverter.cs (1)
28var problemDetails = (ValidationProblemDetails?)existingValue ?? new ValidationProblemDetails();
Mvc.Api.Analyzers.Test (2)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Input.cs (1)
17var validationProblemDetails = new ValidationProblemDetails(ModelState);
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Output.cs (1)
23var validationProblemDetails = new ValidationProblemDetails(ModelState);
XmlFormattersWebSite (1)
Controllers\XmlApiControllerBase.cs (1)
39return new BadRequestObjectResult(new ValidationProblemDetails
99 references to ValidationProblemDetails
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ProblemDetailsDefaultWriterTest.cs (1)
99var expectedProblem = new ValidationProblemDetails()
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
ApiResponseTypeProviderTest.cs (2)
714actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ValidationProblemDetails), 400, "application/problem+json"), FilterScope.Action)); 735Assert.Equal(typeof(ValidationProblemDetails), responseType.Type);
Microsoft.AspNetCore.Mvc.Core (14)
ControllerBase.cs (4)
1910public virtual ActionResult ValidationProblem([ActionResultObjectValue] ValidationProblemDetails descriptor) 1940/// with a <see cref="ValidationProblemDetails"/> value. 1964/// with a <see cref="ValidationProblemDetails"/> value. 1988ValidationProblemDetails? validationProblem;
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
32var problemDetails = problemDetailsFactory.CreateValidationProblemDetails(context.HttpContext, context.ModelState);
Infrastructure\DefaultProblemDetailsFactory.cs (2)
63public override ValidationProblemDetails CreateValidationProblemDetails( 76var problemDetails = new ValidationProblemDetails(modelStateDictionary)
Infrastructure\ProblemDetailsFactory.cs (4)
10/// Factory to produce <see cref="ProblemDetails" /> and <see cref="ValidationProblemDetails" />. 33/// Creates a <see cref="ValidationProblemDetails" /> instance that configures defaults based on values specified in <see cref="ApiBehaviorOptions" />. 42/// <returns>The <see cref="ValidationProblemDetails"/> instance.</returns> 43public abstract ValidationProblemDetails CreateValidationProblemDetails(
ValidationProblemDetails.cs (3)
17/// Initializes a new instance of <see cref="ValidationProblemDetails"/>. 25/// Initializes a new instance of <see cref="ValidationProblemDetails"/> using the specified <paramref name="modelState"/>. 74/// Initializes a new instance of <see cref="ValidationProblemDetails"/> using the specified <paramref name="errors"/>.
Microsoft.AspNetCore.Mvc.Core.Test (36)
ControllerBaseTest.cs (10)
2356var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequestResult.Value); 2384var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequestResult.Value); 2406var problemDetails = Assert.IsType<ValidationProblemDetails>(objectResult.Value); 2427var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequestResult.Value); 2448var problemDetails = Assert.IsType<ValidationProblemDetails>(objectResult.Value);
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (10)
44var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value); 66var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value); 90var problemDetails = Assert.IsType<ValidationProblemDetails>(objectResult.Value); 109var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value); 126var problemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value);
Infrastructure\ProblemDetailsFactoryTest.cs (3)
86var problemDetails = Factory.CreateValidationProblemDetails(GetHttpContext(), modelState); 116var problemDetails = Factory.CreateValidationProblemDetails(GetHttpContext(), modelState, 422); 148var problemDetails = Factory.CreateValidationProblemDetails(GetHttpContext(), modelState, title: title, instance: instance);
Infrastructure\ValidationProblemDetailsJsonConverterTest.cs (8)
30var problemDetails = JsonSerializer.Deserialize<ValidationProblemDetails>(ref reader, JsonSerializerOptions); 72var problemDetails = JsonSerializer.Deserialize<ValidationProblemDetails>(ref reader, JsonSerializerOptions); 110var problemDetails = JsonSerializer.Deserialize<ValidationProblemDetails>(json, JsonSerializerOptions); 139var problemDetails = new ValidationProblemDetails(new Dictionary<string, string[]>() { { "Property", new string[] { "error0" } } }) 169var problemDetails = new ValidationProblemDetails(errors)
ObjectResultTests.cs (1)
68var details = new ValidationProblemDetails(modelState);
ValidationProblemDetailsTest.cs (4)
14var problemDescription = new ValidationProblemDetails(); 32var problemDescription = new ValidationProblemDetails(modelStateDictionary); 62var problemDescription = new ValidationProblemDetails(modelStateDictionary); 86var problemDescription = new ValidationProblemDetails(errors);
Microsoft.AspNetCore.Mvc.Formatters.Xml (5)
ProblemDetailsWrapperProviderFactory.cs (2)
15if (context.DeclaredType == typeof(ValidationProblemDetails)) 17return new WrapperProvider(typeof(ValidationProblemDetailsWrapper), p => new ValidationProblemDetailsWrapper((ValidationProblemDetails)p!));
ValidationProblemDetailsWrapper.cs (3)
10/// Wrapper class for <see cref="ValidationProblemDetails"/> to enable it to be serialized by the xml formatters. 30public ValidationProblemDetailsWrapper(ValidationProblemDetails problemDetails) 36internal new ValidationProblemDetails ProblemDetails { get; }
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (6)
ProblemDetailsWrapperProviderFactoryTest.cs (1)
44var instance = new ValidationProblemDetails();
ValidationProblemDetailsWrapperTest.cs (5)
36var problemDetails = Assert.IsType<ValidationProblemDetailsWrapper>(value).ProblemDetails; 92var problemDetails = Assert.IsType<ValidationProblemDetailsWrapper>(value).ProblemDetails; 130var problemDetails = Assert.IsType<ValidationProblemDetailsWrapper>(value).ProblemDetails; 140var problemDetails = new ValidationProblemDetails 189var problemDetails = new ValidationProblemDetails
Microsoft.AspNetCore.Mvc.FunctionalTests (22)
ApiBehaviorTest.cs (4)
63var problemDetails = JsonConvert.DeserializeObject<ValidationProblemDetails>( 360var validationProblemDetails = JsonConvert.DeserializeObject<ValidationProblemDetails>(
BasicTests.cs (4)
629var problem = await response.Content.ReadFromJsonAsync<ValidationProblemDetails>(); 656var problemDetails = JsonSerializer.Deserialize<ValidationProblemDetails>(content, TestJsonSerializerOptionsProvider.Options);
InputFormatterTests.cs (4)
190var problemDetails = await response.Content.ReadFromJsonAsync<ValidationProblemDetails>(); 208var problemDetails = await response.Content.ReadFromJsonAsync<ValidationProblemDetails>();
InputObjectValidationTests.cs (6)
300var validationProblemDetails = JsonConvert.DeserializeObject<ValidationProblemDetails>(responseContent); 329var validationProblemDetails = JsonConvert.DeserializeObject<ValidationProblemDetails>(responseContent); 361var validationProblemDetails = JsonConvert.DeserializeObject<ValidationProblemDetails>(responseContent);
JsonInputFormatterTestBase.cs (2)
161var problem = await response.Content.ReadFromJsonAsync<ValidationProblemDetails>();
ReadFromDisconnectedClientTest.cs (2)
66var problem = await response.Content.ReadFromJsonAsync<ValidationProblemDetails>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson (8)
ValidationProblemDetailsConverter.cs (8)
9/// A RFC 7807 compliant <see cref="JsonConverter"/> for <see cref="ValidationProblemDetails"/>. 16return objectType == typeof(ValidationProblemDetails); 28var problemDetails = (ValidationProblemDetails?)existingValue ?? new ValidationProblemDetails(); 43var problemDetails = (ValidationProblemDetails)value; 56public AnnotatedValidationProblemDetails(ValidationProblemDetails problemDetails) 68public void CopyTo(ValidationProblemDetails problemDetails)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
ControllerUnitTestabilityTests.cs (2)
711var validationProblemDetails = Assert.IsType<ValidationProblemDetails>(badRequest.Value);
Mvc.Api.Analyzers.Test (3)
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Input.cs (1)
17var validationProblemDetails = new ValidationProblemDetails(ModelState);
TestFiles\AddResponseTypeAttributeCodeFixProviderIntegrationTest\CodeFixAddsResponseTypeWhenDifferentFromErrorType.Output.cs (2)
11[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] 23var validationProblemDetails = new ValidationProblemDetails(ModelState);