From a2e5d274d6feeb5fed1ef1a1587427f08062cf38 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 19 Dec 2020 21:02:13 +0800 Subject: [PATCH] Test ASP.Net core projects in AppveyorCI (#8239) * test aspnetcore server in appveyor * update samples * to break the build * Revert "to break the build" This reverts commit ab230628155ee804c3bf00bcce98a08fd89f753f. * ignore csproj. update samples --- appveyor.yml | 6 ++++++ bin/configs/{other => }/aspnetcore-3.0.yaml | 0 bin/configs/{other => }/aspnetcore-3.1.yaml | 0 bin/configs/{other => }/aspnetcore.yaml | 0 .../petstore/aspnetcore-3.0/.openapi-generator-ignore | 1 + .../server/petstore/aspnetcore-3.0/.openapi-generator/FILES | 1 - .../src/Org.OpenAPITools/Models/ApiResponse.cs | 2 +- .../aspnetcore-3.0/src/Org.OpenAPITools/Models/Category.cs | 2 +- .../aspnetcore-3.0/src/Org.OpenAPITools/Models/Order.cs | 2 +- .../aspnetcore-3.0/src/Org.OpenAPITools/Models/Pet.cs | 2 +- .../aspnetcore-3.0/src/Org.OpenAPITools/Models/Tag.cs | 2 +- .../aspnetcore-3.0/src/Org.OpenAPITools/Models/User.cs | 2 +- .../src/Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../src/Org.OpenAPITools/wwwroot/openapi-original.json | 3 ++- .../petstore/aspnetcore-3.1/.openapi-generator-ignore | 1 + .../server/petstore/aspnetcore-3.1/.openapi-generator/FILES | 1 - .../src/Org.OpenAPITools/Models/ApiResponse.cs | 2 +- .../aspnetcore-3.1/src/Org.OpenAPITools/Models/Category.cs | 2 +- .../aspnetcore-3.1/src/Org.OpenAPITools/Models/Order.cs | 2 +- .../aspnetcore-3.1/src/Org.OpenAPITools/Models/Pet.cs | 2 +- .../aspnetcore-3.1/src/Org.OpenAPITools/Models/Tag.cs | 2 +- .../aspnetcore-3.1/src/Org.OpenAPITools/Models/User.cs | 2 +- .../src/Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../src/Org.OpenAPITools/wwwroot/openapi-original.json | 3 ++- .../aspnetcore/src/Org.OpenAPITools/Models/ApiResponse.cs | 2 +- .../aspnetcore/src/Org.OpenAPITools/Models/Category.cs | 2 +- .../aspnetcore/src/Org.OpenAPITools/Models/Order.cs | 2 +- .../petstore/aspnetcore/src/Org.OpenAPITools/Models/Pet.cs | 2 +- .../petstore/aspnetcore/src/Org.OpenAPITools/Models/Tag.cs | 2 +- .../petstore/aspnetcore/src/Org.OpenAPITools/Models/User.cs | 2 +- .../src/Org.OpenAPITools/wwwroot/openapi-original.json | 3 ++- 31 files changed, 34 insertions(+), 25 deletions(-) rename bin/configs/{other => }/aspnetcore-3.0.yaml (100%) rename bin/configs/{other => }/aspnetcore-3.1.yaml (100%) rename bin/configs/{other => }/aspnetcore.yaml (100%) diff --git a/appveyor.yml b/appveyor.yml index 452ce09918da..24610d9100eb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,6 +35,12 @@ install: - ps: Install-Module Pester -Force -Scope CurrentUser build_script: - dotnet --info + # build C# aspnetcore 3.1 server + - dotnet build samples\server\petstore\aspnetcore-3.1\Org.OpenAPITools.sln + # build C# aspnetcore 3.0 server + - dotnet build samples\server\petstore\aspnetcore-3.0\Org.OpenAPITools.sln + # build C# aspnetcore 2.2 server + - dotnet build samples\server\petstore\aspnetcore\Org.OpenAPITools.sln # build C# API client (netcore) - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient\Org.OpenAPITools.sln - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClientCore\Org.OpenAPITools.sln diff --git a/bin/configs/other/aspnetcore-3.0.yaml b/bin/configs/aspnetcore-3.0.yaml similarity index 100% rename from bin/configs/other/aspnetcore-3.0.yaml rename to bin/configs/aspnetcore-3.0.yaml diff --git a/bin/configs/other/aspnetcore-3.1.yaml b/bin/configs/aspnetcore-3.1.yaml similarity index 100% rename from bin/configs/other/aspnetcore-3.1.yaml rename to bin/configs/aspnetcore-3.1.yaml diff --git a/bin/configs/other/aspnetcore.yaml b/bin/configs/aspnetcore.yaml similarity index 100% rename from bin/configs/other/aspnetcore.yaml rename to bin/configs/aspnetcore.yaml diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator-ignore b/samples/server/petstore/aspnetcore-3.0/.openapi-generator-ignore index 7484ee590a38..2832abc18129 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator-ignore +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +src/Org.OpenAPITools/Org.OpenAPITools.csproj diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES index 4de0e6417904..f39431847dff 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES @@ -19,7 +19,6 @@ src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs src/Org.OpenAPITools/Models/User.cs src/Org.OpenAPITools/OpenApi/TypeExtensions.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj src/Org.OpenAPITools/Program.cs src/Org.OpenAPITools/Properties/launchSettings.json src/Org.OpenAPITools/Startup.cs diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/ApiResponse.cs index ef3413980eac..88e45fce388b 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/ApiResponse.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -65,7 +65,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Category.cs index 6ac6a181baf6..e147a10073c9 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Category.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Category.cs @@ -58,7 +58,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Order.cs index 77a4c75a1b17..e9013f0ed0df 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Order.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Order.cs @@ -116,7 +116,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Pet.cs index a814c6e1edfe..d5a816cd5ee1 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Pet.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Pet.cs @@ -118,7 +118,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Tag.cs index f0a131f617ca..090f95cc494f 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Tag.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/Tag.cs @@ -58,7 +58,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/User.cs index 3c8a18d63cf7..4c6d96d08c50 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/User.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Models/User.cs @@ -101,7 +101,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index df1ea5462ab2..abb035c92cbb 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -7,7 +7,7 @@ true Org.OpenAPITools Org.OpenAPITools - 330f2933-9cd6-4bdd-b976-92b33eea1166 + 4bc22b76-ee61-45c3-aae6-47cee9badaa0 Linux ..\.. diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index c72a9d39daa2..26519713741a 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1008,5 +1008,6 @@ "type" : "apiKey" } } - } + }, + "x-original-swagger-version" : "2.0" } diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator-ignore b/samples/server/petstore/aspnetcore-3.1/.openapi-generator-ignore index 7484ee590a38..2832abc18129 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator-ignore +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +src/Org.OpenAPITools/Org.OpenAPITools.csproj diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES index 4de0e6417904..f39431847dff 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES @@ -19,7 +19,6 @@ src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs src/Org.OpenAPITools/Models/User.cs src/Org.OpenAPITools/OpenApi/TypeExtensions.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj src/Org.OpenAPITools/Program.cs src/Org.OpenAPITools/Properties/launchSettings.json src/Org.OpenAPITools/Startup.cs diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/ApiResponse.cs index ef3413980eac..88e45fce388b 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/ApiResponse.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -65,7 +65,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Category.cs index 6ac6a181baf6..e147a10073c9 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Category.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Category.cs @@ -58,7 +58,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Order.cs index 77a4c75a1b17..e9013f0ed0df 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Order.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Order.cs @@ -116,7 +116,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Pet.cs index a814c6e1edfe..d5a816cd5ee1 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Pet.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Pet.cs @@ -118,7 +118,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Tag.cs index f0a131f617ca..090f95cc494f 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Tag.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/Tag.cs @@ -58,7 +58,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/User.cs index 3c8a18d63cf7..4c6d96d08c50 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/User.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Models/User.cs @@ -101,7 +101,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 7b03995abb0f..7668438e876a 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -7,7 +7,7 @@ true Org.OpenAPITools Org.OpenAPITools - 0f711e23-5ed8-438c-ac28-a6dd0b863c05 + 4ddd97dd-77ed-459e-8cd0-dcb2f9e59a70 Linux ..\.. diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json index c72a9d39daa2..26519713741a 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1008,5 +1008,6 @@ "type" : "apiKey" } } - } + }, + "x-original-swagger-version" : "2.0" } diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/ApiResponse.cs index ef3413980eac..88e45fce388b 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/ApiResponse.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -65,7 +65,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Category.cs index 6ac6a181baf6..e147a10073c9 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Category.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Category.cs @@ -58,7 +58,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs index 77a4c75a1b17..e9013f0ed0df 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Order.cs @@ -116,7 +116,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Pet.cs index a814c6e1edfe..d5a816cd5ee1 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Pet.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Pet.cs @@ -118,7 +118,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Tag.cs index f0a131f617ca..090f95cc494f 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Tag.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/Tag.cs @@ -58,7 +58,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/User.cs index 3c8a18d63cf7..4c6d96d08c50 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/User.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Models/User.cs @@ -101,7 +101,7 @@ public override string ToString() /// JSON string presentation of the object public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index c72a9d39daa2..26519713741a 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1008,5 +1008,6 @@ "type" : "apiKey" } } - } + }, + "x-original-swagger-version" : "2.0" }