From bca3d24d20ec557aa0f4a4cc5ec19d9522364c91 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 12 Jun 2016 12:41:35 +0800 Subject: [PATCH] fix test cases, fix warning in exceptionfactory, update .swagger-codegen-ignore for c# to keep logo file (for upload test) --- .../csharp/ExceptionFactory.mustache | 8 ++++ .../main/resources/csharp/api_test.mustache | 6 +-- .../resources/csharp/compile-mono.sh.mustache | 25 ++++++++++- .../main/resources/csharp/compile.mustache | 14 +++++++ .../resources/csharp/mono_nunit_test.mustache | 15 +++++++ .../SwaggerClient/.swagger-codegen-ignore | 1 + .../csharp/SwaggerClient/IO.Swagger.sln | 10 ++--- .../petstore/csharp/SwaggerClient/README.md | 2 +- .../petstore/csharp/SwaggerClient/build.bat | 14 +++++++ .../petstore/csharp/SwaggerClient/build.sh | 25 ++++++++++- .../csharp/SwaggerClient/mono_nunit_test.sh | 15 +++++++ .../src/IO.Swagger.Test/Api/FakeApiTests.cs | 2 +- .../src/IO.Swagger.Test/Api/PetApiTests.cs | 36 ++++++++-------- .../src/IO.Swagger.Test/Api/StoreApiTests.cs | 4 +- .../src/IO.Swagger.Test/Api/UserApiTests.cs | 2 +- .../IO.Swagger.Test/IO.Swagger.Test.csproj | 42 ++++++++++--------- .../Model/AdditionalPropertiesClassTests.cs | 2 +- .../IO.Swagger.Test/Model/AnimalFarmTests.cs | 2 +- .../src/IO.Swagger.Test/Model/AnimalTests.cs | 2 +- .../IO.Swagger.Test/Model/ApiResponseTests.cs | 2 +- .../IO.Swagger.Test/Model/ArrayTestTests.cs | 2 +- .../src/IO.Swagger.Test/Model/CatTests.cs | 2 +- .../IO.Swagger.Test/Model/CategoryTests.cs | 2 +- .../src/IO.Swagger.Test/Model/DogTests.cs | 2 +- .../IO.Swagger.Test/Model/EnumClassTests.cs | 2 +- .../IO.Swagger.Test/Model/EnumTestTests.cs | 2 +- .../IO.Swagger.Test/Model/FormatTestTests.cs | 2 +- ...ertiesAndAdditionalPropertiesClassTests.cs | 2 +- .../Model/Model200ResponseTests.cs | 2 +- .../IO.Swagger.Test/Model/ModelReturnTests.cs | 2 +- .../src/IO.Swagger.Test/Model/NameTests.cs | 2 +- .../src/IO.Swagger.Test/Model/OrderTests.cs | 2 +- .../src/IO.Swagger.Test/Model/PetTests.cs | 2 +- .../Model/ReadOnlyFirstTests.cs | 2 +- .../Model/SpecialModelNameTests.cs | 2 +- .../src/IO.Swagger.Test/Model/TagTests.cs | 2 +- .../src/IO.Swagger.Test/Model/UserTests.cs | 2 +- .../src/IO.Swagger/Client/ExceptionFactory.cs | 29 +++++++++++++ .../src/IO.Swagger/IO.Swagger.csproj | 2 +- 39 files changed, 219 insertions(+), 75 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/csharp/ExceptionFactory.mustache b/modules/swagger-codegen/src/main/resources/csharp/ExceptionFactory.mustache index ad3cd2ac02f..c25b88ee614 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ExceptionFactory.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ExceptionFactory.mustache @@ -1,7 +1,15 @@ +{{>partial_header}} + using System; using RestSharp; namespace {{packageName}}.Client { + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache index 4a4c2f98952..f3f1caeaf0a 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache @@ -51,7 +51,7 @@ namespace {{packageName}}.Test [Test] public void {{operationId}}InstanceTest() { - // TODO uncomment below to test 'IsInstanceOfType' {{classname}} + // test 'IsInstanceOfType' {{classname}} Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}"); } @@ -62,9 +62,9 @@ namespace {{packageName}}.Test [Test] public void {{operationId}}Test() { - // TODO uncomment below to test the method '{{operationId}}' + // TODO uncomment below to test the method and replace null with proper value {{#allParams}} - //{{{dataType}}} {{paramName}} = null; // TODO: replace null with proper value + //{{{dataType}}} {{paramName}} = null; {{/allParams}} //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#returnType}}//Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}} diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache index ea35b5d0b9c..7aab3657090 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache @@ -1,4 +1,19 @@ #!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + frameworkVersion={{targetFrameworkNuget}} netfx=${frameworkVersion#net} @@ -8,9 +23,9 @@ echo "[INFO] Download nuget and packages" wget -nc https://nuget.org/nuget.exe; mozroots --import --sync mono nuget.exe install src/{{packageName}}/packages.config -o packages; -mkdir -p bin; echo "[INFO] Copy DLLs to the 'bin' folder" +mkdir -p bin; cp packages/Newtonsoft.Json.8.0.3/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll; @@ -23,3 +38,11 @@ System.Runtime.Serialization.dll \ -recurse:'src/{{packageName}}/*.cs' \ -doc:bin/{{packageName}}.xml \ -platform:anycpu + +if [ $? -ne 0 ] +then + echo "[ERROR] Compilation failed with exit code $?" + exit 1 +else + echo "[INFO] bin/{{{packageName}}}.dll was created successfully" +fi diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache index 0164719456a..5da333f4e72 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache @@ -1,3 +1,17 @@ +:: Generated by: https://github.com/swagger-api/swagger-codegen.git +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + @echo off {{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}} diff --git a/modules/swagger-codegen/src/main/resources/csharp/mono_nunit_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/mono_nunit_test.mustache index 52daa1c5063..114e86a7a28 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/mono_nunit_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/mono_nunit_test.mustache @@ -1,4 +1,19 @@ #!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + wget -nc https://nuget.org/nuget.exe mozroots --import --sync diff --git a/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen-ignore b/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen-ignore index 19d3377182e..61ed08d3455 100644 --- a/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen-ignore +++ b/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +src/IO.Swagger.Test/IO.Swagger.Test.csproj diff --git a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln index 6fc67c0bb51..95488d816b9 100644 --- a/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln +++ b/samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{64A65E8F-EACE-4663-9B82-B565E01CFEAE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{7B20DAE3-B510-4814-8986-CF1B89EA039E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU -{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU -{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Release|Any CPU.Build.0 = Release|Any CPU +{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Debug|Any CPU.Build.0 = Debug|Any CPU +{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Release|Any CPU.ActiveCfg = Release|Any CPU +{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index 8191778b36e..a0bd0780740 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c - API version: 1.0.0 - SDK version: 1.0.0 -- Build date: 2016-06-12T01:56:22.092+08:00 +- Build date: 2016-06-12T12:38:46.317+08:00 - Build package: class io.swagger.codegen.languages.CSharpClientCodegen ## Frameworks supported diff --git a/samples/client/petstore/csharp/SwaggerClient/build.bat b/samples/client/petstore/csharp/SwaggerClient/build.bat index b0cdda9c0b2..ae94b120d7b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/build.bat +++ b/samples/client/petstore/csharp/SwaggerClient/build.bat @@ -1,3 +1,17 @@ +:: Generated by: https://github.com/swagger-api/swagger-codegen.git +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + @echo off SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 diff --git a/samples/client/petstore/csharp/SwaggerClient/build.sh b/samples/client/petstore/csharp/SwaggerClient/build.sh index 63cf08bc35c..25228f3cc36 100644 --- a/samples/client/petstore/csharp/SwaggerClient/build.sh +++ b/samples/client/petstore/csharp/SwaggerClient/build.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + frameworkVersion=net45 netfx=${frameworkVersion#net} @@ -8,9 +23,9 @@ echo "[INFO] Download nuget and packages" wget -nc https://nuget.org/nuget.exe; mozroots --import --sync mono nuget.exe install src/IO.Swagger/packages.config -o packages; -mkdir -p bin; echo "[INFO] Copy DLLs to the 'bin' folder" +mkdir -p bin; cp packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; @@ -23,3 +38,11 @@ System.Runtime.Serialization.dll \ -recurse:'src/IO.Swagger/*.cs' \ -doc:bin/IO.Swagger.xml \ -platform:anycpu + +if [ $? -ne 0 ] +then + echo "[ERROR] Compilation failed with exit code $?" + exit 1 +else + echo "[INFO] bin/IO.Swagger.dll was created successfully" +fi diff --git a/samples/client/petstore/csharp/SwaggerClient/mono_nunit_test.sh b/samples/client/petstore/csharp/SwaggerClient/mono_nunit_test.sh index 43d93618448..45626ecad48 100644 --- a/samples/client/petstore/csharp/SwaggerClient/mono_nunit_test.sh +++ b/samples/client/petstore/csharp/SwaggerClient/mono_nunit_test.sh @@ -1,4 +1,19 @@ #!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + wget -nc https://nuget.org/nuget.exe mozroots --import --sync diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs index 71a4063af4e..7f537b16558 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/FakeApiTests.cs @@ -48,7 +48,7 @@ namespace IO.Swagger.Test [Test] public void InstanceTest() { - Assert.IsInstanceOf (instance, "instance is a FakeApi"); + Assert.IsInstanceOfType(typeof(FakeApi), instance, "instance is a FakeApi"); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs index b9dae814b68..0d517af68b5 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/PetApiTests.cs @@ -97,7 +97,7 @@ namespace IO.Swagger.Test [Test] public void InstanceTest() { - Assert.IsInstanceOf (instance, "instance is a PetApi"); + Assert.IsInstanceOfType(typeof(PetApi), instance, "instance is a PetApi"); } @@ -134,7 +134,7 @@ namespace IO.Swagger.Test List listPet = petApi.FindPetsByTags (tagsList); foreach (Pet pet in listPet) // Loop through List with foreach. { - Assert.IsInstanceOf (pet, "Response is a Pet"); + Assert.IsInstanceOfType(typeof(Pet), pet, "Response is a Pet"); Assert.AreEqual ("csharp sample tag name1", pet.Tags[0]); } } @@ -147,7 +147,7 @@ namespace IO.Swagger.Test { List tags = new List(new String[] {"pet"}); var response = instance.FindPetsByTags(tags); - Assert.IsInstanceOf> (response, "response is List"); + Assert.IsInstanceOfType(typeof(List), response, "response is List"); } /// @@ -161,19 +161,19 @@ namespace IO.Swagger.Test PetApi petApi = new PetApi (c1); Pet response = petApi.GetPetById (petId); - Assert.IsInstanceOf (response, "Response is a Pet"); + Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet"); Assert.AreEqual ("Csharp test", response.Name); Assert.AreEqual (Pet.StatusEnum.Available, response.Status); - Assert.IsInstanceOf> (response.Tags, "Response.Tags is a Array"); + Assert.IsInstanceOfType(typeof(List), response.Tags, "Response.Tags is a Array"); Assert.AreEqual (petId, response.Tags [0].Id); Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name); - Assert.IsInstanceOf> (response.PhotoUrls, "Response.PhotoUrls is a Array"); + Assert.IsInstanceOfType(typeof(List), response.PhotoUrls, "Response.PhotoUrls is a Array"); Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]); - Assert.IsInstanceOf (response.Category, "Response.Category is a Category"); + Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category"); Assert.AreEqual (56, response.Category.Id); Assert.AreEqual ("sample category name2", response.Category.Name); } @@ -187,19 +187,19 @@ namespace IO.Swagger.Test PetApi petApi = new PetApi (); var task = petApi.GetPetByIdAsync (petId); Pet response = task.Result; - Assert.IsInstanceOf (response, "Response is a Pet"); + Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet"); Assert.AreEqual ("Csharp test", response.Name); Assert.AreEqual (Pet.StatusEnum.Available, response.Status); - Assert.IsInstanceOf> (response.Tags, "Response.Tags is a Array"); + Assert.IsInstanceOfType(typeof(List), response.Tags, "Response.Tags is a Array"); Assert.AreEqual (petId, response.Tags [0].Id); Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name); - Assert.IsInstanceOf> (response.PhotoUrls, "Response.PhotoUrls is a Array"); + Assert.IsInstanceOfType(typeof(List), response.PhotoUrls, "Response.PhotoUrls is a Array"); Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]); - Assert.IsInstanceOf (response.Category, "Response.Category is a Category"); + Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category"); Assert.AreEqual (56, response.Category.Id); Assert.AreEqual ("sample category name2", response.Category.Name); @@ -219,19 +219,19 @@ namespace IO.Swagger.Test Assert.AreEqual (task.Result.Headers["Content-Type"], "application/json"); Pet response = task.Result.Data; - Assert.IsInstanceOf (response, "Response is a Pet"); + Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet"); Assert.AreEqual ("Csharp test", response.Name); Assert.AreEqual (Pet.StatusEnum.Available, response.Status); - Assert.IsInstanceOf> (response.Tags, "Response.Tags is a Array"); + Assert.IsInstanceOfType(typeof(List), response.Tags, "Response.Tags is a Array"); Assert.AreEqual (petId, response.Tags [0].Id); Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name); - Assert.IsInstanceOf> (response.PhotoUrls, "Response.PhotoUrls is a Array"); + Assert.IsInstanceOfType(typeof(List), response.PhotoUrls, "Response.PhotoUrls is a Array"); Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]); - Assert.IsInstanceOf (response.Category, "Response.Category is a Category"); + Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category"); Assert.AreEqual (56, response.Category.Id); Assert.AreEqual ("sample category name2", response.Category.Name); @@ -258,9 +258,9 @@ namespace IO.Swagger.Test petApi.UpdatePetWithForm (petId, "new form name", "pending"); Pet response = petApi.GetPetById (petId); - Assert.IsInstanceOf (response, "Response is a Pet"); - Assert.IsInstanceOf (response.Category, "Response.Category is a Category"); - Assert.IsInstanceOf> (response.Tags, "Response.Tags is a Array"); + Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet"); + Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category"); + Assert.IsInstanceOfType(typeof(List), response.Tags, "Response.Tags is a Array"); Assert.AreEqual ("new form name", response.Name); Assert.AreEqual (Pet.StatusEnum.Pending, response.Status); diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/StoreApiTests.cs index e1237b51c0b..2ca3b35f30d 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/StoreApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/StoreApiTests.cs @@ -50,7 +50,7 @@ namespace IO.Swagger.Test [Test] public void InstanceTest() { - Assert.IsInstanceOf (instance, "instance is a StoreApi"); + Assert.IsInstanceOfType(typeof(StoreApi), instance, "instance is a StoreApi"); } @@ -84,7 +84,7 @@ namespace IO.Swagger.Test foreach(KeyValuePair entry in response) { - Assert.IsInstanceOf (typeof(int?), entry.Value); + Assert.IsInstanceOfType(typeof(int?), entry.Value); } } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/UserApiTests.cs index 77f6bd5ec99..31edf492923 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Api/UserApiTests.cs @@ -49,7 +49,7 @@ namespace IO.Swagger.Test [Test] public void InstanceTest() { - Assert.IsInstanceOf (instance, "instance is a UserApi"); + Assert.IsInstanceOfType(typeof(UserApi), instance, "instance is a UserApi"); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj index 9f21997895b..5660f132a37 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/IO.Swagger.Test.csproj @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - + Debug AnyCPU @@ -59,36 +59,38 @@ limitations under the License. - $(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + $(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - $(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll - ..\packages\NUnit.3.2.1\lib\nunit.framework.dll - ..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll - ..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll + ..\packages\NUnit.3.2.1\lib\nunit.framework.dll + ..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll + ..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll - + - + - - {64A65E8F-EACE-4663-9B82-B565E01CFEAE} - IO.Swagger - + + {85AE8212-9819-4224-A9E5-B93419EC927B} + IO.Swagger + + + + - diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AdditionalPropertiesClassTests.cs index fca6d20d0dc..b4680801e4c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AdditionalPropertiesClassTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void AdditionalPropertiesClassInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a AdditionalPropertiesClass"); + Assert.IsInstanceOfType(typeof(AdditionalPropertiesClass), instance, "instance is a AdditionalPropertiesClass"); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalFarmTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalFarmTests.cs index 5baa4d93485..6e824fbfd84 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalFarmTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalFarmTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void AnimalFarmInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a AnimalFarm"); + Assert.IsInstanceOfType(typeof(AnimalFarm), instance, "instance is a AnimalFarm"); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalTests.cs index e7356e3750d..59cd4d76d68 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void AnimalInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Animal"); + Assert.IsInstanceOfType(typeof(Animal), instance, "instance is a Animal"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ApiResponseTests.cs index c2535cdadb3..13d4310916b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ApiResponseTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ApiResponseTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void ApiResponseInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a ApiResponse"); + Assert.IsInstanceOfType(typeof(ApiResponse), instance, "instance is a ApiResponse"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs index fd6b6f31d86..c063340171f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ArrayTestTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void ArrayTestInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a ArrayTest"); + Assert.IsInstanceOfType(typeof(ArrayTest), instance, "instance is a ArrayTest"); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CatTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CatTests.cs index 72e65f60bf0..8a6abb12f62 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CatTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void CatInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Cat"); + Assert.IsInstanceOfType(typeof(Cat), instance, "instance is a Cat"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CategoryTests.cs index 96e5d946c0b..3c7ba0499aa 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/CategoryTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void CategoryInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Category"); + Assert.IsInstanceOfType(typeof(Category), instance, "instance is a Category"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogTests.cs index 624c16d479d..5d3b6fef175 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void DogInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Dog"); + Assert.IsInstanceOfType(typeof(Dog), instance, "instance is a Dog"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumClassTests.cs index d2a3fc86c78..154e3c7b57a 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumClassTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumClassTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void EnumClassInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a EnumClass"); + Assert.IsInstanceOfType(typeof(EnumClass), instance, "instance is a EnumClass"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumTestTests.cs index 2679b085233..9ea929a0cd6 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumTestTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void EnumTestInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a EnumTest"); + Assert.IsInstanceOfType(typeof(EnumTest), instance, "instance is a EnumTest"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FormatTestTests.cs index e1d59bcc174..1d2d334a45e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FormatTestTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void FormatTestInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a FormatTest"); + Assert.IsInstanceOfType(typeof(FormatTest), instance, "instance is a FormatTest"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs index e21779241db..2157758ec1f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a MixedPropertiesAndAdditionalPropertiesClass"); + Assert.IsInstanceOfType(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance, "instance is a MixedPropertiesAndAdditionalPropertiesClass"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/Model200ResponseTests.cs index eb55902a998..13bbc1b1c7d 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/Model200ResponseTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void Model200ResponseInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Model200Response"); + Assert.IsInstanceOfType(typeof(Model200Response), instance, "instance is a Model200Response"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelReturnTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelReturnTests.cs index 1c620b73241..53e62fc51a3 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelReturnTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelReturnTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void ModelReturnInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a ModelReturn"); + Assert.IsInstanceOfType(typeof(ModelReturn), instance, "instance is a ModelReturn"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NameTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NameTests.cs index d8fbafe238c..d1e0deec41f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NameTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void NameInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Name"); + Assert.IsInstanceOfType(typeof(Name), instance, "instance is a Name"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/OrderTests.cs index 2d55d2300f9..799b6ef43f8 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/OrderTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/OrderTests.cs @@ -57,7 +57,7 @@ namespace IO.Swagger.Test [Test] public void OrderInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Order"); + Assert.IsInstanceOfType(typeof(Order), instance, "instance is a Order"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs index 24be033f6c5..7029264ee06 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetTests.cs @@ -49,7 +49,7 @@ namespace IO.Swagger.Test [Test] public void PetInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Pet"); + Assert.IsInstanceOfType(typeof(Pet), instance, "instance is a Pet"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ReadOnlyFirstTests.cs index 9aa3cec42b2..e0c4029546b 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ReadOnlyFirstTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ReadOnlyFirstTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void ReadOnlyFirstInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a ReadOnlyFirst"); + Assert.IsInstanceOfType(typeof(ReadOnlyFirst), instance, "instance is a ReadOnlyFirst"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SpecialModelNameTests.cs index 21051e71f54..eec6e837449 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SpecialModelNameTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void SpecialModelNameInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a SpecialModelName"); + Assert.IsInstanceOfType(typeof(SpecialModelName), instance, "instance is a SpecialModelName"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/TagTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/TagTests.cs index 4fff0e4c12d..2b78594eb6f 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/TagTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/TagTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void TagInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a Tag"); + Assert.IsInstanceOfType(typeof(Tag), instance, "instance is a Tag"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/UserTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/UserTests.cs index 38f2667c403..59451079ebf 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/UserTests.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/UserTests.cs @@ -47,7 +47,7 @@ namespace IO.Swagger.Test [Test] public void UserInstanceTest() { - Assert.IsInstanceOf (instance, "instance is a User"); + Assert.IsInstanceOfType(typeof(User), instance, "instance is a User"); } /// diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs index 24e5fad478f..579cb8618c2 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs @@ -1,7 +1,36 @@ +/* + * Swagger Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + using System; using RestSharp; namespace IO.Swagger.Client { + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj index 844d959bcff..d878c812396 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.csproj @@ -24,7 +24,7 @@ limitations under the License. Debug AnyCPU - {64A65E8F-EACE-4663-9B82-B565E01CFEAE} + {7B20DAE3-B510-4814-8986-CF1B89EA039E} Library Properties Swagger Library