Reputation: 2195
I want to completely disable model validation for WebAPI controllers. I tried a few ways to do it for MVC, but seems WebAPI doesn't get that methods.
In my case:
I'm trying to completely remove step 2.
Upvotes: 5
Views: 4113
Reputation: 12395
Try this:
config.Services.Clear(typeof(ModelValidatorProvider));
It should completely disable validation both for URI parameters and for body parameters.
Upvotes: 13