diff --git a/ASP.NET Core Basics/src/Contacts/Startup.cs b/ASP.NET Core Basics/src/Contacts/Startup.cs index c64b86e..fee4ec7 100644 --- a/ASP.NET Core Basics/src/Contacts/Startup.cs +++ b/ASP.NET Core Basics/src/Contacts/Startup.cs @@ -55,6 +55,8 @@ public void ConfigureServices(IServiceCollection services) services.AddDbContext(options => options.UseSqlServer(Configuration["Data:ContactsContext:ConnectionString"])); + + services.AddSwaggerGen(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -94,6 +96,9 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); + + app.UseSwagger(); + app.UseSwaggerUi(); } } } diff --git a/ASP.NET Core Basics/src/Contacts/project.json b/ASP.NET Core Basics/src/Contacts/project.json index 6fa4193..4782f91 100644 --- a/ASP.NET Core Basics/src/Contacts/project.json +++ b/ASP.NET Core Basics/src/Contacts/project.json @@ -1,4 +1,4 @@ -{ +{ "userSecretsId": "aspnet-Contacts-cd2c7b27-e79c-43c7-b3ef-1ecb04374b70", "dependencies": { @@ -43,7 +43,8 @@ "version": "1.1.0-preview4-final", "type": "build" }, - "BundlerMinifier.Core": "2.2.301" + "BundlerMinifier.Core": "2.2.301", + "Swashbuckle": "6.0.0-beta902" }, "tools": {