diff --git a/src/Http/Routing/src/Builder/OpenApiDelegateEndpointConventionBuilderExtensions.cs b/src/Http/Routing/src/Builder/OpenApiDelegateEndpointConventionBuilderExtensions.cs
index f6e65e088454..c968ce59f72c 100644
--- a/src/Http/Routing/src/Builder/OpenApiDelegateEndpointConventionBuilderExtensions.cs
+++ b/src/Http/Routing/src/Builder/OpenApiDelegateEndpointConventionBuilderExtensions.cs
@@ -109,7 +109,7 @@ public static DelegateEndpointConventionBuilder ProducesProblem(this DelegateEnd
///
/// The .
/// The response status code. Defaults to StatusCodes.Status400BadRequest.
- /// The response content type. Defaults to "application/validationproblem+json".
+ /// The response content type. Defaults to "application/problem+json".
/// A that can be used to further customize the endpoint.
public static DelegateEndpointConventionBuilder ProducesValidationProblem(this DelegateEndpointConventionBuilder builder,
int statusCode = StatusCodes.Status400BadRequest,
@@ -117,7 +117,7 @@ public static DelegateEndpointConventionBuilder ProducesValidationProblem(this D
{
if (string.IsNullOrEmpty(contentType))
{
- contentType = "application/validationproblem+json";
+ contentType = "application/problem+json";
}
return Produces(builder, statusCode, contentType);
diff --git a/src/Mvc/Mvc.ApiExplorer/test/ApiResponseTypeProviderTest.cs b/src/Mvc/Mvc.ApiExplorer/test/ApiResponseTypeProviderTest.cs
index fe0225df8e97..92f04f4c3451 100644
--- a/src/Mvc/Mvc.ApiExplorer/test/ApiResponseTypeProviderTest.cs
+++ b/src/Mvc/Mvc.ApiExplorer/test/ApiResponseTypeProviderTest.cs
@@ -715,7 +715,7 @@ public void GetApiResponseTypes_HandlesActionWithMultipleContentTypesAndProduces
// Arrange
var actionDescriptor = GetControllerActionDescriptor(typeof(TestController), nameof(TestController.GetUser));
actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesAttribute("text/xml") { Type = typeof(BaseModel) }, FilterScope.Action));
- actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ValidationProblemDetails), 400, "application/validationproblem+json"), FilterScope.Action));
+ actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ValidationProblemDetails), 400, "application/problem+json"), FilterScope.Action));
actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(typeof(ProblemDetails), 404, "application/problem+json"), FilterScope.Action));
actionDescriptor.FilterDescriptors.Add(new FilterDescriptor(new ProducesResponseTypeAttribute(409), FilterScope.Action));
@@ -738,7 +738,7 @@ public void GetApiResponseTypes_HandlesActionWithMultipleContentTypesAndProduces
{
Assert.Equal(typeof(ValidationProblemDetails), responseType.Type);
Assert.Equal(400, responseType.StatusCode);
- Assert.Equal(new[] { "application/validationproblem+json" }, GetSortedMediaTypes(responseType));
+ Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType));
},
responseType =>
{
diff --git a/src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs b/src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
index 9ebdadafe0b3..c5686c5a24a8 100644
--- a/src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
+++ b/src/Mvc/Mvc.ApiExplorer/test/EndpointMetadataApiDescriptionProviderTest.cs
@@ -598,7 +598,7 @@ public void HandlesProducesWithProducesProblem()
{
Assert.Equal(typeof(HttpValidationProblemDetails), responseType.Type);
Assert.Equal(400, responseType.StatusCode);
- Assert.Equal(new[] { "application/validationproblem+json" }, GetSortedMediaTypes(responseType));
+ Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType));
},
responseType =>
{