Skip to content

Commit a888b47

Browse files
committed
Add swagger docs
1 parent 7b148be commit a888b47

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ReplayBrowser/Startup.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ public void ConfigureServices(IServiceCollection services)
202202
});
203203

204204
services.AddHttpLogging(o => { });
205+
206+
services.AddSwaggerGen();
205207
}
206208

207209
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
@@ -232,8 +234,12 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
232234
app.UseAuthorization();
233235
app.UseAntiforgery();
234236

237+
app.UseSwagger();
238+
app.UseSwaggerUI();
239+
235240
app.UseEndpoints(endpoints =>
236241
{
242+
endpoints.MapSwagger();
237243
endpoints.MapControllers();
238244
endpoints.MapRazorComponents<App>()
239245
.AddInteractiveServerRenderMode();

0 commit comments

Comments
 (0)