Skip to content

Minimal APIs should return the standard media type for Problem Details responses #36557

@DamianEdwards

Description

@DamianEdwards

Minimal APIs that return the result of calling Microsoft.AspNetCore.Http.Results.ValidationProblem get a response media type of application/validationproblem+json which is not compliant with the RFC7807 spec that they're based on. The media type should be application/problem+json.

MVC has the same incorrect behavior but has since it was introduced in 2.x (see #36560).

We should fix this behavior in .NET 6.0 before final release.

Metadata

Metadata

Assignees

Labels

area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-minimal-actionsController-like actions for endpoint routingold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions