Removed ASP.NET Core's (2.1) default model validation behavior
This commit is contained in:
parent
6d0882d020
commit
e159536ff3
@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Azure.ServiceBus;
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
|
||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||
@ -49,6 +50,11 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
{
|
||||
RegisterAppInsights(services);
|
||||
|
||||
services.Configure<ApiBehaviorOptions>(opt =>
|
||||
{
|
||||
opt.SuppressModelStateInvalidFilter = true;
|
||||
});
|
||||
|
||||
// Add framework services.
|
||||
services.AddMvc(options =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user