diff --git a/Startup.cs b/Startup.cs index c6fec3d..421abb1 100644 --- a/Startup.cs +++ b/Startup.cs @@ -66,15 +66,12 @@ namespace CarParkValidationAPI }; }); - // services.AddAutoMapper(typeof(Startup)); + // services.AddAutoMapper(typeof(Startup)); //** //publish need to take comment out - services.AddSwaggerGen(c => - { - // c.ResolveConflictingActions(api => api.First()); - c.SwaggerDoc("v1", new OpenApiInfo { Title = "CarParkValidationAPI", Version = "v1" }); - }); + services.AddSwaggerGen(); + /* services.AddSwaggerGen(option => { @@ -109,11 +106,7 @@ namespace CarParkValidationAPI app.UseMiddleware(); // use this exception app.UseSwagger(); - app.UseSwaggerUI(c => - { - c.DocExpansion(Swashbuckle.AspNetCore.SwaggerUI.DocExpansion.None); - c.SwaggerEndpoint("/swagger/v1/swagger.json", "CarParkValidationAPI v1"); - }); + app.UseSwaggerUI(); app.UseRouting(); @@ -134,16 +127,12 @@ namespace CarParkValidationAPI app.UseAuthorization(); - /* if add angular under wwwroot then two line below needed*/ - /***************************/ - // app.UseDefaultFiles(); //it will use index.html <------------------ - // app.UseStaticFiles(); //it for angular <------------------------- - /***************************/ + app.UseEndpoints(endpoints => { endpoints.MapControllers(); - // endpoints.MapFallbackToController("Index", "Fallback"); //<------------------ put angular in wwwroot. + }); }