diff --git a/src/AzureIoTHub.Portal/Server/AzureIoTHub.Portal.Server.csproj b/src/AzureIoTHub.Portal/Server/AzureIoTHub.Portal.Server.csproj index 345c128f8..1a325a886 100644 --- a/src/AzureIoTHub.Portal/Server/AzureIoTHub.Portal.Server.csproj +++ b/src/AzureIoTHub.Portal/Server/AzureIoTHub.Portal.Server.csproj @@ -23,6 +23,7 @@ + diff --git a/src/AzureIoTHub.Portal/Server/Startup.cs b/src/AzureIoTHub.Portal/Server/Startup.cs index 8834a8a49..d0e64ea24 100644 --- a/src/AzureIoTHub.Portal/Server/Startup.cs +++ b/src/AzureIoTHub.Portal/Server/Startup.cs @@ -124,7 +124,13 @@ public void ConfigureServices(IServiceCollection services) client.BaseAddress = new Uri(configuration.LoRaRegionRouterConfigUrl); }).AddPolicyHandler(transientHttpErrorPolicy); + services.AddControllers(); + + services.AddEndpointsApiExplorer(); + services.AddApplicationInsightsTelemetry(); + + services.AddSwaggerGen(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -134,6 +140,8 @@ public async void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseDeveloperExceptionPage(); app.UseWebAssemblyDebugging(); + app.UseSwagger(); + app.UseSwaggerUI(); } else {