diff --git a/src/NSwag.ConsoleCore.Tests/GenerateSampleSpecificationTests.CheckCSharpClientsAsync_projectName=NSwag.Sample.NET70Minimal_targetFramework=net7.0_generatesCode=True.verified.txt b/src/NSwag.ConsoleCore.Tests/GenerateSampleSpecificationTests.CheckCSharpClientsAsync_projectName=NSwag.Sample.NET70Minimal_targetFramework=net7.0_generatesCode=True.verified.txt index c63467238d..d65ae1b5c9 100644 --- a/src/NSwag.ConsoleCore.Tests/GenerateSampleSpecificationTests.CheckCSharpClientsAsync_projectName=NSwag.Sample.NET70Minimal_targetFramework=net7.0_generatesCode=True.verified.txt +++ b/src/NSwag.ConsoleCore.Tests/GenerateSampleSpecificationTests.CheckCSharpClientsAsync_projectName=NSwag.Sample.NET70Minimal_targetFramework=net7.0_generatesCode=True.verified.txt @@ -258,7 +258,9 @@ namespace MyNamespace var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) diff --git a/src/NSwag.Sample.NET70Minimal/GeneratedClientsCs.gen b/src/NSwag.Sample.NET70Minimal/GeneratedClientsCs.gen index 9cb9f907fc..a3c74e6481 100644 --- a/src/NSwag.Sample.NET70Minimal/GeneratedClientsCs.gen +++ b/src/NSwag.Sample.NET70Minimal/GeneratedClientsCs.gen @@ -258,7 +258,9 @@ namespace MyNamespace var disposeResponse_ = true; try { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) diff --git a/src/NSwag.Sample.NET70Minimal/nswag.json b/src/NSwag.Sample.NET70Minimal/nswag.json index cabd9f7830..4d1dd750d0 100644 --- a/src/NSwag.Sample.NET70Minimal/nswag.json +++ b/src/NSwag.Sample.NET70Minimal/nswag.json @@ -83,7 +83,9 @@ "clientBaseClass": null, "configurationClass": null, "generateClientClasses": true, + "suppressClientClassesOutput": false, "generateClientInterfaces": false, + "suppressClientInterfacesOutput": false, "clientBaseInterface": null, "injectHttpClient": true, "disposeHttpClient": true,