From b4966585ae1c1c29ec8f0f92c011ade75138dcd9 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 8 Dec 2025 10:44:15 +0100 Subject: [PATCH] Enhance logging, Swagger, and XML documentation support --- src/ReC.API/Program.cs | 8 +++++++- src/ReC.API/ReC.API.csproj | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ReC.API/Program.cs b/src/ReC.API/Program.cs index 288ab3d..0c4ac6b 100644 --- a/src/ReC.API/Program.cs +++ b/src/ReC.API/Program.cs @@ -4,6 +4,7 @@ using NLog.Web; using ReC.API.Middleware; using ReC.Application; using ReC.Infrastructure; +using System.Reflection; using LogLevel = Microsoft.Extensions.Logging.LogLevel; var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); @@ -48,7 +49,12 @@ try builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); - builder.Services.AddSwaggerGen(); + builder.Services.AddSwaggerGen(c => + { + var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; + var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile); + c.IncludeXmlComments(xmlPath); + }); var app = builder.Build(); diff --git a/src/ReC.API/ReC.API.csproj b/src/ReC.API/ReC.API.csproj index fd7da17..7d37ec1 100644 --- a/src/ReC.API/ReC.API.csproj +++ b/src/ReC.API/ReC.API.csproj @@ -15,8 +15,10 @@ 1.0.0.0 1.0.0-beta Copyright © 2025 Digital Data GmbH. All rights reserved. + true + $(NoWarn);1591 - +