From 4ce255dc38ed4dbc074fc5d4e106df19cdbe85c7 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 31 Jan 2016 01:52:41 +0800 Subject: [PATCH] add unit test files for C# --- .../languages/CSharpClientCodegen.java | 24 +++ .../main/resources/csharp/api_test.mustache | 61 ++++++++ .../main/resources/csharp/model_test.mustache | 63 ++++++++ .../Lib/SwaggerClient.Test/CategoryTests.cs | 68 +++++++++ .../Lib/SwaggerClient.Test/OrderTests.cs | 104 +++++++++++++ .../Lib/SwaggerClient.Test/PetApiTests.cs | 141 ++++++++++++++++++ .../Lib/SwaggerClient.Test/PetTests.cs | 104 +++++++++++++ .../Lib/SwaggerClient.Test/StoreApiTests.cs | 87 +++++++++++ .../Lib/SwaggerClient.Test/TagTests.cs | 68 +++++++++ .../Lib/SwaggerClient.Test/UserApiTests.cs | 123 +++++++++++++++ .../Lib/SwaggerClient.Test/UserTests.cs | 122 +++++++++++++++ .../Lib/SwaggerClient/README.md | 3 +- .../main/csharp/IO/Swagger/Model/Category.cs | 1 + .../src/main/csharp/IO/Swagger/Model/Order.cs | 1 + .../src/main/csharp/IO/Swagger/Model/Pet.cs | 1 + .../src/main/csharp/IO/Swagger/Model/Tag.cs | 1 + .../src/main/csharp/IO/Swagger/Model/User.cs | 1 + 17 files changed, 972 insertions(+), 1 deletion(-) create mode 100644 modules/swagger-codegen/src/main/resources/csharp/api_test.mustache create mode 100644 modules/swagger-codegen/src/main/resources/csharp/model_test.mustache create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs create mode 100644 samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java index 7697bd5b027..991b60cd495 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/CSharpClientCodegen.java @@ -41,6 +41,7 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig protected String packageVersion = "1.0.0"; protected String clientPackage = "IO.Swagger.Client"; protected String sourceFolder = "src" + File.separator + "main" + File.separator + "csharp"; + protected String testFolder = "Test"; public CSharpClientCodegen() { super(); @@ -51,6 +52,9 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig apiPackage = "IO.Swagger.Api"; modelPackage = "IO.Swagger.Model"; + modelTestTemplateFiles.put("model_test.mustache", ".cs"); + apiTestTemplateFiles.put("api_test.mustache", ".cs"); + reservedWords = new HashSet( Arrays.asList( // local variable names in API methods (endpoints) @@ -270,6 +274,16 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig return "_" + name; } + @Override + public String apiTestFileFolder() { + return outputFolder + ".Test"; + } + + @Override + public String modelTestFileFolder() { + return outputFolder + ".Test"; + } + @Override public String apiFileFolder() { return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar); @@ -342,6 +356,16 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig return toModelName(name); } + @Override + public String toApiTestFilename(String name) { + return toApiName(name) + "Tests"; + } + + @Override + public String toModelTestFilename(String name) { + return toModelName(name) + "Tests"; + } + @Override public Map postProcessOperations(Map objs) { super.postProcessOperations(objs); diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache new file mode 100644 index 00000000000..3afe27063dd --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache @@ -0,0 +1,61 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using {{packageName}}.Client; +using {{packageName}}.Api; +{{#hasImport}}using {{packageName}}.Model; +{{/hasImport}} + +namespace {{packageName}}.Test +{ + [TestFixture] + public class {{classname}}Tests + { + private {{classname}} instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new {{classname}}(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of {{classname}} + /// + [Test] + public void {{operationId}}InstanceTest() + { + Assert.IsInstanceOf<{{classname}}> (instance, "instance is a {{classname}}"); + } + + {{#operations}}{{#operation}} + /// + /// Test {{operationId}} + /// + [Test] + public void {{operationId}}Test() + { + // TODO: add unit test for the method '{{operationId}}' + } + {{/operation}}{{/operations}} + } + +} diff --git a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache new file mode 100644 index 00000000000..5b70f3ebf80 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache @@ -0,0 +1,63 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using {{packageName}}.Api; +using {{packageName}}.Model; +using {{packageName}}.Client; +using System.Reflection; + +{{#models}} +{{#model}} +namespace {{packageName}}.Test +{ + [TestFixture] + public class {{classname}}Tests + { + private {{classname}} instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new {{classname}}(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of {{classname}} + /// + [Test] + public void {{classname}}InstanceTest() + { + Assert.IsInstanceOf<{{classname}}> (instance, "instance is a {{classname}}"); + } + + {{#vars}} + /// + /// Test the property '{{name}}' + /// + [Test] + public void {{name}}Test() + { + // TODO: unit test for the property '{{name}}' + } + {{/vars}} + + } + +} +{{/model}} +{{/models}} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs new file mode 100644 index 00000000000..6384ee4179b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs @@ -0,0 +1,68 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class CategoryTests + { + private Category instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Category(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Category + /// + [Test] + public void CategoryInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Category"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO: unit test for the property 'Id' + } + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO: unit test for the property 'Name' + } + + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs new file mode 100644 index 00000000000..7d0bc854cef --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs @@ -0,0 +1,104 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class OrderTests + { + private Order instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Order(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Order + /// + [Test] + public void OrderInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Order"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO: unit test for the property 'Id' + } + + /// + /// Test the property 'PetId' + /// + [Test] + public void PetIdTest() + { + // TODO: unit test for the property 'PetId' + } + + /// + /// Test the property 'Quantity' + /// + [Test] + public void QuantityTest() + { + // TODO: unit test for the property 'Quantity' + } + + /// + /// Test the property 'ShipDate' + /// + [Test] + public void ShipDateTest() + { + // TODO: unit test for the property 'ShipDate' + } + + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO: unit test for the property 'Status' + } + + /// + /// Test the property 'Complete' + /// + [Test] + public void CompleteTest() + { + // TODO: unit test for the property 'Complete' + } + + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs new file mode 100644 index 00000000000..aeb2f1262b9 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs @@ -0,0 +1,141 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class PetApiTests + { + private PetApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new PetApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetApi + /// + [Test] + public void InstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a PetApi"); + } + + + /// + /// Test UpdatePet + /// + [Test] + public void UpdatePetTest() + { + // TODO: add unit test for the method 'UpdatePet' + } + + /// + /// Test AddPet + /// + [Test] + public void AddPetTest() + { + // TODO: add unit test for the method 'AddPet' + } + + /// + /// Test FindPetsByStatus + /// + [Test] + public void FindPetsByStatusTest() + { + // TODO: add unit test for the method 'FindPetsByStatus' + } + + /// + /// Test FindPetsByTags + /// + [Test] + public void FindPetsByTagsTest() + { + // TODO: add unit test for the method 'FindPetsByTags' + } + + /// + /// Test GetPetById + /// + [Test] + public void GetPetByIdTest() + { + // TODO: add unit test for the method 'GetPetById' + } + + /// + /// Test UpdatePetWithForm + /// + [Test] + public void UpdatePetWithFormTest() + { + // TODO: add unit test for the method 'UpdatePetWithForm' + } + + /// + /// Test DeletePet + /// + [Test] + public void DeletePetTest() + { + // TODO: add unit test for the method 'DeletePet' + } + + /// + /// Test UploadFile + /// + [Test] + public void UploadFileTest() + { + // TODO: add unit test for the method 'UploadFile' + } + + /// + /// Test GetPetByIdWithByteArray + /// + [Test] + public void GetPetByIdWithByteArrayTest() + { + // TODO: add unit test for the method 'GetPetByIdWithByteArray' + } + + /// + /// Test AddPetUsingByteArray + /// + [Test] + public void AddPetUsingByteArrayTest() + { + // TODO: add unit test for the method 'AddPetUsingByteArray' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs new file mode 100644 index 00000000000..6b203dbd125 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs @@ -0,0 +1,104 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class PetTests + { + private Pet instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Pet(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Pet + /// + [Test] + public void PetInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Pet"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO: unit test for the property 'Id' + } + + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO: unit test for the property 'Category' + } + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO: unit test for the property 'Name' + } + + /// + /// Test the property 'PhotoUrls' + /// + [Test] + public void PhotoUrlsTest() + { + // TODO: unit test for the property 'PhotoUrls' + } + + /// + /// Test the property 'Tags' + /// + [Test] + public void TagsTest() + { + // TODO: unit test for the property 'Tags' + } + + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO: unit test for the property 'Status' + } + + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs new file mode 100644 index 00000000000..f271564e62b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs @@ -0,0 +1,87 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class StoreApiTests + { + private StoreApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new StoreApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of StoreApi + /// + [Test] + public void InstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a StoreApi"); + } + + + /// + /// Test GetInventory + /// + [Test] + public void GetInventoryTest() + { + // TODO: add unit test for the method 'GetInventory' + } + + /// + /// Test PlaceOrder + /// + [Test] + public void PlaceOrderTest() + { + // TODO: add unit test for the method 'PlaceOrder' + } + + /// + /// Test GetOrderById + /// + [Test] + public void GetOrderByIdTest() + { + // TODO: add unit test for the method 'GetOrderById' + } + + /// + /// Test DeleteOrder + /// + [Test] + public void DeleteOrderTest() + { + // TODO: add unit test for the method 'DeleteOrder' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs new file mode 100644 index 00000000000..ad772584cc5 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs @@ -0,0 +1,68 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class TagTests + { + private Tag instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Tag(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Tag + /// + [Test] + public void TagInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Tag"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO: unit test for the property 'Id' + } + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO: unit test for the property 'Name' + } + + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs new file mode 100644 index 00000000000..13d62345eb9 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs @@ -0,0 +1,123 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using IO.Swagger.Client; +using IO.Swagger.Api; +using IO.Swagger.Model; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class UserApiTests + { + private UserApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new UserApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of UserApi + /// + [Test] + public void InstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a UserApi"); + } + + + /// + /// Test CreateUser + /// + [Test] + public void CreateUserTest() + { + // TODO: add unit test for the method 'CreateUser' + } + + /// + /// Test CreateUsersWithArrayInput + /// + [Test] + public void CreateUsersWithArrayInputTest() + { + // TODO: add unit test for the method 'CreateUsersWithArrayInput' + } + + /// + /// Test CreateUsersWithListInput + /// + [Test] + public void CreateUsersWithListInputTest() + { + // TODO: add unit test for the method 'CreateUsersWithListInput' + } + + /// + /// Test LoginUser + /// + [Test] + public void LoginUserTest() + { + // TODO: add unit test for the method 'LoginUser' + } + + /// + /// Test LogoutUser + /// + [Test] + public void LogoutUserTest() + { + // TODO: add unit test for the method 'LogoutUser' + } + + /// + /// Test GetUserByName + /// + [Test] + public void GetUserByNameTest() + { + // TODO: add unit test for the method 'GetUserByName' + } + + /// + /// Test UpdateUser + /// + [Test] + public void UpdateUserTest() + { + // TODO: add unit test for the method 'UpdateUser' + } + + /// + /// Test DeleteUser + /// + [Test] + public void DeleteUserTest() + { + // TODO: add unit test for the method 'DeleteUser' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs new file mode 100644 index 00000000000..4610313b734 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs @@ -0,0 +1,122 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + [TestFixture] + public class UserTests + { + private User instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new User(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of User + /// + [Test] + public void UserInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a User"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO: unit test for the property 'Id' + } + + /// + /// Test the property 'Username' + /// + [Test] + public void UsernameTest() + { + // TODO: unit test for the property 'Username' + } + + /// + /// Test the property 'FirstName' + /// + [Test] + public void FirstNameTest() + { + // TODO: unit test for the property 'FirstName' + } + + /// + /// Test the property 'LastName' + /// + [Test] + public void LastNameTest() + { + // TODO: unit test for the property 'LastName' + } + + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO: unit test for the property 'Email' + } + + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO: unit test for the property 'Password' + } + + /// + /// Test the property 'Phone' + /// + [Test] + public void PhoneTest() + { + // TODO: unit test for the property 'Phone' + } + + /// + /// Test the property 'UserStatus' + /// + [Test] + public void UserStatusTest() + { + // TODO: unit test for the property 'UserStatus' + } + + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md index 8d71999564f..3ce83da957b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md @@ -10,7 +10,8 @@ NOTE: The DLLs included in the package may not be the latest version. We recommn ``` Install-Package RestSharp Install-Package Newtonsoft.Json -``` +``` + ## Installation Run the following command to generate the DLL - [Mac/Linux] compile-mono.sh diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs index 11223d88991..681d878531b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs index c09efc1acf1..09b595410af 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs index 313103a3b8a..f36ceed9357 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs index 2c1cb092a35..fab0081f0bc 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs index abbcea65b58..42c5b98100f 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs @@ -4,6 +4,7 @@ using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json;