From 53bff61174eeb7aaa8c67a5ca898cbf363f21152 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 May 2023 22:01:28 +0200 Subject: [PATCH] Added Swagger --- Tranga-API/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tranga-API/Program.cs b/Tranga-API/Program.cs index 84c0698..78f2773 100644 --- a/Tranga-API/Program.cs +++ b/Tranga-API/Program.cs @@ -25,8 +25,14 @@ else TaskManager taskManager = new (settings, logger); var builder = WebApplication.CreateBuilder(args); +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); builder.Services.AddControllers().AddNewtonsoftJson(); var app = builder.Build(); +app.UseSwagger(); +app.UseSwaggerUI(); +app.UseSwagger(); +app.UseSwaggerUI(); app.MapGet("/GetAvailableControllers", () => taskManager.GetAvailableConnectors());