Closed mkArtakMSFT closed 5 years ago
Likely the same cause as https://github.com/aspnet/Mvc/issues/8564. The order of when Configure
is called matters. Using https://github.com/aspnet/Mvc/pull/8618 as a way to make this less brittle.
Introduced a new API to allow configuring ApiBehaviorOptions
. The guidance is to use IMvcBuilder.ConfigureApiBehaviorOptions
to configure the app over services.Configure<ApiBehaviorOptions>
In my controller (
ApiController
) the action returnsBadRequest()
:In the startup I have the following mapping defined:
But this has no effect and client gets the usual
ProblemDetails
error - no matter whether I have that mapping or not: