using CPRNIMS.Domain.Profile.Canvass; using CPRNIMS.Middleware; using CPRNIMS.WebApi.Common; var builder = WebApplication.CreateBuilder(args); builder.Services.AddApplicationServices(builder); builder.Services.AddAutoMapper(cfg => { }, typeof(SupplierRequestProfile)); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("./v2/swagger.json", "LLOYD API V2"); //originally "./swagger/v1/swagger.json" }); } app.UseMiddleware(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("./v2/swagger.json", "LLOYD API V2"); //originally "./swagger/v1/swagger.json" }); app.UseCors("AllowAnyOrigin"); app.UseHttpsRedirection(); app.UseAuthentication(); app.UseAuthorization(); app.MapControllers(); app.Run();