MinimalApi vs Mvc - ValidationOfHeaders
I have been playing around with MinimalApi, and was surprised to see that MinimalApi could not handle validating Required HttpHeaders in the same way that MvcControllers can:
MinimalApi Code
Mvc Code
The Mvc Examples returns a ValidationProblemDetails-based error if TraceId while MinimalApi just retuns 400.
Does anyone know, how I can get MinimalApi to validate headers and send a meaningful error back (hopefully a ValidationProblemDetails).
MinimalApi Code
Mvc Code
The Mvc Examples returns a ValidationProblemDetails-based error if TraceId while MinimalApi just retuns 400.
Does anyone know, how I can get MinimalApi to validate headers and send a meaningful error back (hopefully a ValidationProblemDetails).