|
|
@ -15,6 +15,7 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; |
|
|
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; |
|
|
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; |
|
|
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; |
|
|
|
using Microsoft.eShopOnContainers.Services.Basket.API.Controllers; |
|
|
|
using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories; |
|
|
|
using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.EventHandling; |
|
|
|
using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events; |
|
|
@ -44,16 +45,18 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API |
|
|
|
public IConfiguration Configuration { get; } |
|
|
|
|
|
|
|
// This method gets called by the runtime. Use this method to add services to the container.
|
|
|
|
public IServiceProvider ConfigureServices(IServiceCollection services) |
|
|
|
public virtual IServiceProvider ConfigureServices(IServiceCollection services) |
|
|
|
{ |
|
|
|
RegisterAppInsights(services); |
|
|
|
|
|
|
|
services.AddControllers(options => |
|
|
|
{ |
|
|
|
options.Filters.Add(typeof(HttpGlobalExceptionFilter)); |
|
|
|
options.Filters.Add(typeof(ValidateModelStateFilter)); |
|
|
|
{ |
|
|
|
options.Filters.Add(typeof(HttpGlobalExceptionFilter)); |
|
|
|
options.Filters.Add(typeof(ValidateModelStateFilter)); |
|
|
|
|
|
|
|
}).AddNewtonsoftJson(); |
|
|
|
}) // Added for functional tests
|
|
|
|
.AddApplicationPart(typeof(BasketController).Assembly) |
|
|
|
.AddNewtonsoftJson(); |
|
|
|
|
|
|
|
services.AddSwaggerGen(options => |
|
|
|
{ |
|
|
|