Skip to content

Commit 008d676

Browse files
.NET 11 prep (#3787)
- Cherry-pick changes from #3789 to minimise diff. - Update default TFM for benchmarks.
1 parent a333299 commit 008d676

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

benchmark.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#Requires -Version 7
55

66
param(
7-
[Parameter(Mandatory = $false)][string] $Framework = "net8.0",
7+
[Parameter(Mandatory = $false)][string] $Framework = "net10.0",
88
[Parameter(Mandatory = $false)][string] $Job = ""
99
)
1010

test/Swashbuckle.AspNetCore.IntegrationTests/ClientGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private static async Task<TemporaryDirectory> GenerateProjectAsync(params string
233233
.Property("NoWarn", "$(NoWarn)")
234234
.Property("Nullable", "enable")
235235
.Property("OutputType", "Library")
236-
.Property("TargetFramework", "net10.0")
236+
.Property("TargetFramework", $"net{Environment.Version.ToString(2)}")
237237
.Property("TreatWarningsAsErrors", "false");
238238

239239
foreach (var name in packageReferences)

test/Swashbuckle.AspNetCore.IntegrationTests/SnapshotTestData.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public static TheoryData<string, Version> Snapshots()
2222

2323
foreach (var path in Directory.EnumerateFiles(snapshotsPath, "*.txt", SearchOption.AllDirectories))
2424
{
25+
if (Path.GetFileName(path).Contains(".received."))
26+
{
27+
continue;
28+
}
29+
2530
using var snapshot = File.OpenRead(path);
2631
using var document = JsonDocument.Parse(snapshot);
2732

test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class SwaggerIntegrationTests(ITestOutputHelper outputHelper)
1111
{
1212
[Theory]
1313
[InlineData(typeof(Basic.Startup), "/swagger/v1/swagger.json")]
14-
[InlineData(typeof(CliExample.Startup), "/swagger/v1/swagger_net8.0.json")]
14+
[InlineData(typeof(CliExample.Startup), "/swagger/v1/swagger_net10.0.json")]
1515
[InlineData(typeof(ConfigFromFile.Startup), "/swagger/v1/swagger.json")]
1616
[InlineData(typeof(CustomUIConfig.Startup), "/swagger/v1/swagger.json")]
1717
[InlineData(typeof(CustomUIIndex.Startup), "/swagger/v1/swagger.json")]
@@ -38,7 +38,7 @@ public async Task SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq()
3838
var testSite = new TestSiteAutofaq(typeof(CliExampleWithFactory.Startup), outputHelper);
3939
using var client = testSite.BuildClient();
4040

41-
await AssertValidSwaggerJson(client, "/swagger/v1/swagger_net8.0.json");
41+
await AssertValidSwaggerJson(client, "/swagger/v1/swagger_net10.0.json");
4242
}
4343

4444
[Fact]

test/Swashbuckle.AspNetCore.IntegrationTests/VerifyTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public partial class VerifyTests(ITestOutputHelper outputHelper)
99
[Theory]
1010
[InlineData(typeof(Basic.Startup), "/swagger/v1/swagger.json")]
1111
[InlineData(typeof(NSwagClientExample.Startup), "/swagger/v1/swagger.json")]
12-
[InlineData(typeof(CliExample.Startup), "/swagger/v1/swagger_net8.0.json")]
12+
[InlineData(typeof(CliExample.Startup), "/swagger/v1/swagger_net10.0.json")]
1313
[InlineData(typeof(ConfigFromFile.Startup), "/swagger/v1/swagger.json")]
1414
[InlineData(typeof(CustomDocumentSerializer.Startup), "/swagger/v1/swagger.json")]
1515
[InlineData(typeof(CustomUIConfig.Startup), "/swagger/v1/swagger.json")]
@@ -40,7 +40,7 @@ await Verify(NormalizeLineBreaks(swagger))
4040
public async Task SwaggerEndpoint_ReturnsValidSwaggerJson_ForAutofaq()
4141
{
4242
var startupType = typeof(CliExampleWithFactory.Startup);
43-
const string swaggerRequestUri = "/swagger/v1/swagger_net8.0.json";
43+
const string swaggerRequestUri = "/swagger/v1/swagger_net10.0.json";
4444

4545
var testSite = new TestSiteAutofaq(startupType, outputHelper);
4646
using var client = testSite.BuildClient();

0 commit comments

Comments
 (0)