From e98e4aa651ef244ad123f82c0bd05a3c6d70c3f0 Mon Sep 17 00:00:00 2001 From: domaindrivendev Date: Mon, 14 Nov 2022 13:49:39 +0000 Subject: [PATCH] Account for InferSecuritySchemes in generator options DeepCopy --- .../DependencyInjection/ConfigureSwaggerGeneratorOptions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/ConfigureSwaggerGeneratorOptions.cs b/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/ConfigureSwaggerGeneratorOptions.cs index 6d5bfb7790..5957503755 100644 --- a/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/ConfigureSwaggerGeneratorOptions.cs +++ b/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/ConfigureSwaggerGeneratorOptions.cs @@ -61,6 +61,7 @@ public void DeepCopy(SwaggerGeneratorOptions source, SwaggerGeneratorOptions tar target.OperationIdSelector = source.OperationIdSelector; target.TagsSelector = source.TagsSelector; target.SortKeySelector = source.SortKeySelector; + target.InferSecuritySchemes = source.InferSecuritySchemes; target.DescribeAllParametersInCamelCase = source.DescribeAllParametersInCamelCase; target.Servers = new List(source.Servers); target.SecuritySchemes = new Dictionary(source.SecuritySchemes);