Files
DocumentService/DocumentOperator.API/Configuration/SwaggerConfiguration.cs
TekH 077eb1e017 docs: Add XML documentation comments to API layer
Add missing XML doc comments to resolve CS1591 warnings:

  - SerilogConfiguration: Class comment

  - SwaggerConfiguration: Class and AddSwaggerDocumentation() method

  - ExceptionHandlingMiddleware: Constructor and InvokeAsync() method

  - RequestLoggingMiddleware: Placeholder class comment

  - TenantResolutionMiddleware: Placeholder class comment

  - Program: Partial class comment for integration test access

Result: 0 CS1591 warnings in DocumentOperator.API project
2026-07-07 18:56:23 +02:00

37 lines
1.3 KiB
C#

using Microsoft.OpenApi.Models;
using System.Reflection;
namespace DocumentOperator.API.Configuration
{
/// <summary>
/// Provides extension methods for configuring Swagger/OpenAPI documentation.
/// </summary>
public static class SwaggerConfiguration
{
/// <summary>
/// Adds Swagger documentation generation to the service collection.
/// </summary>
/// <param name="services">The service collection to add Swagger to.</param>
/// <returns>The modified service collection.</returns>
public static IServiceCollection AddSwaggerDocumentation(this IServiceCollection services)
{
services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "DD Document Operator API",
Version = "v1",
Description = "PDF Verarbeitungs-Service für Validierung, Stempel, Zertifikate, Anhänge & Zusammenführung"
});
// XML-Kommentare einbinden
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
options.IncludeXmlComments(xmlPath);
});
return services;
}
}
}