Minimal API validation does not use ProblemDetails #61533
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-validation
Issues related to model validation in minimal and controller-based APIs
Is there an existing issue for this?
Describe the bug
I'm trying the new validation support that comes with .NET 10 Preview 3. Validation errors aren't returned as
ProblemDetails
response.If I try to make a POST request with Id = 0, I get this error:
And the Content-Type of the response is
application/json
, while it should beapplication/problem+json
.Expected Behavior
The validation error should use
ProblemDetails
service and return theapplication/problem+json
Content Type.Steps To Reproduce
Minimal repro at https://github.com/marcominerva/OpenApi10
.NET Version
10.0.100-preview.3.25201.16
The text was updated successfully, but these errors were encountered: