diff --git a/api/Hmcr.Api/Extensions/IServiceCollectionExtensions.cs b/api/Hmcr.Api/Extensions/IServiceCollectionExtensions.cs index 11dda759..1e283893 100644 --- a/api/Hmcr.Api/Extensions/IServiceCollectionExtensions.cs +++ b/api/Hmcr.Api/Extensions/IServiceCollectionExtensions.cs @@ -129,6 +129,9 @@ public static void AddHmcrSwagger(this IServiceCollection services, IWebHostEnvi var filePath = Path.Combine(System.AppContext.BaseDirectory, "Hmcr.Api.xml"); options.IncludeXmlComments(filePath); + // Ensure swagger is aware of namespace and class hierarchy, replacing occurrences of such cases with . for readability. + options.CustomSchemaIds(type => type.FullName.Replace('+', '.')); + var securitySchema = new OpenApiSecurityScheme { Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",