From 1106a86ec332e41ec78c3f1bc299191a5120fed4 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 21 Jul 2026 15:01:22 +0200 Subject: [PATCH] feat(swagger): Add SwaggerSettings configuration class - Add SwaggerSettings with EnableInProduction flag (default: true) - Title, Version, Description configurable via appsettings.json - Enables production Swagger access for debugging/testing --- .../Configuration/SwaggerSettings.cs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 DocumentOperator.API/Configuration/SwaggerSettings.cs diff --git a/DocumentOperator.API/Configuration/SwaggerSettings.cs b/DocumentOperator.API/Configuration/SwaggerSettings.cs new file mode 100644 index 0000000..19959a7 --- /dev/null +++ b/DocumentOperator.API/Configuration/SwaggerSettings.cs @@ -0,0 +1,33 @@ +namespace DocumentOperator.API.Configuration; + +/// +/// Configuration settings for Swagger/OpenAPI documentation. +/// +public class SwaggerSettings +{ + /// + /// + /// + public const string SectionName = "SwaggerSettings"; + + /// + /// Enable Swagger UI in Production environment. + /// Default: true (allows production testing/debugging). + /// + public bool EnableInProduction { get; set; } = true; + + /// + /// API title displayed in Swagger UI. + /// + public string Title { get; set; } = "DocumentOperator API"; + + /// + /// API version. + /// + public string Version { get; set; } = "v1"; + + /// + /// API description displayed in Swagger UI. + /// + public string Description { get; set; } = "PDF document processing service"; +}