diff --git a/appveyor.yml b/appveyor.yml
index dc95189bd5..9bc662a6bb 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -8,7 +8,7 @@ init:
- git config --global core.autocrlf true
environment:
- DOTNET_VERSION: "6.0.100-rc.2.21505.57"
+ DOTNET_VERSION: "7.0.0"
build_script:
- ps: dotnet pack -c Release -o artifacts
diff --git a/global.json b/global.json
index 704878105f..d274d1a3a3 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "6.0.100-rc.2.21505.57",
+ "version": "7.0.0",
"rollForward": "latestMajor"
}
}
diff --git a/src/Swashbuckle.AspNetCore.Annotations/Swashbuckle.AspNetCore.Annotations.csproj b/src/Swashbuckle.AspNetCore.Annotations/Swashbuckle.AspNetCore.Annotations.csproj
index 60f25e230c..3a382718c3 100644
--- a/src/Swashbuckle.AspNetCore.Annotations/Swashbuckle.AspNetCore.Annotations.csproj
+++ b/src/Swashbuckle.AspNetCore.Annotations/Swashbuckle.AspNetCore.Annotations.csproj
@@ -7,7 +7,7 @@
$(NoWarn);1591
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore;annotations
true
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/src/Swashbuckle.AspNetCore.ApiTesting.Xunit/Swashbuckle.AspNetCore.ApiTesting.Xunit.csproj b/src/Swashbuckle.AspNetCore.ApiTesting.Xunit/Swashbuckle.AspNetCore.ApiTesting.Xunit.csproj
index 20e6e3e0bc..a06d6a4938 100644
--- a/src/Swashbuckle.AspNetCore.ApiTesting.Xunit/Swashbuckle.AspNetCore.ApiTesting.Xunit.csproj
+++ b/src/Swashbuckle.AspNetCore.ApiTesting.Xunit/Swashbuckle.AspNetCore.ApiTesting.Xunit.csproj
@@ -6,7 +6,7 @@
false
$(NoWarn);1591
swagger;openapi;test-first;spec-first;testing;aspnetcore;xunit
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs b/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs
index 88c3e833d4..2dfb5ac0db 100644
--- a/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs
+++ b/src/Swashbuckle.AspNetCore.ApiTesting/ResponseValidator.cs
@@ -68,7 +68,7 @@ private void ValidateContent(
OpenApiDocument openApiDocument,
HttpContent content)
{
- if (content == null)
+ if (content == null || content?.Headers?.ContentLength == 0)
throw new RequestDoesNotMatchSpecException("Expected content is not present");
if (!contentSpecs.TryGetValue(content.Headers.ContentType.MediaType, out OpenApiMediaType mediaTypeSpec))
diff --git a/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj b/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj
index 89b164ba9a..ff201852ff 100644
--- a/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj
+++ b/src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj
@@ -5,7 +5,7 @@
true
$(NoWarn);1591
swagger;openapi;test-first;spec-first;testing;aspnetcore
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
@@ -24,6 +24,10 @@
+
+
+
+
diff --git a/src/Swashbuckle.AspNetCore.Cli/Swashbuckle.AspNetCore.Cli.csproj b/src/Swashbuckle.AspNetCore.Cli/Swashbuckle.AspNetCore.Cli.csproj
index f6a5678c53..c1c90fb57a 100644
--- a/src/Swashbuckle.AspNetCore.Cli/Swashbuckle.AspNetCore.Cli.csproj
+++ b/src/Swashbuckle.AspNetCore.Cli/Swashbuckle.AspNetCore.Cli.csproj
@@ -6,7 +6,7 @@
Exe
true
Swashbuckle.AspNetCore.Cli
- netcoreapp2.1;netcoreapp3.0;net5.0;net6.0
+ netcoreapp2.1;netcoreapp3.0;net5.0;net6.0;net7.0
swagger
diff --git a/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj b/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj
index 8f714b3c9d..cb44a7565f 100644
--- a/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj
+++ b/src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj
@@ -5,7 +5,7 @@
Swagger Generator opt-in component to support Newtonsoft.Json serializer behaviors
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore;newtonsoft
true
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
@@ -28,4 +28,8 @@
+
+
+
+
diff --git a/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj b/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj
index 7408f5060d..2e08097a1d 100644
--- a/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj
+++ b/src/Swashbuckle.AspNetCore.ReDoc/Swashbuckle.AspNetCore.ReDoc.csproj
@@ -7,7 +7,7 @@
$(NoWarn);1591
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore;redoc
true
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj b/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj
index feea40ff1d..950e475274 100644
--- a/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj
+++ b/src/Swashbuckle.AspNetCore.Swagger/Swashbuckle.AspNetCore.Swagger.csproj
@@ -7,7 +7,7 @@
$(NoWarn);1591
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore
true
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/src/Swashbuckle.AspNetCore.SwaggerGen/Swashbuckle.AspNetCore.SwaggerGen.csproj b/src/Swashbuckle.AspNetCore.SwaggerGen/Swashbuckle.AspNetCore.SwaggerGen.csproj
index 37d129c874..7781dd492e 100644
--- a/src/Swashbuckle.AspNetCore.SwaggerGen/Swashbuckle.AspNetCore.SwaggerGen.csproj
+++ b/src/Swashbuckle.AspNetCore.SwaggerGen/Swashbuckle.AspNetCore.SwaggerGen.csproj
@@ -7,7 +7,7 @@
$(NoWarn);1591
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore
true
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj b/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj
index 7ff1fb4ebd..ebc70ddb71 100644
--- a/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj
+++ b/src/Swashbuckle.AspNetCore.SwaggerUI/Swashbuckle.AspNetCore.SwaggerUI.csproj
@@ -7,7 +7,7 @@
$(NoWarn);1591
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore
true
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.csproj b/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.csproj
index 78b9e723c3..81c8d03a9c 100644
--- a/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.csproj
+++ b/src/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore.csproj
@@ -12,7 +12,7 @@
$(MSBuildProjectName).nuspec
Swashbuckle.AspNetCore
swagger;documentation;discovery;help;webapi;aspnet;aspnetcore
- netstandard2.0;netcoreapp3.0;net5.0;net6.0
+ netstandard2.0;netcoreapp3.0;net5.0;net6.0;net7.0
diff --git a/test/Swashbuckle.AspNetCore.Annotations.Test/Swashbuckle.AspNetCore.Annotations.Test.csproj b/test/Swashbuckle.AspNetCore.Annotations.Test/Swashbuckle.AspNetCore.Annotations.Test.csproj
index eedf8a4029..955ab85895 100644
--- a/test/Swashbuckle.AspNetCore.Annotations.Test/Swashbuckle.AspNetCore.Annotations.Test.csproj
+++ b/test/Swashbuckle.AspNetCore.Annotations.Test/Swashbuckle.AspNetCore.Annotations.Test.csproj
@@ -1,8 +1,8 @@
-
+
10
- net6.0
+ net6.0;net7.0
diff --git a/test/Swashbuckle.AspNetCore.ApiTesting.Test/Swashbuckle.AspNetCore.ApiTesting.Test.csproj b/test/Swashbuckle.AspNetCore.ApiTesting.Test/Swashbuckle.AspNetCore.ApiTesting.Test.csproj
index 58e5bbf63e..11d039c367 100644
--- a/test/Swashbuckle.AspNetCore.ApiTesting.Test/Swashbuckle.AspNetCore.ApiTesting.Test.csproj
+++ b/test/Swashbuckle.AspNetCore.ApiTesting.Test/Swashbuckle.AspNetCore.ApiTesting.Test.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/Swashbuckle.AspNetCore.Cli.Test/Swashbuckle.AspNetCore.Cli.Test.csproj b/test/Swashbuckle.AspNetCore.Cli.Test/Swashbuckle.AspNetCore.Cli.Test.csproj
index 32a8170152..669c487d73 100644
--- a/test/Swashbuckle.AspNetCore.Cli.Test/Swashbuckle.AspNetCore.Cli.Test.csproj
+++ b/test/Swashbuckle.AspNetCore.Cli.Test/Swashbuckle.AspNetCore.Cli.Test.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net7.0
diff --git a/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj b/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj
index 11cf27e218..38c41524c5 100644
--- a/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj
+++ b/test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj
@@ -4,7 +4,7 @@
Swashbuckle.AspNetCore.IntegrationTests.snk
$(NoWarn);8002
true
- net6.0
+ net6.0;net7.0
diff --git a/test/Swashbuckle.AspNetCore.Newtonsoft.Test/Swashbuckle.AspNetCore.Newtonsoft.Test.csproj b/test/Swashbuckle.AspNetCore.Newtonsoft.Test/Swashbuckle.AspNetCore.Newtonsoft.Test.csproj
index 885c73206a..de4409046a 100644
--- a/test/Swashbuckle.AspNetCore.Newtonsoft.Test/Swashbuckle.AspNetCore.Newtonsoft.Test.csproj
+++ b/test/Swashbuckle.AspNetCore.Newtonsoft.Test/Swashbuckle.AspNetCore.Newtonsoft.Test.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/Swashbuckle.AspNetCore.SwaggerGen.Test.csproj b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/Swashbuckle.AspNetCore.SwaggerGen.Test.csproj
index f3fc9fed19..89e89ca0a8 100644
--- a/test/Swashbuckle.AspNetCore.SwaggerGen.Test/Swashbuckle.AspNetCore.SwaggerGen.Test.csproj
+++ b/test/Swashbuckle.AspNetCore.SwaggerGen.Test/Swashbuckle.AspNetCore.SwaggerGen.Test.csproj
@@ -3,7 +3,7 @@
Swashbuckle.AspNetCore.SwaggerGen.Test.xml
1701;1702;1591
- net6.0
+ net6.0;net7.0
diff --git a/test/Swashbuckle.AspNetCore.TestSupport/Swashbuckle.AspNetCore.TestSupport.csproj b/test/Swashbuckle.AspNetCore.TestSupport/Swashbuckle.AspNetCore.TestSupport.csproj
index a2a08f6473..a50dd48f58 100644
--- a/test/Swashbuckle.AspNetCore.TestSupport/Swashbuckle.AspNetCore.TestSupport.csproj
+++ b/test/Swashbuckle.AspNetCore.TestSupport/Swashbuckle.AspNetCore.TestSupport.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
false
false
diff --git a/test/WebSites/Basic/Basic.csproj b/test/WebSites/Basic/Basic.csproj
index 1a021a2bf7..f9ec10959f 100644
--- a/test/WebSites/Basic/Basic.csproj
+++ b/test/WebSites/Basic/Basic.csproj
@@ -3,7 +3,7 @@
true
$(NoWarn);1591
- net6.0
+ net6.0;net7.0
diff --git a/test/WebSites/CliExample/CliExample.csproj b/test/WebSites/CliExample/CliExample.csproj
index da14d83236..e70a7757f9 100644
--- a/test/WebSites/CliExample/CliExample.csproj
+++ b/test/WebSites/CliExample/CliExample.csproj
@@ -2,7 +2,7 @@
$([System.IO.Path]::Combine("..", "..", "..", "src", "Swashbuckle.AspNetCore.Cli", "bin", $(Configuration), "netcoreapp3.0", "dotnet-swagger.dll"))
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/CliExampleWithFactory/CliExampleWithFactory.csproj b/test/WebSites/CliExampleWithFactory/CliExampleWithFactory.csproj
index 6d599ec0d6..4bc57a13b6 100644
--- a/test/WebSites/CliExampleWithFactory/CliExampleWithFactory.csproj
+++ b/test/WebSites/CliExampleWithFactory/CliExampleWithFactory.csproj
@@ -2,7 +2,7 @@
$([System.IO.Path]::Combine("..", "..", "..", "src", "Swashbuckle.AspNetCore.Cli", "bin", $(Configuration), "netcoreapp3.0", "dotnet-swagger.dll"))
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/ConfigFromFile/ConfigFromFile.csproj b/test/WebSites/ConfigFromFile/ConfigFromFile.csproj
index 821b0862d7..6bbd0bfc3b 100644
--- a/test/WebSites/ConfigFromFile/ConfigFromFile.csproj
+++ b/test/WebSites/ConfigFromFile/ConfigFromFile.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/CustomUIConfig/CustomUIConfig.csproj b/test/WebSites/CustomUIConfig/CustomUIConfig.csproj
index 1fe14d3704..4ef78e8339 100644
--- a/test/WebSites/CustomUIConfig/CustomUIConfig.csproj
+++ b/test/WebSites/CustomUIConfig/CustomUIConfig.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/CustomUIIndex/CustomUIIndex.csproj b/test/WebSites/CustomUIIndex/CustomUIIndex.csproj
index 4afcd8fc96..53603ff316 100644
--- a/test/WebSites/CustomUIIndex/CustomUIIndex.csproj
+++ b/test/WebSites/CustomUIIndex/CustomUIIndex.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/GenericControllers/GenericControllers.csproj b/test/WebSites/GenericControllers/GenericControllers.csproj
index 92f29c29f9..29440c6e41 100644
--- a/test/WebSites/GenericControllers/GenericControllers.csproj
+++ b/test/WebSites/GenericControllers/GenericControllers.csproj
@@ -3,7 +3,7 @@
true
$(NoWarn);1591
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/MinimalApp/MinimalApp.csproj b/test/WebSites/MinimalApp/MinimalApp.csproj
index f938a0eaf0..fa08ab33f6 100644
--- a/test/WebSites/MinimalApp/MinimalApp.csproj
+++ b/test/WebSites/MinimalApp/MinimalApp.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net7.0
enable
enable
$([System.IO.Path]::Combine("..", "..", "..", "src", "Swashbuckle.AspNetCore.Cli", "bin", $(Configuration), "net5.0", "dotnet-swagger"))
diff --git a/test/WebSites/MultipleVersions/MultipleVersions.csproj b/test/WebSites/MultipleVersions/MultipleVersions.csproj
index 80262083e5..ef8b896ebc 100644
--- a/test/WebSites/MultipleVersions/MultipleVersions.csproj
+++ b/test/WebSites/MultipleVersions/MultipleVersions.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/NswagClientExample/NswagClientExample.csproj b/test/WebSites/NswagClientExample/NswagClientExample.csproj
index e5117df82b..a1c4e28a35 100644
--- a/test/WebSites/NswagClientExample/NswagClientExample.csproj
+++ b/test/WebSites/NswagClientExample/NswagClientExample.csproj
@@ -2,7 +2,7 @@
$([System.IO.Path]::Combine("..", "..", "..", "src", "Swashbuckle.AspNetCore.Cli", "bin", $(Configuration), "netcoreapp3.0", "dotnet-swagger.dll"))
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/OAuth2Integration/OAuth2Integration.csproj b/test/WebSites/OAuth2Integration/OAuth2Integration.csproj
index 624a116898..51bc6cda7e 100644
--- a/test/WebSites/OAuth2Integration/OAuth2Integration.csproj
+++ b/test/WebSites/OAuth2Integration/OAuth2Integration.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/ReDoc/ReDoc.csproj b/test/WebSites/ReDoc/ReDoc.csproj
index 3abd23e5df..abd62c2c59 100644
--- a/test/WebSites/ReDoc/ReDoc.csproj
+++ b/test/WebSites/ReDoc/ReDoc.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
diff --git a/test/WebSites/TestFirst.IntegrationTests/TestFirst.IntegrationTests.csproj b/test/WebSites/TestFirst.IntegrationTests/TestFirst.IntegrationTests.csproj
index d8087b5e30..cc6168f0c5 100644
--- a/test/WebSites/TestFirst.IntegrationTests/TestFirst.IntegrationTests.csproj
+++ b/test/WebSites/TestFirst.IntegrationTests/TestFirst.IntegrationTests.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0
@@ -22,7 +22,12 @@
-
+
+
+
+
+
+
diff --git a/test/WebSites/TestFirst/TestFirst.csproj b/test/WebSites/TestFirst/TestFirst.csproj
index ea4d3ed085..62137c609e 100644
--- a/test/WebSites/TestFirst/TestFirst.csproj
+++ b/test/WebSites/TestFirst/TestFirst.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net7.0