diff --git a/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION b/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION index 6e256321c31..86820ab0dd0 100644 --- a/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION +++ b/samples/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClient/README.md index df0b5851b28..960b327e794 100644 --- a/samples/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClient/README.md @@ -147,26 +147,24 @@ Class | Method | HTTP request | Description - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - [Model.Animal](docs/Animal.md) + - [Model.AnimalAnimalIdBody](docs/AnimalAnimalIdBody.md) - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) - - [Model.Body3](docs/Body3.md) - - [Model.Body4](docs/Body4.md) - - [Model.Body5](docs/Body5.md) - - [Model.Body6](docs/Body6.md) - - [Model.Body7](docs/Body7.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.ClassModel](docs/ClassModel.md) - [Model.Dog](docs/Dog.md) + - [Model.DogDogIdBody](docs/DogDogIdBody.md) - [Model.EnumArrays](docs/EnumArrays.md) - [Model.EnumClass](docs/EnumClass.md) + - [Model.EnumFormBody](docs/EnumFormBody.md) - [Model.EnumTest](docs/EnumTest.md) + - [Model.FakeBody](docs/FakeBody.md) + - [Model.FakeBody1](docs/FakeBody1.md) + - [Model.FakeJsonFormDataBody](docs/FakeJsonFormDataBody.md) - [Model.FormatTest](docs/FormatTest.md) - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Model.MapTest](docs/MapTest.md) @@ -185,6 +183,8 @@ Class | Method | HTTP request | Description - [Model.OuterComposite](docs/OuterComposite.md) - [Model.OuterEnum](docs/OuterEnum.md) - [Model.Pet](docs/Pet.md) + - [Model.PetIdUploadImageBody](docs/PetIdUploadImageBody.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.SinglePetResponse](docs/SinglePetResponse.md) - [Model.SpecialModelName](docs/SpecialModelName.md) @@ -221,5 +221,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/AnimalAnimalIdBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/AnimalAnimalIdBody.md new file mode 100644 index 00000000000..9918bf4bfa3 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/AnimalAnimalIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.AnimalAnimalIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the animal | [optional] +**Status** | **string** | Updated status of the animal | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/DogDogIdBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/DogDogIdBody.md new file mode 100644 index 00000000000..87c71e12347 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/DogDogIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.DogDogIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the dog | [optional] +**Status** | **string** | Updated status of the dog | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/EnumFormBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/EnumFormBody.md new file mode 100644 index 00000000000..57eb49c39fd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/EnumFormBody.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.EnumFormBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional] +**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg] +**EnumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md index bda2fc3c44b..d058c93344c 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md @@ -313,7 +313,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEndpointParameters** -> void TestEndpointParameters (Body2 body) +> void TestEndpointParameters (FakeBody body) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -338,7 +338,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var body = new Body2(); // Body2 | + var body = new FakeBody(); // FakeBody | try { @@ -358,7 +358,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | + **body** | [**FakeBody**](FakeBody.md)| | ### Return type @@ -443,7 +443,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEnumRequestBody** -> void TestEnumRequestBody (Body4 body = null) +> void TestEnumRequestBody (EnumFormBody body = null) To test enum parameters @@ -464,7 +464,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body4(); // Body4 | (optional) + var body = new EnumFormBody(); // EnumFormBody | (optional) try { @@ -484,7 +484,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body4**](Body4.md)| | [optional] + **body** | [**EnumFormBody**](EnumFormBody.md)| | [optional] ### Return type @@ -559,7 +559,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestJsonFormData** -> void TestJsonFormData (Body5 body) +> void TestJsonFormData (FakeJsonFormDataBody body) test json serialization of form data @@ -578,7 +578,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body5(); // Body5 | + var body = new FakeJsonFormDataBody(); // FakeJsonFormDataBody | try { @@ -598,7 +598,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body5**](Body5.md)| | + **body** | [**FakeJsonFormDataBody**](FakeJsonFormDataBody.md)| | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeBody.md new file mode 100644 index 00000000000..94f8e388c8a --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeBody.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeBody1.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeBody1.md new file mode 100644 index 00000000000..5d5a88da008 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeBody1.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/FakeJsonFormDataBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/FakeJsonFormDataBody.md new file mode 100644 index 00000000000..b11b38e2375 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/FakeJsonFormDataBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.FakeJsonFormDataBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Param** | **string** | field1 | +**Param2** | **string** | field2 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/PetIdUploadImageBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/PetIdUploadImageBody.md new file mode 100644 index 00000000000..956c84b2c37 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/PetIdUploadImageBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetIdUploadImageBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalMetadata** | **string** | Additional data to pass to server | [optional] +**File** | **byte[]** | file to upload | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md b/samples/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/SinglePetResponse.md b/samples/client/petstore/csharp/SwaggerClient/docs/SinglePetResponse.md index 9508d6cc0e9..a922823c936 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/SinglePetResponse.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/SinglePetResponse.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] +**Pet** | **OneOfSinglePetResponsePet** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/docs/SubCategory.md b/samples/client/petstore/csharp/SwaggerClient/docs/SubCategory.md index ab7f72772e8..0353116e609 100644 --- a/samples/client/petstore/csharp/SwaggerClient/docs/SubCategory.md +++ b/samples/client/petstore/csharp/SwaggerClient/docs/SubCategory.md @@ -3,9 +3,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Category** | [**AllOfSubCategoryCategory**](AllOfSubCategoryCategory.md) | | [optional] +**Category** | **AllOfSubCategoryCategory** | | [optional] **Category2** | [**Category**](Category.md) | | [optional] -**Pets** | [**List<AllOfSubCategoryPetsItems>**](.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs new file mode 100644 index 00000000000..3e9dd307be0 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnimalAnimalIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnimalAnimalIdBodyTests + { + // TODO uncomment below to declare an instance variable for AnimalAnimalIdBody + //private AnimalAnimalIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnimalAnimalIdBody + //instance = new AnimalAnimalIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnimalAnimalIdBody + /// + [Test] + public void AnimalAnimalIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnimalAnimalIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnimalAnimalIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs new file mode 100644 index 00000000000..b431d1d49fc --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing DogDogIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DogDogIdBodyTests + { + // TODO uncomment below to declare an instance variable for DogDogIdBody + //private DogDogIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DogDogIdBody + //instance = new DogDogIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DogDogIdBody + /// + [Test] + public void DogDogIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DogDogIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DogDogIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs new file mode 100644 index 00000000000..dd24248665e --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs @@ -0,0 +1,95 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing EnumFormBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class EnumFormBodyTests + { + // TODO uncomment below to declare an instance variable for EnumFormBody + //private EnumFormBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of EnumFormBody + //instance = new EnumFormBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of EnumFormBody + /// + [Test] + public void EnumFormBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" EnumFormBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumFormBody"); + } + + + /// + /// Test the property 'EnumFormStringArray' + /// + [Test] + public void EnumFormStringArrayTest() + { + // TODO unit test for the property 'EnumFormStringArray' + } + /// + /// Test the property 'EnumFormString' + /// + [Test] + public void EnumFormStringTest() + { + // TODO unit test for the property 'EnumFormString' + } + /// + /// Test the property 'EnumQueryDouble' + /// + [Test] + public void EnumQueryDoubleTest() + { + // TODO unit test for the property 'EnumQueryDouble' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeBody1Tests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeBody1Tests.cs new file mode 100644 index 00000000000..70b4f62e937 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeBody1Tests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBody1Tests + { + // TODO uncomment below to declare an instance variable for FakeBody1 + //private FakeBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody1 + //instance = new FakeBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody1 + /// + [Test] + public void FakeBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody1"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeBodyTests.cs new file mode 100644 index 00000000000..df2ccabdddd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeBodyTests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBodyTests + { + // TODO uncomment below to declare an instance variable for FakeBody + //private FakeBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody + //instance = new FakeBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody + /// + [Test] + public void FakeBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs new file mode 100644 index 00000000000..f43855b7a32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeJsonFormDataBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeJsonFormDataBodyTests + { + // TODO uncomment below to declare an instance variable for FakeJsonFormDataBody + //private FakeJsonFormDataBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeJsonFormDataBody + //instance = new FakeJsonFormDataBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeJsonFormDataBody + /// + [Test] + public void FakeJsonFormDataBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeJsonFormDataBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeJsonFormDataBody"); + } + + + /// + /// Test the property 'Param' + /// + [Test] + public void ParamTest() + { + // TODO unit test for the property 'Param' + } + /// + /// Test the property 'Param2' + /// + [Test] + public void Param2Test() + { + // TODO unit test for the property 'Param2' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs new file mode 100644 index 00000000000..ce7416d9801 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetIdUploadImageBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetIdUploadImageBodyTests + { + // TODO uncomment below to declare an instance variable for PetIdUploadImageBody + //private PetIdUploadImageBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetIdUploadImageBody + //instance = new PetIdUploadImageBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetIdUploadImageBody + /// + [Test] + public void PetIdUploadImageBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetIdUploadImageBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetIdUploadImageBody"); + } + + + /// + /// Test the property 'AdditionalMetadata' + /// + [Test] + public void AdditionalMetadataTest() + { + // TODO unit test for the property 'AdditionalMetadata' + } + /// + /// Test the property 'File' + /// + [Test] + public void FileTest() + { + // TODO unit test for the property 'File' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..0cecc4d1ce2 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs index d4fc37614ec..15a9e1856d6 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs @@ -137,7 +137,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestEndpointParameters (Body2 body); + void TestEndpointParameters (FakeBody body); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -148,7 +148,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (Body2 body); + ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body); /// /// To test enum parameters /// @@ -187,7 +187,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// - void TestEnumRequestBody (Body4 body = null); + void TestEnumRequestBody (EnumFormBody body = null); /// /// To test enum parameters @@ -198,7 +198,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null); + ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null); /// /// test inline additionalProperties /// @@ -229,7 +229,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestJsonFormData (Body5 body); + void TestJsonFormData (FakeJsonFormDataBody body); /// /// test json serialization of form data @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (Body5 body); + ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -357,7 +357,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (Body2 body); + System.Threading.Tasks.Task TestEndpointParametersAsync (FakeBody body); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -368,7 +368,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (Body2 body); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (FakeBody body); /// /// To test enum parameters /// @@ -407,7 +407,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of void - System.Threading.Tasks.Task TestEnumRequestBodyAsync (Body4 body = null); + System.Threading.Tasks.Task TestEnumRequestBodyAsync (EnumFormBody body = null); /// /// To test enum parameters @@ -418,7 +418,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (Body4 body = null); + System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (EnumFormBody body = null); /// /// test inline additionalProperties /// @@ -449,7 +449,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync (Body5 body); + System.Threading.Tasks.Task TestJsonFormDataAsync (FakeJsonFormDataBody body); /// /// test json serialization of form data @@ -460,7 +460,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (Body5 body); + System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (FakeJsonFormDataBody body); #endregion Asynchronous Operations } @@ -1289,7 +1289,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Thrown when fails to make API call /// /// - public void TestEndpointParameters (Body2 body) + public void TestEndpointParameters (FakeBody body) { TestEndpointParametersWithHttpInfo(body); } @@ -1300,7 +1300,7 @@ public void TestEndpointParameters (Body2 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (Body2 body) + public ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body) { // verify the required parameter 'body' is set if (body == null) @@ -1367,7 +1367,7 @@ public ApiResponse TestEndpointParametersWithHttpInfo (Body2 body) /// Thrown when fails to make API call /// /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (Body2 body) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (FakeBody body) { await TestEndpointParametersAsyncWithHttpInfo(body); @@ -1379,7 +1379,7 @@ public async System.Threading.Tasks.Task TestEndpointParametersAsync (Body2 body /// Thrown when fails to make API call /// /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (Body2 body) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (FakeBody body) { // verify the required parameter 'body' is set if (body == null) @@ -1591,7 +1591,7 @@ public async System.Threading.Tasks.Task> TestEnumParameters /// Thrown when fails to make API call /// (optional) /// - public void TestEnumRequestBody (Body4 body = null) + public void TestEnumRequestBody (EnumFormBody body = null) { TestEnumRequestBodyWithHttpInfo(body); } @@ -1602,7 +1602,7 @@ public void TestEnumRequestBody (Body4 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - public ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null) + public ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null) { var localVarPath = "/fake/enum/form"; @@ -1659,7 +1659,7 @@ public ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null) /// Thrown when fails to make API call /// (optional) /// Task of void - public async System.Threading.Tasks.Task TestEnumRequestBodyAsync (Body4 body = null) + public async System.Threading.Tasks.Task TestEnumRequestBodyAsync (EnumFormBody body = null) { await TestEnumRequestBodyAsyncWithHttpInfo(body); @@ -1671,7 +1671,7 @@ public async System.Threading.Tasks.Task TestEnumRequestBodyAsync (Body4 body = /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (Body4 body = null) + public async System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (EnumFormBody body = null) { var localVarPath = "/fake/enum/form"; @@ -1871,7 +1871,7 @@ public async System.Threading.Tasks.Task> TestInlineAddition /// Thrown when fails to make API call /// /// - public void TestJsonFormData (Body5 body) + public void TestJsonFormData (FakeJsonFormDataBody body) { TestJsonFormDataWithHttpInfo(body); } @@ -1882,7 +1882,7 @@ public void TestJsonFormData (Body5 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (Body5 body) + public ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body) { // verify the required parameter 'body' is set if (body == null) @@ -1942,7 +1942,7 @@ public ApiResponse TestJsonFormDataWithHttpInfo (Body5 body) /// Thrown when fails to make API call /// /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync (Body5 body) + public async System.Threading.Tasks.Task TestJsonFormDataAsync (FakeJsonFormDataBody body) { await TestJsonFormDataAsyncWithHttpInfo(body); @@ -1954,7 +1954,7 @@ public async System.Threading.Tasks.Task TestJsonFormDataAsync (Body5 body) /// Thrown when fails to make API call /// /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (Body5 body) + public async System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (FakeJsonFormDataBody body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs index 0c625ceef67..f0bc1602703 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs index c9bf44c4941..5ab2b6d350d 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs index ca119ab86ca..33273c6c029 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs index c13fa657fb5..1cfd4e87f1e 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs @@ -20,7 +20,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants 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 1dc87a86251..e3ff9c18b78 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 @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs index 8bf35b3e1b9..9b3e6665ce1 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalAnimalIdBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalAnimalIdBody.cs new file mode 100644 index 00000000000..b9454114c1d --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnimalAnimalIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnimalAnimalIdBody + /// + [DataContract] + public partial class AnimalAnimalIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the animal. + /// Updated status of the animal. + public AnimalAnimalIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the animal + /// + /// Updated name of the animal + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the animal + /// + /// Updated status of the animal + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnimalAnimalIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnimalAnimalIdBody); + } + + /// + /// Returns true if AnimalAnimalIdBody instances are equal + /// + /// Instance of AnimalAnimalIdBody to be compared + /// Boolean + public bool Equals(AnimalAnimalIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/DogDogIdBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/DogDogIdBody.cs new file mode 100644 index 00000000000..72e095e5e17 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/DogDogIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// DogDogIdBody + /// + [DataContract] + public partial class DogDogIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the dog. + /// Updated status of the dog. + public DogDogIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the dog + /// + /// Updated name of the dog + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the dog + /// + /// Updated status of the dog + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DogDogIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DogDogIdBody); + } + + /// + /// Returns true if DogDogIdBody instances are equal + /// + /// Instance of DogDogIdBody to be compared + /// Boolean + public bool Equals(DogDogIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumFormBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumFormBody.cs new file mode 100644 index 00000000000..4d592ff742b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/EnumFormBody.cs @@ -0,0 +1,221 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// EnumFormBody + /// + [DataContract] + public partial class EnumFormBody : IEquatable, IValidatableObject + { + /// + /// Defines EnumFormStringArray + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringArrayEnum + { + /// + /// Enum GreaterThan for value: > + /// + [EnumMember(Value = ">")] + GreaterThan = 1, + /// + /// Enum Dollar for value: $ + /// + [EnumMember(Value = "$")] + Dollar = 2 } + /// + /// Form parameter enum test (string array) + /// + /// Form parameter enum test (string array) + [DataMember(Name="enum_form_string_array", EmitDefaultValue=false)] + public List EnumFormStringArray { get; set; } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringEnum + { + /// + /// Enum Abc for value: _abc + /// + [EnumMember(Value = "_abc")] + Abc = 1, + /// + /// Enum Efg for value: -efg + /// + [EnumMember(Value = "-efg")] + Efg = 2, + /// + /// Enum Xyz for value: (xyz) + /// + [EnumMember(Value = "(xyz)")] + Xyz = 3 } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [DataMember(Name="enum_form_string", EmitDefaultValue=false)] + public EnumFormStringEnum? EnumFormString { get; set; } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumQueryDoubleEnum + { + /// + /// Enum NUMBER_1_DOT_1 for value: 1.1 + /// + [EnumMember(Value = "1.1")] + NUMBER_1_DOT_1 = 1, + /// + /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 + /// + [EnumMember(Value = "-1.2")] + NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [DataMember(Name="enum_query_double", EmitDefaultValue=false)] + public EnumQueryDoubleEnum? EnumQueryDouble { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Form parameter enum test (string array). + /// Form parameter enum test (string) (default to EnumFormStringEnum.Efg). + /// Query parameter enum test (double). + public EnumFormBody(List enumFormStringArray = default(List), EnumFormStringEnum? enumFormString = EnumFormStringEnum.Efg, EnumQueryDoubleEnum? enumQueryDouble = default(EnumQueryDoubleEnum?)) + { + this.EnumFormStringArray = enumFormStringArray; + // use default value if no "enumFormString" provided + if (enumFormString == null) + { + this.EnumFormString = EnumFormStringEnum.Efg; + } + else + { + this.EnumFormString = enumFormString; + } + this.EnumQueryDouble = enumQueryDouble; + } + + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EnumFormBody {\n"); + sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n"); + sb.Append(" EnumFormString: ").Append(EnumFormString).Append("\n"); + sb.Append(" EnumQueryDouble: ").Append(EnumQueryDouble).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EnumFormBody); + } + + /// + /// Returns true if EnumFormBody instances are equal + /// + /// Instance of EnumFormBody to be compared + /// Boolean + public bool Equals(EnumFormBody input) + { + if (input == null) + return false; + + return + ( + this.EnumFormStringArray == input.EnumFormStringArray || + this.EnumFormStringArray != null && + input.EnumFormStringArray != null && + this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray) + ) && + ( + this.EnumFormString == input.EnumFormString || + (this.EnumFormString != null && + this.EnumFormString.Equals(input.EnumFormString)) + ) && + ( + this.EnumQueryDouble == input.EnumQueryDouble || + (this.EnumQueryDouble != null && + this.EnumQueryDouble.Equals(input.EnumQueryDouble)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumFormStringArray != null) + hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode(); + if (this.EnumFormString != null) + hashCode = hashCode * 59 + this.EnumFormString.GetHashCode(); + if (this.EnumQueryDouble != null) + hashCode = hashCode * 59 + this.EnumQueryDouble.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeBody.cs new file mode 100644 index 00000000000..e9195500f32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeBody.cs @@ -0,0 +1,377 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody + /// + [DataContract] + public partial class FakeBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody); + } + + /// + /// Returns true if FakeBody instances are equal + /// + /// Instance of FakeBody to be compared + /// Boolean + public bool Equals(FakeBody input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeBody1.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeBody1.cs new file mode 100644 index 00000000000..661b57838ec --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeBody1.cs @@ -0,0 +1,377 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody1 + /// + [DataContract] + public partial class FakeBody1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody1(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody1 and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody1 and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody1 {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody1); + } + + /// + /// Returns true if FakeBody1 instances are equal + /// + /// Instance of FakeBody1 to be compared + /// Boolean + public bool Equals(FakeBody1 input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeJsonFormDataBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeJsonFormDataBody.cs new file mode 100644 index 00000000000..eba01f42903 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/FakeJsonFormDataBody.cs @@ -0,0 +1,156 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeJsonFormDataBody + /// + [DataContract] + public partial class FakeJsonFormDataBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// field1 (required). + /// field2 (required). + public FakeJsonFormDataBody(string param = default(string), string param2 = default(string)) + { + // to ensure "param" is required (not null) + if (param == null) + { + throw new InvalidDataException("param is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param = param; + } + // to ensure "param2" is required (not null) + if (param2 == null) + { + throw new InvalidDataException("param2 is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param2 = param2; + } + } + + /// + /// field1 + /// + /// field1 + [DataMember(Name="param", EmitDefaultValue=false)] + public string Param { get; set; } + + /// + /// field2 + /// + /// field2 + [DataMember(Name="param2", EmitDefaultValue=false)] + public string Param2 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeJsonFormDataBody {\n"); + sb.Append(" Param: ").Append(Param).Append("\n"); + sb.Append(" Param2: ").Append(Param2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeJsonFormDataBody); + } + + /// + /// Returns true if FakeJsonFormDataBody instances are equal + /// + /// Instance of FakeJsonFormDataBody to be compared + /// Boolean + public bool Equals(FakeJsonFormDataBody input) + { + if (input == null) + return false; + + return + ( + this.Param == input.Param || + (this.Param != null && + this.Param.Equals(input.Param)) + ) && + ( + this.Param2 == input.Param2 || + (this.Param2 != null && + this.Param2.Equals(input.Param2)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Param != null) + hashCode = hashCode * 59 + this.Param.GetHashCode(); + if (this.Param2 != null) + hashCode = hashCode * 59 + this.Param2.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetIdUploadImageBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetIdUploadImageBody.cs new file mode 100644 index 00000000000..bcc1f92da4f --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetIdUploadImageBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetIdUploadImageBody + /// + [DataContract] + public partial class PetIdUploadImageBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Additional data to pass to server. + /// file to upload. + public PetIdUploadImageBody(string additionalMetadata = default(string), byte[] file = default(byte[])) + { + this.AdditionalMetadata = additionalMetadata; + this.File = file; + } + + /// + /// Additional data to pass to server + /// + /// Additional data to pass to server + [DataMember(Name="additionalMetadata", EmitDefaultValue=false)] + public string AdditionalMetadata { get; set; } + + /// + /// file to upload + /// + /// file to upload + [DataMember(Name="file", EmitDefaultValue=false)] + public byte[] File { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetIdUploadImageBody {\n"); + sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n"); + sb.Append(" File: ").Append(File).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetIdUploadImageBody); + } + + /// + /// Returns true if PetIdUploadImageBody instances are equal + /// + /// Instance of PetIdUploadImageBody to be compared + /// Boolean + public bool Equals(PetIdUploadImageBody input) + { + if (input == null) + return false; + + return + ( + this.AdditionalMetadata == input.AdditionalMetadata || + (this.AdditionalMetadata != null && + this.AdditionalMetadata.Equals(input.AdditionalMetadata)) + ) && + ( + this.File == input.File || + (this.File != null && + this.File.Equals(input.File)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalMetadata != null) + hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode(); + if (this.File != null) + hashCode = hashCode * 59 + this.File.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..0be642af289 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION b/samples/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION index 6e256321c31..86820ab0dd0 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION +++ b/samples/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/README.md b/samples/client/petstore/csharp/SwaggerClientNet35/README.md index df0b5851b28..960b327e794 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/README.md +++ b/samples/client/petstore/csharp/SwaggerClientNet35/README.md @@ -147,26 +147,24 @@ Class | Method | HTTP request | Description - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - [Model.Animal](docs/Animal.md) + - [Model.AnimalAnimalIdBody](docs/AnimalAnimalIdBody.md) - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) - - [Model.Body3](docs/Body3.md) - - [Model.Body4](docs/Body4.md) - - [Model.Body5](docs/Body5.md) - - [Model.Body6](docs/Body6.md) - - [Model.Body7](docs/Body7.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.ClassModel](docs/ClassModel.md) - [Model.Dog](docs/Dog.md) + - [Model.DogDogIdBody](docs/DogDogIdBody.md) - [Model.EnumArrays](docs/EnumArrays.md) - [Model.EnumClass](docs/EnumClass.md) + - [Model.EnumFormBody](docs/EnumFormBody.md) - [Model.EnumTest](docs/EnumTest.md) + - [Model.FakeBody](docs/FakeBody.md) + - [Model.FakeBody1](docs/FakeBody1.md) + - [Model.FakeJsonFormDataBody](docs/FakeJsonFormDataBody.md) - [Model.FormatTest](docs/FormatTest.md) - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Model.MapTest](docs/MapTest.md) @@ -185,6 +183,8 @@ Class | Method | HTTP request | Description - [Model.OuterComposite](docs/OuterComposite.md) - [Model.OuterEnum](docs/OuterEnum.md) - [Model.Pet](docs/Pet.md) + - [Model.PetIdUploadImageBody](docs/PetIdUploadImageBody.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.SinglePetResponse](docs/SinglePetResponse.md) - [Model.SpecialModelName](docs/SpecialModelName.md) @@ -221,5 +221,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/AnimalAnimalIdBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/AnimalAnimalIdBody.md new file mode 100644 index 00000000000..9918bf4bfa3 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/AnimalAnimalIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.AnimalAnimalIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the animal | [optional] +**Status** | **string** | Updated status of the animal | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/DogDogIdBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/DogDogIdBody.md new file mode 100644 index 00000000000..87c71e12347 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/DogDogIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.DogDogIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the dog | [optional] +**Status** | **string** | Updated status of the dog | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/EnumFormBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/EnumFormBody.md new file mode 100644 index 00000000000..57eb49c39fd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/EnumFormBody.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.EnumFormBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional] +**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg] +**EnumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeApi.md index bda2fc3c44b..d058c93344c 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeApi.md @@ -313,7 +313,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEndpointParameters** -> void TestEndpointParameters (Body2 body) +> void TestEndpointParameters (FakeBody body) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -338,7 +338,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var body = new Body2(); // Body2 | + var body = new FakeBody(); // FakeBody | try { @@ -358,7 +358,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | + **body** | [**FakeBody**](FakeBody.md)| | ### Return type @@ -443,7 +443,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEnumRequestBody** -> void TestEnumRequestBody (Body4 body = null) +> void TestEnumRequestBody (EnumFormBody body = null) To test enum parameters @@ -464,7 +464,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body4(); // Body4 | (optional) + var body = new EnumFormBody(); // EnumFormBody | (optional) try { @@ -484,7 +484,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body4**](Body4.md)| | [optional] + **body** | [**EnumFormBody**](EnumFormBody.md)| | [optional] ### Return type @@ -559,7 +559,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestJsonFormData** -> void TestJsonFormData (Body5 body) +> void TestJsonFormData (FakeJsonFormDataBody body) test json serialization of form data @@ -578,7 +578,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body5(); // Body5 | + var body = new FakeJsonFormDataBody(); // FakeJsonFormDataBody | try { @@ -598,7 +598,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body5**](Body5.md)| | + **body** | [**FakeJsonFormDataBody**](FakeJsonFormDataBody.md)| | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeBody.md new file mode 100644 index 00000000000..94f8e388c8a --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeBody.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeBody1.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeBody1.md new file mode 100644 index 00000000000..5d5a88da008 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeBody1.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeJsonFormDataBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeJsonFormDataBody.md new file mode 100644 index 00000000000..b11b38e2375 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/FakeJsonFormDataBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.FakeJsonFormDataBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Param** | **string** | field1 | +**Param2** | **string** | field2 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/PetIdUploadImageBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/PetIdUploadImageBody.md new file mode 100644 index 00000000000..956c84b2c37 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/PetIdUploadImageBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetIdUploadImageBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalMetadata** | **string** | Additional data to pass to server | [optional] +**File** | **byte[]** | file to upload | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/PetPetIdBody.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/SinglePetResponse.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/SinglePetResponse.md index 9508d6cc0e9..a922823c936 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/docs/SinglePetResponse.md +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/SinglePetResponse.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] +**Pet** | **OneOfSinglePetResponsePet** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md b/samples/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md index ab7f72772e8..0353116e609 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md +++ b/samples/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md @@ -3,9 +3,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Category** | [**AllOfSubCategoryCategory**](AllOfSubCategoryCategory.md) | | [optional] +**Category** | **AllOfSubCategoryCategory** | | [optional] **Category2** | [**Category**](Category.md) | | [optional] -**Pets** | [**List<AllOfSubCategoryPetsItems>**](.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs new file mode 100644 index 00000000000..3e9dd307be0 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnimalAnimalIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnimalAnimalIdBodyTests + { + // TODO uncomment below to declare an instance variable for AnimalAnimalIdBody + //private AnimalAnimalIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnimalAnimalIdBody + //instance = new AnimalAnimalIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnimalAnimalIdBody + /// + [Test] + public void AnimalAnimalIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnimalAnimalIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnimalAnimalIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs new file mode 100644 index 00000000000..b431d1d49fc --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing DogDogIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DogDogIdBodyTests + { + // TODO uncomment below to declare an instance variable for DogDogIdBody + //private DogDogIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DogDogIdBody + //instance = new DogDogIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DogDogIdBody + /// + [Test] + public void DogDogIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DogDogIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DogDogIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs new file mode 100644 index 00000000000..dd24248665e --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs @@ -0,0 +1,95 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing EnumFormBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class EnumFormBodyTests + { + // TODO uncomment below to declare an instance variable for EnumFormBody + //private EnumFormBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of EnumFormBody + //instance = new EnumFormBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of EnumFormBody + /// + [Test] + public void EnumFormBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" EnumFormBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumFormBody"); + } + + + /// + /// Test the property 'EnumFormStringArray' + /// + [Test] + public void EnumFormStringArrayTest() + { + // TODO unit test for the property 'EnumFormStringArray' + } + /// + /// Test the property 'EnumFormString' + /// + [Test] + public void EnumFormStringTest() + { + // TODO unit test for the property 'EnumFormString' + } + /// + /// Test the property 'EnumQueryDouble' + /// + [Test] + public void EnumQueryDoubleTest() + { + // TODO unit test for the property 'EnumQueryDouble' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeBody1Tests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeBody1Tests.cs new file mode 100644 index 00000000000..70b4f62e937 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeBody1Tests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBody1Tests + { + // TODO uncomment below to declare an instance variable for FakeBody1 + //private FakeBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody1 + //instance = new FakeBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody1 + /// + [Test] + public void FakeBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody1"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeBodyTests.cs new file mode 100644 index 00000000000..df2ccabdddd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeBodyTests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBodyTests + { + // TODO uncomment below to declare an instance variable for FakeBody + //private FakeBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody + //instance = new FakeBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody + /// + [Test] + public void FakeBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs new file mode 100644 index 00000000000..f43855b7a32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeJsonFormDataBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeJsonFormDataBodyTests + { + // TODO uncomment below to declare an instance variable for FakeJsonFormDataBody + //private FakeJsonFormDataBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeJsonFormDataBody + //instance = new FakeJsonFormDataBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeJsonFormDataBody + /// + [Test] + public void FakeJsonFormDataBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeJsonFormDataBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeJsonFormDataBody"); + } + + + /// + /// Test the property 'Param' + /// + [Test] + public void ParamTest() + { + // TODO unit test for the property 'Param' + } + /// + /// Test the property 'Param2' + /// + [Test] + public void Param2Test() + { + // TODO unit test for the property 'Param2' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs new file mode 100644 index 00000000000..ce7416d9801 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetIdUploadImageBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetIdUploadImageBodyTests + { + // TODO uncomment below to declare an instance variable for PetIdUploadImageBody + //private PetIdUploadImageBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetIdUploadImageBody + //instance = new PetIdUploadImageBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetIdUploadImageBody + /// + [Test] + public void PetIdUploadImageBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetIdUploadImageBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetIdUploadImageBody"); + } + + + /// + /// Test the property 'AdditionalMetadata' + /// + [Test] + public void AdditionalMetadataTest() + { + // TODO unit test for the property 'AdditionalMetadata' + } + /// + /// Test the property 'File' + /// + [Test] + public void FileTest() + { + // TODO unit test for the property 'File' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..0cecc4d1ce2 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/FakeApi.cs index 9219f2c20b6..05a638bd712 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/FakeApi.cs @@ -137,7 +137,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestEndpointParameters (Body2 body); + void TestEndpointParameters (FakeBody body); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -148,7 +148,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (Body2 body); + ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body); /// /// To test enum parameters /// @@ -187,7 +187,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// - void TestEnumRequestBody (Body4 body = null); + void TestEnumRequestBody (EnumFormBody body = null); /// /// To test enum parameters @@ -198,7 +198,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null); + ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null); /// /// test inline additionalProperties /// @@ -229,7 +229,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestJsonFormData (Body5 body); + void TestJsonFormData (FakeJsonFormDataBody body); /// /// test json serialization of form data @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (Body5 body); + ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body); #endregion Synchronous Operations } @@ -711,7 +711,7 @@ public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body) /// Thrown when fails to make API call /// /// - public void TestEndpointParameters (Body2 body) + public void TestEndpointParameters (FakeBody body) { TestEndpointParametersWithHttpInfo(body); } @@ -722,7 +722,7 @@ public void TestEndpointParameters (Body2 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (Body2 body) + public ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body) { // verify the required parameter 'body' is set if (body == null) @@ -861,7 +861,7 @@ public ApiResponse TestEnumParametersWithHttpInfo (List enumHead /// Thrown when fails to make API call /// (optional) /// - public void TestEnumRequestBody (Body4 body = null) + public void TestEnumRequestBody (EnumFormBody body = null) { TestEnumRequestBodyWithHttpInfo(body); } @@ -872,7 +872,7 @@ public void TestEnumRequestBody (Body4 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - public ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null) + public ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null) { var localVarPath = "/fake/enum/form"; @@ -1000,7 +1000,7 @@ public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionar /// Thrown when fails to make API call /// /// - public void TestJsonFormData (Body5 body) + public void TestJsonFormData (FakeJsonFormDataBody body) { TestJsonFormDataWithHttpInfo(body); } @@ -1011,7 +1011,7 @@ public void TestJsonFormData (Body5 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (Body5 body) + public ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs index fe268364397..18e44c0563a 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs index 44316503f91..54b5e6183df 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs index ca119ab86ca..33273c6c029 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs index 00f6bfe2a1c..44eecd74529 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs index 1dc87a86251..e3ff9c18b78 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs index 8bf35b3e1b9..9b3e6665ce1 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AnimalAnimalIdBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AnimalAnimalIdBody.cs new file mode 100644 index 00000000000..00370304f77 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AnimalAnimalIdBody.cs @@ -0,0 +1,131 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnimalAnimalIdBody + /// + [DataContract] + public partial class AnimalAnimalIdBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the animal. + /// Updated status of the animal. + public AnimalAnimalIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the animal + /// + /// Updated name of the animal + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the animal + /// + /// Updated status of the animal + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnimalAnimalIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnimalAnimalIdBody); + } + + /// + /// Returns true if AnimalAnimalIdBody instances are equal + /// + /// Instance of AnimalAnimalIdBody to be compared + /// Boolean + public bool Equals(AnimalAnimalIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/DogDogIdBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/DogDogIdBody.cs new file mode 100644 index 00000000000..02aa4fe736f --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/DogDogIdBody.cs @@ -0,0 +1,131 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// DogDogIdBody + /// + [DataContract] + public partial class DogDogIdBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the dog. + /// Updated status of the dog. + public DogDogIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the dog + /// + /// Updated name of the dog + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the dog + /// + /// Updated status of the dog + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DogDogIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DogDogIdBody); + } + + /// + /// Returns true if DogDogIdBody instances are equal + /// + /// Instance of DogDogIdBody to be compared + /// Boolean + public bool Equals(DogDogIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/EnumFormBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/EnumFormBody.cs new file mode 100644 index 00000000000..c4549c1ef9b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/EnumFormBody.cs @@ -0,0 +1,212 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// EnumFormBody + /// + [DataContract] + public partial class EnumFormBody : IEquatable + { + /// + /// Defines EnumFormStringArray + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringArrayEnum + { + /// + /// Enum GreaterThan for value: > + /// + [EnumMember(Value = ">")] + GreaterThan = 1, + /// + /// Enum Dollar for value: $ + /// + [EnumMember(Value = "$")] + Dollar = 2 } + /// + /// Form parameter enum test (string array) + /// + /// Form parameter enum test (string array) + [DataMember(Name="enum_form_string_array", EmitDefaultValue=false)] + public List EnumFormStringArray { get; set; } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringEnum + { + /// + /// Enum Abc for value: _abc + /// + [EnumMember(Value = "_abc")] + Abc = 1, + /// + /// Enum Efg for value: -efg + /// + [EnumMember(Value = "-efg")] + Efg = 2, + /// + /// Enum Xyz for value: (xyz) + /// + [EnumMember(Value = "(xyz)")] + Xyz = 3 } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [DataMember(Name="enum_form_string", EmitDefaultValue=false)] + public EnumFormStringEnum? EnumFormString { get; set; } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumQueryDoubleEnum + { + /// + /// Enum NUMBER_1_DOT_1 for value: 1.1 + /// + [EnumMember(Value = "1.1")] + NUMBER_1_DOT_1 = 1, + /// + /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 + /// + [EnumMember(Value = "-1.2")] + NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [DataMember(Name="enum_query_double", EmitDefaultValue=false)] + public EnumQueryDoubleEnum? EnumQueryDouble { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Form parameter enum test (string array). + /// Form parameter enum test (string) (default to EnumFormStringEnum.Efg). + /// Query parameter enum test (double). + public EnumFormBody(List enumFormStringArray = default(List), EnumFormStringEnum? enumFormString = EnumFormStringEnum.Efg, EnumQueryDoubleEnum? enumQueryDouble = default(EnumQueryDoubleEnum?)) + { + this.EnumFormStringArray = enumFormStringArray; + // use default value if no "enumFormString" provided + if (enumFormString == null) + { + this.EnumFormString = EnumFormStringEnum.Efg; + } + else + { + this.EnumFormString = enumFormString; + } + this.EnumQueryDouble = enumQueryDouble; + } + + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EnumFormBody {\n"); + sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n"); + sb.Append(" EnumFormString: ").Append(EnumFormString).Append("\n"); + sb.Append(" EnumQueryDouble: ").Append(EnumQueryDouble).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EnumFormBody); + } + + /// + /// Returns true if EnumFormBody instances are equal + /// + /// Instance of EnumFormBody to be compared + /// Boolean + public bool Equals(EnumFormBody input) + { + if (input == null) + return false; + + return + ( + this.EnumFormStringArray == input.EnumFormStringArray || + this.EnumFormStringArray != null && + input.EnumFormStringArray != null && + this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray) + ) && + ( + this.EnumFormString == input.EnumFormString || + (this.EnumFormString != null && + this.EnumFormString.Equals(input.EnumFormString)) + ) && + ( + this.EnumQueryDouble == input.EnumQueryDouble || + (this.EnumQueryDouble != null && + this.EnumQueryDouble.Equals(input.EnumQueryDouble)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumFormStringArray != null) + hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode(); + if (this.EnumFormString != null) + hashCode = hashCode * 59 + this.EnumFormString.GetHashCode(); + if (this.EnumQueryDouble != null) + hashCode = hashCode * 59 + this.EnumQueryDouble.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeBody.cs new file mode 100644 index 00000000000..e675ec5648a --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeBody.cs @@ -0,0 +1,368 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody + /// + [DataContract] + public partial class FakeBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody); + } + + /// + /// Returns true if FakeBody instances are equal + /// + /// Instance of FakeBody to be compared + /// Boolean + public bool Equals(FakeBody input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeBody1.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeBody1.cs new file mode 100644 index 00000000000..80db9ba8c08 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeBody1.cs @@ -0,0 +1,368 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody1 + /// + [DataContract] + public partial class FakeBody1 : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody1(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody1 and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody1 and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody1 {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody1); + } + + /// + /// Returns true if FakeBody1 instances are equal + /// + /// Instance of FakeBody1 to be compared + /// Boolean + public bool Equals(FakeBody1 input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeJsonFormDataBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeJsonFormDataBody.cs new file mode 100644 index 00000000000..6d29a886c6b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/FakeJsonFormDataBody.cs @@ -0,0 +1,147 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeJsonFormDataBody + /// + [DataContract] + public partial class FakeJsonFormDataBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// field1 (required). + /// field2 (required). + public FakeJsonFormDataBody(string param = default(string), string param2 = default(string)) + { + // to ensure "param" is required (not null) + if (param == null) + { + throw new InvalidDataException("param is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param = param; + } + // to ensure "param2" is required (not null) + if (param2 == null) + { + throw new InvalidDataException("param2 is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param2 = param2; + } + } + + /// + /// field1 + /// + /// field1 + [DataMember(Name="param", EmitDefaultValue=false)] + public string Param { get; set; } + + /// + /// field2 + /// + /// field2 + [DataMember(Name="param2", EmitDefaultValue=false)] + public string Param2 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeJsonFormDataBody {\n"); + sb.Append(" Param: ").Append(Param).Append("\n"); + sb.Append(" Param2: ").Append(Param2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeJsonFormDataBody); + } + + /// + /// Returns true if FakeJsonFormDataBody instances are equal + /// + /// Instance of FakeJsonFormDataBody to be compared + /// Boolean + public bool Equals(FakeJsonFormDataBody input) + { + if (input == null) + return false; + + return + ( + this.Param == input.Param || + (this.Param != null && + this.Param.Equals(input.Param)) + ) && + ( + this.Param2 == input.Param2 || + (this.Param2 != null && + this.Param2.Equals(input.Param2)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Param != null) + hashCode = hashCode * 59 + this.Param.GetHashCode(); + if (this.Param2 != null) + hashCode = hashCode * 59 + this.Param2.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetIdUploadImageBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetIdUploadImageBody.cs new file mode 100644 index 00000000000..ea3b1aa1e51 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetIdUploadImageBody.cs @@ -0,0 +1,131 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetIdUploadImageBody + /// + [DataContract] + public partial class PetIdUploadImageBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Additional data to pass to server. + /// file to upload. + public PetIdUploadImageBody(string additionalMetadata = default(string), byte[] file = default(byte[])) + { + this.AdditionalMetadata = additionalMetadata; + this.File = file; + } + + /// + /// Additional data to pass to server + /// + /// Additional data to pass to server + [DataMember(Name="additionalMetadata", EmitDefaultValue=false)] + public string AdditionalMetadata { get; set; } + + /// + /// file to upload + /// + /// file to upload + [DataMember(Name="file", EmitDefaultValue=false)] + public byte[] File { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetIdUploadImageBody {\n"); + sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n"); + sb.Append(" File: ").Append(File).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetIdUploadImageBody); + } + + /// + /// Returns true if PetIdUploadImageBody instances are equal + /// + /// Instance of PetIdUploadImageBody to be compared + /// Boolean + public bool Equals(PetIdUploadImageBody input) + { + if (input == null) + return false; + + return + ( + this.AdditionalMetadata == input.AdditionalMetadata || + (this.AdditionalMetadata != null && + this.AdditionalMetadata.Equals(input.AdditionalMetadata)) + ) && + ( + this.File == input.File || + (this.File != null && + this.File.Equals(input.File)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalMetadata != null) + hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode(); + if (this.File != null) + hashCode = hashCode * 59 + this.File.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..b5b03cb3bb5 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,131 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION b/samples/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION index 6e256321c31..86820ab0dd0 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION +++ b/samples/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/README.md b/samples/client/petstore/csharp/SwaggerClientNet40/README.md index df0b5851b28..960b327e794 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/README.md +++ b/samples/client/petstore/csharp/SwaggerClientNet40/README.md @@ -147,26 +147,24 @@ Class | Method | HTTP request | Description - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - [Model.Animal](docs/Animal.md) + - [Model.AnimalAnimalIdBody](docs/AnimalAnimalIdBody.md) - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) - - [Model.Body3](docs/Body3.md) - - [Model.Body4](docs/Body4.md) - - [Model.Body5](docs/Body5.md) - - [Model.Body6](docs/Body6.md) - - [Model.Body7](docs/Body7.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.ClassModel](docs/ClassModel.md) - [Model.Dog](docs/Dog.md) + - [Model.DogDogIdBody](docs/DogDogIdBody.md) - [Model.EnumArrays](docs/EnumArrays.md) - [Model.EnumClass](docs/EnumClass.md) + - [Model.EnumFormBody](docs/EnumFormBody.md) - [Model.EnumTest](docs/EnumTest.md) + - [Model.FakeBody](docs/FakeBody.md) + - [Model.FakeBody1](docs/FakeBody1.md) + - [Model.FakeJsonFormDataBody](docs/FakeJsonFormDataBody.md) - [Model.FormatTest](docs/FormatTest.md) - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Model.MapTest](docs/MapTest.md) @@ -185,6 +183,8 @@ Class | Method | HTTP request | Description - [Model.OuterComposite](docs/OuterComposite.md) - [Model.OuterEnum](docs/OuterEnum.md) - [Model.Pet](docs/Pet.md) + - [Model.PetIdUploadImageBody](docs/PetIdUploadImageBody.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.SinglePetResponse](docs/SinglePetResponse.md) - [Model.SpecialModelName](docs/SpecialModelName.md) @@ -221,5 +221,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/AnimalAnimalIdBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/AnimalAnimalIdBody.md new file mode 100644 index 00000000000..9918bf4bfa3 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/AnimalAnimalIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.AnimalAnimalIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the animal | [optional] +**Status** | **string** | Updated status of the animal | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/DogDogIdBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/DogDogIdBody.md new file mode 100644 index 00000000000..87c71e12347 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/DogDogIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.DogDogIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the dog | [optional] +**Status** | **string** | Updated status of the dog | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/EnumFormBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/EnumFormBody.md new file mode 100644 index 00000000000..57eb49c39fd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/EnumFormBody.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.EnumFormBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional] +**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg] +**EnumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeApi.md index bda2fc3c44b..d058c93344c 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeApi.md @@ -313,7 +313,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEndpointParameters** -> void TestEndpointParameters (Body2 body) +> void TestEndpointParameters (FakeBody body) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -338,7 +338,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var body = new Body2(); // Body2 | + var body = new FakeBody(); // FakeBody | try { @@ -358,7 +358,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | + **body** | [**FakeBody**](FakeBody.md)| | ### Return type @@ -443,7 +443,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEnumRequestBody** -> void TestEnumRequestBody (Body4 body = null) +> void TestEnumRequestBody (EnumFormBody body = null) To test enum parameters @@ -464,7 +464,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body4(); // Body4 | (optional) + var body = new EnumFormBody(); // EnumFormBody | (optional) try { @@ -484,7 +484,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body4**](Body4.md)| | [optional] + **body** | [**EnumFormBody**](EnumFormBody.md)| | [optional] ### Return type @@ -559,7 +559,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestJsonFormData** -> void TestJsonFormData (Body5 body) +> void TestJsonFormData (FakeJsonFormDataBody body) test json serialization of form data @@ -578,7 +578,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body5(); // Body5 | + var body = new FakeJsonFormDataBody(); // FakeJsonFormDataBody | try { @@ -598,7 +598,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body5**](Body5.md)| | + **body** | [**FakeJsonFormDataBody**](FakeJsonFormDataBody.md)| | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeBody.md new file mode 100644 index 00000000000..94f8e388c8a --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeBody.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeBody1.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeBody1.md new file mode 100644 index 00000000000..5d5a88da008 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeBody1.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeJsonFormDataBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeJsonFormDataBody.md new file mode 100644 index 00000000000..b11b38e2375 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/FakeJsonFormDataBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.FakeJsonFormDataBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Param** | **string** | field1 | +**Param2** | **string** | field2 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/PetIdUploadImageBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/PetIdUploadImageBody.md new file mode 100644 index 00000000000..956c84b2c37 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/PetIdUploadImageBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetIdUploadImageBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalMetadata** | **string** | Additional data to pass to server | [optional] +**File** | **byte[]** | file to upload | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/PetPetIdBody.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/SinglePetResponse.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/SinglePetResponse.md index 9508d6cc0e9..a922823c936 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/docs/SinglePetResponse.md +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/SinglePetResponse.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] +**Pet** | **OneOfSinglePetResponsePet** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md b/samples/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md index ab7f72772e8..0353116e609 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md +++ b/samples/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md @@ -3,9 +3,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Category** | [**AllOfSubCategoryCategory**](AllOfSubCategoryCategory.md) | | [optional] +**Category** | **AllOfSubCategoryCategory** | | [optional] **Category2** | [**Category**](Category.md) | | [optional] -**Pets** | [**List<AllOfSubCategoryPetsItems>**](.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs new file mode 100644 index 00000000000..3e9dd307be0 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnimalAnimalIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnimalAnimalIdBodyTests + { + // TODO uncomment below to declare an instance variable for AnimalAnimalIdBody + //private AnimalAnimalIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnimalAnimalIdBody + //instance = new AnimalAnimalIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnimalAnimalIdBody + /// + [Test] + public void AnimalAnimalIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnimalAnimalIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnimalAnimalIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs new file mode 100644 index 00000000000..b431d1d49fc --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing DogDogIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DogDogIdBodyTests + { + // TODO uncomment below to declare an instance variable for DogDogIdBody + //private DogDogIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DogDogIdBody + //instance = new DogDogIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DogDogIdBody + /// + [Test] + public void DogDogIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DogDogIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DogDogIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs new file mode 100644 index 00000000000..dd24248665e --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs @@ -0,0 +1,95 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing EnumFormBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class EnumFormBodyTests + { + // TODO uncomment below to declare an instance variable for EnumFormBody + //private EnumFormBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of EnumFormBody + //instance = new EnumFormBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of EnumFormBody + /// + [Test] + public void EnumFormBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" EnumFormBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumFormBody"); + } + + + /// + /// Test the property 'EnumFormStringArray' + /// + [Test] + public void EnumFormStringArrayTest() + { + // TODO unit test for the property 'EnumFormStringArray' + } + /// + /// Test the property 'EnumFormString' + /// + [Test] + public void EnumFormStringTest() + { + // TODO unit test for the property 'EnumFormString' + } + /// + /// Test the property 'EnumQueryDouble' + /// + [Test] + public void EnumQueryDoubleTest() + { + // TODO unit test for the property 'EnumQueryDouble' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeBody1Tests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeBody1Tests.cs new file mode 100644 index 00000000000..70b4f62e937 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeBody1Tests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBody1Tests + { + // TODO uncomment below to declare an instance variable for FakeBody1 + //private FakeBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody1 + //instance = new FakeBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody1 + /// + [Test] + public void FakeBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody1"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeBodyTests.cs new file mode 100644 index 00000000000..df2ccabdddd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeBodyTests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBodyTests + { + // TODO uncomment below to declare an instance variable for FakeBody + //private FakeBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody + //instance = new FakeBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody + /// + [Test] + public void FakeBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs new file mode 100644 index 00000000000..f43855b7a32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeJsonFormDataBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeJsonFormDataBodyTests + { + // TODO uncomment below to declare an instance variable for FakeJsonFormDataBody + //private FakeJsonFormDataBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeJsonFormDataBody + //instance = new FakeJsonFormDataBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeJsonFormDataBody + /// + [Test] + public void FakeJsonFormDataBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeJsonFormDataBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeJsonFormDataBody"); + } + + + /// + /// Test the property 'Param' + /// + [Test] + public void ParamTest() + { + // TODO unit test for the property 'Param' + } + /// + /// Test the property 'Param2' + /// + [Test] + public void Param2Test() + { + // TODO unit test for the property 'Param2' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs new file mode 100644 index 00000000000..ce7416d9801 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetIdUploadImageBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetIdUploadImageBodyTests + { + // TODO uncomment below to declare an instance variable for PetIdUploadImageBody + //private PetIdUploadImageBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetIdUploadImageBody + //instance = new PetIdUploadImageBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetIdUploadImageBody + /// + [Test] + public void PetIdUploadImageBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetIdUploadImageBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetIdUploadImageBody"); + } + + + /// + /// Test the property 'AdditionalMetadata' + /// + [Test] + public void AdditionalMetadataTest() + { + // TODO unit test for the property 'AdditionalMetadata' + } + /// + /// Test the property 'File' + /// + [Test] + public void FileTest() + { + // TODO unit test for the property 'File' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..0cecc4d1ce2 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/FakeApi.cs index 42cbd61f0b8..c4963110f6f 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/FakeApi.cs @@ -137,7 +137,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestEndpointParameters (Body2 body); + void TestEndpointParameters (FakeBody body); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -148,7 +148,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (Body2 body); + ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body); /// /// To test enum parameters /// @@ -187,7 +187,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// - void TestEnumRequestBody (Body4 body = null); + void TestEnumRequestBody (EnumFormBody body = null); /// /// To test enum parameters @@ -198,7 +198,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null); + ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null); /// /// test inline additionalProperties /// @@ -229,7 +229,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestJsonFormData (Body5 body); + void TestJsonFormData (FakeJsonFormDataBody body); /// /// test json serialization of form data @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (Body5 body); + ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body); #endregion Synchronous Operations } @@ -711,7 +711,7 @@ public ApiResponse< ModelClient > TestClientModelWithHttpInfo (ModelClient body) /// Thrown when fails to make API call /// /// - public void TestEndpointParameters (Body2 body) + public void TestEndpointParameters (FakeBody body) { TestEndpointParametersWithHttpInfo(body); } @@ -722,7 +722,7 @@ public void TestEndpointParameters (Body2 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (Body2 body) + public ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body) { // verify the required parameter 'body' is set if (body == null) @@ -861,7 +861,7 @@ public ApiResponse TestEnumParametersWithHttpInfo (List enumHead /// Thrown when fails to make API call /// (optional) /// - public void TestEnumRequestBody (Body4 body = null) + public void TestEnumRequestBody (EnumFormBody body = null) { TestEnumRequestBodyWithHttpInfo(body); } @@ -872,7 +872,7 @@ public void TestEnumRequestBody (Body4 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - public ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null) + public ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null) { var localVarPath = "/fake/enum/form"; @@ -1000,7 +1000,7 @@ public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionar /// Thrown when fails to make API call /// /// - public void TestJsonFormData (Body5 body) + public void TestJsonFormData (FakeJsonFormDataBody body) { TestJsonFormDataWithHttpInfo(body); } @@ -1011,7 +1011,7 @@ public void TestJsonFormData (Body5 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (Body5 body) + public ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs index fe268364397..18e44c0563a 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs index 44316503f91..54b5e6183df 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs index ca119ab86ca..33273c6c029 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs index c13fa657fb5..1cfd4e87f1e 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs @@ -20,7 +20,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs index 1dc87a86251..e3ff9c18b78 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs index 8bf35b3e1b9..9b3e6665ce1 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AnimalAnimalIdBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AnimalAnimalIdBody.cs new file mode 100644 index 00000000000..b9454114c1d --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AnimalAnimalIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnimalAnimalIdBody + /// + [DataContract] + public partial class AnimalAnimalIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the animal. + /// Updated status of the animal. + public AnimalAnimalIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the animal + /// + /// Updated name of the animal + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the animal + /// + /// Updated status of the animal + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnimalAnimalIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnimalAnimalIdBody); + } + + /// + /// Returns true if AnimalAnimalIdBody instances are equal + /// + /// Instance of AnimalAnimalIdBody to be compared + /// Boolean + public bool Equals(AnimalAnimalIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/DogDogIdBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/DogDogIdBody.cs new file mode 100644 index 00000000000..72e095e5e17 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/DogDogIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// DogDogIdBody + /// + [DataContract] + public partial class DogDogIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the dog. + /// Updated status of the dog. + public DogDogIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the dog + /// + /// Updated name of the dog + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the dog + /// + /// Updated status of the dog + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DogDogIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DogDogIdBody); + } + + /// + /// Returns true if DogDogIdBody instances are equal + /// + /// Instance of DogDogIdBody to be compared + /// Boolean + public bool Equals(DogDogIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/EnumFormBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/EnumFormBody.cs new file mode 100644 index 00000000000..4d592ff742b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/EnumFormBody.cs @@ -0,0 +1,221 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// EnumFormBody + /// + [DataContract] + public partial class EnumFormBody : IEquatable, IValidatableObject + { + /// + /// Defines EnumFormStringArray + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringArrayEnum + { + /// + /// Enum GreaterThan for value: > + /// + [EnumMember(Value = ">")] + GreaterThan = 1, + /// + /// Enum Dollar for value: $ + /// + [EnumMember(Value = "$")] + Dollar = 2 } + /// + /// Form parameter enum test (string array) + /// + /// Form parameter enum test (string array) + [DataMember(Name="enum_form_string_array", EmitDefaultValue=false)] + public List EnumFormStringArray { get; set; } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringEnum + { + /// + /// Enum Abc for value: _abc + /// + [EnumMember(Value = "_abc")] + Abc = 1, + /// + /// Enum Efg for value: -efg + /// + [EnumMember(Value = "-efg")] + Efg = 2, + /// + /// Enum Xyz for value: (xyz) + /// + [EnumMember(Value = "(xyz)")] + Xyz = 3 } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [DataMember(Name="enum_form_string", EmitDefaultValue=false)] + public EnumFormStringEnum? EnumFormString { get; set; } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumQueryDoubleEnum + { + /// + /// Enum NUMBER_1_DOT_1 for value: 1.1 + /// + [EnumMember(Value = "1.1")] + NUMBER_1_DOT_1 = 1, + /// + /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 + /// + [EnumMember(Value = "-1.2")] + NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [DataMember(Name="enum_query_double", EmitDefaultValue=false)] + public EnumQueryDoubleEnum? EnumQueryDouble { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Form parameter enum test (string array). + /// Form parameter enum test (string) (default to EnumFormStringEnum.Efg). + /// Query parameter enum test (double). + public EnumFormBody(List enumFormStringArray = default(List), EnumFormStringEnum? enumFormString = EnumFormStringEnum.Efg, EnumQueryDoubleEnum? enumQueryDouble = default(EnumQueryDoubleEnum?)) + { + this.EnumFormStringArray = enumFormStringArray; + // use default value if no "enumFormString" provided + if (enumFormString == null) + { + this.EnumFormString = EnumFormStringEnum.Efg; + } + else + { + this.EnumFormString = enumFormString; + } + this.EnumQueryDouble = enumQueryDouble; + } + + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EnumFormBody {\n"); + sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n"); + sb.Append(" EnumFormString: ").Append(EnumFormString).Append("\n"); + sb.Append(" EnumQueryDouble: ").Append(EnumQueryDouble).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EnumFormBody); + } + + /// + /// Returns true if EnumFormBody instances are equal + /// + /// Instance of EnumFormBody to be compared + /// Boolean + public bool Equals(EnumFormBody input) + { + if (input == null) + return false; + + return + ( + this.EnumFormStringArray == input.EnumFormStringArray || + this.EnumFormStringArray != null && + input.EnumFormStringArray != null && + this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray) + ) && + ( + this.EnumFormString == input.EnumFormString || + (this.EnumFormString != null && + this.EnumFormString.Equals(input.EnumFormString)) + ) && + ( + this.EnumQueryDouble == input.EnumQueryDouble || + (this.EnumQueryDouble != null && + this.EnumQueryDouble.Equals(input.EnumQueryDouble)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumFormStringArray != null) + hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode(); + if (this.EnumFormString != null) + hashCode = hashCode * 59 + this.EnumFormString.GetHashCode(); + if (this.EnumQueryDouble != null) + hashCode = hashCode * 59 + this.EnumQueryDouble.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeBody.cs new file mode 100644 index 00000000000..e9195500f32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeBody.cs @@ -0,0 +1,377 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody + /// + [DataContract] + public partial class FakeBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody); + } + + /// + /// Returns true if FakeBody instances are equal + /// + /// Instance of FakeBody to be compared + /// Boolean + public bool Equals(FakeBody input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeBody1.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeBody1.cs new file mode 100644 index 00000000000..661b57838ec --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeBody1.cs @@ -0,0 +1,377 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody1 + /// + [DataContract] + public partial class FakeBody1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody1(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody1 and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody1 and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody1 {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody1); + } + + /// + /// Returns true if FakeBody1 instances are equal + /// + /// Instance of FakeBody1 to be compared + /// Boolean + public bool Equals(FakeBody1 input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeJsonFormDataBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeJsonFormDataBody.cs new file mode 100644 index 00000000000..eba01f42903 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/FakeJsonFormDataBody.cs @@ -0,0 +1,156 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeJsonFormDataBody + /// + [DataContract] + public partial class FakeJsonFormDataBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// field1 (required). + /// field2 (required). + public FakeJsonFormDataBody(string param = default(string), string param2 = default(string)) + { + // to ensure "param" is required (not null) + if (param == null) + { + throw new InvalidDataException("param is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param = param; + } + // to ensure "param2" is required (not null) + if (param2 == null) + { + throw new InvalidDataException("param2 is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param2 = param2; + } + } + + /// + /// field1 + /// + /// field1 + [DataMember(Name="param", EmitDefaultValue=false)] + public string Param { get; set; } + + /// + /// field2 + /// + /// field2 + [DataMember(Name="param2", EmitDefaultValue=false)] + public string Param2 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeJsonFormDataBody {\n"); + sb.Append(" Param: ").Append(Param).Append("\n"); + sb.Append(" Param2: ").Append(Param2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeJsonFormDataBody); + } + + /// + /// Returns true if FakeJsonFormDataBody instances are equal + /// + /// Instance of FakeJsonFormDataBody to be compared + /// Boolean + public bool Equals(FakeJsonFormDataBody input) + { + if (input == null) + return false; + + return + ( + this.Param == input.Param || + (this.Param != null && + this.Param.Equals(input.Param)) + ) && + ( + this.Param2 == input.Param2 || + (this.Param2 != null && + this.Param2.Equals(input.Param2)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Param != null) + hashCode = hashCode * 59 + this.Param.GetHashCode(); + if (this.Param2 != null) + hashCode = hashCode * 59 + this.Param2.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetIdUploadImageBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetIdUploadImageBody.cs new file mode 100644 index 00000000000..bcc1f92da4f --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetIdUploadImageBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetIdUploadImageBody + /// + [DataContract] + public partial class PetIdUploadImageBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Additional data to pass to server. + /// file to upload. + public PetIdUploadImageBody(string additionalMetadata = default(string), byte[] file = default(byte[])) + { + this.AdditionalMetadata = additionalMetadata; + this.File = file; + } + + /// + /// Additional data to pass to server + /// + /// Additional data to pass to server + [DataMember(Name="additionalMetadata", EmitDefaultValue=false)] + public string AdditionalMetadata { get; set; } + + /// + /// file to upload + /// + /// file to upload + [DataMember(Name="file", EmitDefaultValue=false)] + public byte[] File { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetIdUploadImageBody {\n"); + sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n"); + sb.Append(" File: ").Append(File).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetIdUploadImageBody); + } + + /// + /// Returns true if PetIdUploadImageBody instances are equal + /// + /// Instance of PetIdUploadImageBody to be compared + /// Boolean + public bool Equals(PetIdUploadImageBody input) + { + if (input == null) + return false; + + return + ( + this.AdditionalMetadata == input.AdditionalMetadata || + (this.AdditionalMetadata != null && + this.AdditionalMetadata.Equals(input.AdditionalMetadata)) + ) && + ( + this.File == input.File || + (this.File != null && + this.File.Equals(input.File)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalMetadata != null) + hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode(); + if (this.File != null) + hashCode = hashCode * 59 + this.File.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..0be642af289 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION index 6e256321c31..86820ab0dd0 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.25-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md index df0b5851b28..960b327e794 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md @@ -147,26 +147,24 @@ Class | Method | HTTP request | Description - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - [Model.Animal](docs/Animal.md) + - [Model.AnimalAnimalIdBody](docs/AnimalAnimalIdBody.md) - [Model.AnimalFarm](docs/AnimalFarm.md) - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) - - [Model.Body3](docs/Body3.md) - - [Model.Body4](docs/Body4.md) - - [Model.Body5](docs/Body5.md) - - [Model.Body6](docs/Body6.md) - - [Model.Body7](docs/Body7.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.ClassModel](docs/ClassModel.md) - [Model.Dog](docs/Dog.md) + - [Model.DogDogIdBody](docs/DogDogIdBody.md) - [Model.EnumArrays](docs/EnumArrays.md) - [Model.EnumClass](docs/EnumClass.md) + - [Model.EnumFormBody](docs/EnumFormBody.md) - [Model.EnumTest](docs/EnumTest.md) + - [Model.FakeBody](docs/FakeBody.md) + - [Model.FakeBody1](docs/FakeBody1.md) + - [Model.FakeJsonFormDataBody](docs/FakeJsonFormDataBody.md) - [Model.FormatTest](docs/FormatTest.md) - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Model.MapTest](docs/MapTest.md) @@ -185,6 +183,8 @@ Class | Method | HTTP request | Description - [Model.OuterComposite](docs/OuterComposite.md) - [Model.OuterEnum](docs/OuterEnum.md) - [Model.Pet](docs/Pet.md) + - [Model.PetIdUploadImageBody](docs/PetIdUploadImageBody.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [Model.SinglePetResponse](docs/SinglePetResponse.md) - [Model.SpecialModelName](docs/SpecialModelName.md) @@ -221,5 +221,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AnimalAnimalIdBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AnimalAnimalIdBody.md new file mode 100644 index 00000000000..9918bf4bfa3 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AnimalAnimalIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.AnimalAnimalIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the animal | [optional] +**Status** | **string** | Updated status of the animal | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DogDogIdBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DogDogIdBody.md new file mode 100644 index 00000000000..87c71e12347 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DogDogIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.DogDogIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the dog | [optional] +**Status** | **string** | Updated status of the dog | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/EnumFormBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/EnumFormBody.md new file mode 100644 index 00000000000..57eb49c39fd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/EnumFormBody.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.EnumFormBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional] +**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg] +**EnumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md index bda2fc3c44b..d058c93344c 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeApi.md @@ -313,7 +313,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEndpointParameters** -> void TestEndpointParameters (Body2 body) +> void TestEndpointParameters (FakeBody body) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -338,7 +338,7 @@ namespace Example Configuration.Default.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(); - var body = new Body2(); // Body2 | + var body = new FakeBody(); // FakeBody | try { @@ -358,7 +358,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | + **body** | [**FakeBody**](FakeBody.md)| | ### Return type @@ -443,7 +443,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestEnumRequestBody** -> void TestEnumRequestBody (Body4 body = null) +> void TestEnumRequestBody (EnumFormBody body = null) To test enum parameters @@ -464,7 +464,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body4(); // Body4 | (optional) + var body = new EnumFormBody(); // EnumFormBody | (optional) try { @@ -484,7 +484,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body4**](Body4.md)| | [optional] + **body** | [**EnumFormBody**](EnumFormBody.md)| | [optional] ### Return type @@ -559,7 +559,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **TestJsonFormData** -> void TestJsonFormData (Body5 body) +> void TestJsonFormData (FakeJsonFormDataBody body) test json serialization of form data @@ -578,7 +578,7 @@ namespace Example public void main() { var apiInstance = new FakeApi(); - var body = new Body5(); // Body5 | + var body = new FakeJsonFormDataBody(); // FakeJsonFormDataBody | try { @@ -598,7 +598,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body5**](Body5.md)| | + **body** | [**FakeJsonFormDataBody**](FakeJsonFormDataBody.md)| | ### Return type diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeBody.md new file mode 100644 index 00000000000..94f8e388c8a --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeBody.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeBody1.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeBody1.md new file mode 100644 index 00000000000..5d5a88da008 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeBody1.md @@ -0,0 +1,22 @@ +# IO.Swagger.Model.FakeBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Integer** | **int?** | None | [optional] +**Int32** | **int?** | None | [optional] +**Int64** | **long?** | None | [optional] +**Number** | [**decimal?**](BigDecimal.md) | None | +**_Float** | **float?** | None | [optional] +**_Double** | **double?** | None | +**_String** | **string** | None | [optional] +**PatternWithoutDelimiter** | **string** | None | +**_Byte** | **byte[]** | None | +**Binary** | **byte[]** | None | [optional] +**Date** | **DateTime?** | None | [optional] +**DateTime** | **DateTime?** | None | [optional] +**Password** | **string** | None | [optional] +**Callback** | **string** | None | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeJsonFormDataBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeJsonFormDataBody.md new file mode 100644 index 00000000000..b11b38e2375 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/FakeJsonFormDataBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.FakeJsonFormDataBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Param** | **string** | field1 | +**Param2** | **string** | field2 | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetIdUploadImageBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetIdUploadImageBody.md new file mode 100644 index 00000000000..956c84b2c37 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetIdUploadImageBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetIdUploadImageBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AdditionalMetadata** | **string** | Additional data to pass to server | [optional] +**File** | **byte[]** | file to upload | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetPetIdBody.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SinglePetResponse.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SinglePetResponse.md index 9508d6cc0e9..a922823c936 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SinglePetResponse.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SinglePetResponse.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional] +**Pet** | **OneOfSinglePetResponsePet** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md index ab7f72772e8..0353116e609 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md @@ -3,9 +3,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Category** | [**AllOfSubCategoryCategory**](AllOfSubCategoryCategory.md) | | [optional] +**Category** | **AllOfSubCategoryCategory** | | [optional] **Category2** | [**Category**](Category.md) | | [optional] -**Pets** | [**List<AllOfSubCategoryPetsItems>**](.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs new file mode 100644 index 00000000000..3e9dd307be0 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AnimalAnimalIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnimalAnimalIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnimalAnimalIdBodyTests + { + // TODO uncomment below to declare an instance variable for AnimalAnimalIdBody + //private AnimalAnimalIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnimalAnimalIdBody + //instance = new AnimalAnimalIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnimalAnimalIdBody + /// + [Test] + public void AnimalAnimalIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnimalAnimalIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnimalAnimalIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs new file mode 100644 index 00000000000..b431d1d49fc --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/DogDogIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing DogDogIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DogDogIdBodyTests + { + // TODO uncomment below to declare an instance variable for DogDogIdBody + //private DogDogIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DogDogIdBody + //instance = new DogDogIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DogDogIdBody + /// + [Test] + public void DogDogIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DogDogIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DogDogIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs new file mode 100644 index 00000000000..dd24248665e --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/EnumFormBodyTests.cs @@ -0,0 +1,95 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing EnumFormBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class EnumFormBodyTests + { + // TODO uncomment below to declare an instance variable for EnumFormBody + //private EnumFormBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of EnumFormBody + //instance = new EnumFormBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of EnumFormBody + /// + [Test] + public void EnumFormBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" EnumFormBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a EnumFormBody"); + } + + + /// + /// Test the property 'EnumFormStringArray' + /// + [Test] + public void EnumFormStringArrayTest() + { + // TODO unit test for the property 'EnumFormStringArray' + } + /// + /// Test the property 'EnumFormString' + /// + [Test] + public void EnumFormStringTest() + { + // TODO unit test for the property 'EnumFormString' + } + /// + /// Test the property 'EnumQueryDouble' + /// + [Test] + public void EnumQueryDoubleTest() + { + // TODO unit test for the property 'EnumQueryDouble' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeBody1Tests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeBody1Tests.cs new file mode 100644 index 00000000000..70b4f62e937 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeBody1Tests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBody1Tests + { + // TODO uncomment below to declare an instance variable for FakeBody1 + //private FakeBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody1 + //instance = new FakeBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody1 + /// + [Test] + public void FakeBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody1"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeBodyTests.cs new file mode 100644 index 00000000000..df2ccabdddd --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeBodyTests.cs @@ -0,0 +1,183 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeBodyTests + { + // TODO uncomment below to declare an instance variable for FakeBody + //private FakeBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeBody + //instance = new FakeBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeBody + /// + [Test] + public void FakeBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeBody"); + } + + + /// + /// Test the property 'Integer' + /// + [Test] + public void IntegerTest() + { + // TODO unit test for the property 'Integer' + } + /// + /// Test the property 'Int32' + /// + [Test] + public void Int32Test() + { + // TODO unit test for the property 'Int32' + } + /// + /// Test the property 'Int64' + /// + [Test] + public void Int64Test() + { + // TODO unit test for the property 'Int64' + } + /// + /// Test the property 'Number' + /// + [Test] + public void NumberTest() + { + // TODO unit test for the property 'Number' + } + /// + /// Test the property '_Float' + /// + [Test] + public void _FloatTest() + { + // TODO unit test for the property '_Float' + } + /// + /// Test the property '_Double' + /// + [Test] + public void _DoubleTest() + { + // TODO unit test for the property '_Double' + } + /// + /// Test the property '_String' + /// + [Test] + public void _StringTest() + { + // TODO unit test for the property '_String' + } + /// + /// Test the property 'PatternWithoutDelimiter' + /// + [Test] + public void PatternWithoutDelimiterTest() + { + // TODO unit test for the property 'PatternWithoutDelimiter' + } + /// + /// Test the property '_Byte' + /// + [Test] + public void _ByteTest() + { + // TODO unit test for the property '_Byte' + } + /// + /// Test the property 'Binary' + /// + [Test] + public void BinaryTest() + { + // TODO unit test for the property 'Binary' + } + /// + /// Test the property 'Date' + /// + [Test] + public void DateTest() + { + // TODO unit test for the property 'Date' + } + /// + /// Test the property 'DateTime' + /// + [Test] + public void DateTimeTest() + { + // TODO unit test for the property 'DateTime' + } + /// + /// Test the property 'Password' + /// + [Test] + public void PasswordTest() + { + // TODO unit test for the property 'Password' + } + /// + /// Test the property 'Callback' + /// + [Test] + public void CallbackTest() + { + // TODO unit test for the property 'Callback' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs new file mode 100644 index 00000000000..f43855b7a32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/FakeJsonFormDataBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FakeJsonFormDataBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FakeJsonFormDataBodyTests + { + // TODO uncomment below to declare an instance variable for FakeJsonFormDataBody + //private FakeJsonFormDataBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of FakeJsonFormDataBody + //instance = new FakeJsonFormDataBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FakeJsonFormDataBody + /// + [Test] + public void FakeJsonFormDataBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" FakeJsonFormDataBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a FakeJsonFormDataBody"); + } + + + /// + /// Test the property 'Param' + /// + [Test] + public void ParamTest() + { + // TODO unit test for the property 'Param' + } + /// + /// Test the property 'Param2' + /// + [Test] + public void Param2Test() + { + // TODO unit test for the property 'Param2' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs new file mode 100644 index 00000000000..ce7416d9801 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetIdUploadImageBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetIdUploadImageBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetIdUploadImageBodyTests + { + // TODO uncomment below to declare an instance variable for PetIdUploadImageBody + //private PetIdUploadImageBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetIdUploadImageBody + //instance = new PetIdUploadImageBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetIdUploadImageBody + /// + [Test] + public void PetIdUploadImageBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetIdUploadImageBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetIdUploadImageBody"); + } + + + /// + /// Test the property 'AdditionalMetadata' + /// + [Test] + public void AdditionalMetadataTest() + { + // TODO unit test for the property 'AdditionalMetadata' + } + /// + /// Test the property 'File' + /// + [Test] + public void FileTest() + { + // TODO unit test for the property 'File' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..0cecc4d1ce2 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * 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 + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs index d4fc37614ec..15a9e1856d6 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/FakeApi.cs @@ -137,7 +137,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestEndpointParameters (Body2 body); + void TestEndpointParameters (FakeBody body); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -148,7 +148,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (Body2 body); + ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body); /// /// To test enum parameters /// @@ -187,7 +187,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// - void TestEnumRequestBody (Body4 body = null); + void TestEnumRequestBody (EnumFormBody body = null); /// /// To test enum parameters @@ -198,7 +198,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null); + ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null); /// /// test inline additionalProperties /// @@ -229,7 +229,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// - void TestJsonFormData (Body5 body); + void TestJsonFormData (FakeJsonFormDataBody body); /// /// test json serialization of form data @@ -240,7 +240,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (Body5 body); + ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -357,7 +357,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (Body2 body); + System.Threading.Tasks.Task TestEndpointParametersAsync (FakeBody body); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -368,7 +368,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (Body2 body); + System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (FakeBody body); /// /// To test enum parameters /// @@ -407,7 +407,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of void - System.Threading.Tasks.Task TestEnumRequestBodyAsync (Body4 body = null); + System.Threading.Tasks.Task TestEnumRequestBodyAsync (EnumFormBody body = null); /// /// To test enum parameters @@ -418,7 +418,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (Body4 body = null); + System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (EnumFormBody body = null); /// /// test inline additionalProperties /// @@ -449,7 +449,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync (Body5 body); + System.Threading.Tasks.Task TestJsonFormDataAsync (FakeJsonFormDataBody body); /// /// test json serialization of form data @@ -460,7 +460,7 @@ public interface IFakeApi : IApiAccessor /// Thrown when fails to make API call /// /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (Body5 body); + System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (FakeJsonFormDataBody body); #endregion Asynchronous Operations } @@ -1289,7 +1289,7 @@ public async System.Threading.Tasks.Task> TestClientMod /// Thrown when fails to make API call /// /// - public void TestEndpointParameters (Body2 body) + public void TestEndpointParameters (FakeBody body) { TestEndpointParametersWithHttpInfo(body); } @@ -1300,7 +1300,7 @@ public void TestEndpointParameters (Body2 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (Body2 body) + public ApiResponse TestEndpointParametersWithHttpInfo (FakeBody body) { // verify the required parameter 'body' is set if (body == null) @@ -1367,7 +1367,7 @@ public ApiResponse TestEndpointParametersWithHttpInfo (Body2 body) /// Thrown when fails to make API call /// /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (Body2 body) + public async System.Threading.Tasks.Task TestEndpointParametersAsync (FakeBody body) { await TestEndpointParametersAsyncWithHttpInfo(body); @@ -1379,7 +1379,7 @@ public async System.Threading.Tasks.Task TestEndpointParametersAsync (Body2 body /// Thrown when fails to make API call /// /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (Body2 body) + public async System.Threading.Tasks.Task> TestEndpointParametersAsyncWithHttpInfo (FakeBody body) { // verify the required parameter 'body' is set if (body == null) @@ -1591,7 +1591,7 @@ public async System.Threading.Tasks.Task> TestEnumParameters /// Thrown when fails to make API call /// (optional) /// - public void TestEnumRequestBody (Body4 body = null) + public void TestEnumRequestBody (EnumFormBody body = null) { TestEnumRequestBodyWithHttpInfo(body); } @@ -1602,7 +1602,7 @@ public void TestEnumRequestBody (Body4 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of Object(void) - public ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null) + public ApiResponse TestEnumRequestBodyWithHttpInfo (EnumFormBody body = null) { var localVarPath = "/fake/enum/form"; @@ -1659,7 +1659,7 @@ public ApiResponse TestEnumRequestBodyWithHttpInfo (Body4 body = null) /// Thrown when fails to make API call /// (optional) /// Task of void - public async System.Threading.Tasks.Task TestEnumRequestBodyAsync (Body4 body = null) + public async System.Threading.Tasks.Task TestEnumRequestBodyAsync (EnumFormBody body = null) { await TestEnumRequestBodyAsyncWithHttpInfo(body); @@ -1671,7 +1671,7 @@ public async System.Threading.Tasks.Task TestEnumRequestBodyAsync (Body4 body = /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (Body4 body = null) + public async System.Threading.Tasks.Task> TestEnumRequestBodyAsyncWithHttpInfo (EnumFormBody body = null) { var localVarPath = "/fake/enum/form"; @@ -1871,7 +1871,7 @@ public async System.Threading.Tasks.Task> TestInlineAddition /// Thrown when fails to make API call /// /// - public void TestJsonFormData (Body5 body) + public void TestJsonFormData (FakeJsonFormDataBody body) { TestJsonFormDataWithHttpInfo(body); } @@ -1882,7 +1882,7 @@ public void TestJsonFormData (Body5 body) /// Thrown when fails to make API call /// /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (Body5 body) + public ApiResponse TestJsonFormDataWithHttpInfo (FakeJsonFormDataBody body) { // verify the required parameter 'body' is set if (body == null) @@ -1942,7 +1942,7 @@ public ApiResponse TestJsonFormDataWithHttpInfo (Body5 body) /// Thrown when fails to make API call /// /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync (Body5 body) + public async System.Threading.Tasks.Task TestJsonFormDataAsync (FakeJsonFormDataBody body) { await TestJsonFormDataAsyncWithHttpInfo(body); @@ -1954,7 +1954,7 @@ public async System.Threading.Tasks.Task TestJsonFormDataAsync (Body5 body) /// Thrown when fails to make API call /// /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (Body5 body) + public async System.Threading.Tasks.Task> TestJsonFormDataAsyncWithHttpInfo (FakeJsonFormDataBody body) { // verify the required parameter 'body' is set if (body == null) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs index 0c625ceef67..f0bc1602703 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs index c9bf44c4941..5ab2b6d350d 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs index ca119ab86ca..33273c6c029 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs index c13fa657fb5..1cfd4e87f1e 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs @@ -20,7 +20,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs index 1dc87a86251..e3ff9c18b78 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs index 8bf35b3e1b9..9b3e6665ce1 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalAnimalIdBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalAnimalIdBody.cs new file mode 100644 index 00000000000..b9454114c1d --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnimalAnimalIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnimalAnimalIdBody + /// + [DataContract] + public partial class AnimalAnimalIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the animal. + /// Updated status of the animal. + public AnimalAnimalIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the animal + /// + /// Updated name of the animal + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the animal + /// + /// Updated status of the animal + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnimalAnimalIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnimalAnimalIdBody); + } + + /// + /// Returns true if AnimalAnimalIdBody instances are equal + /// + /// Instance of AnimalAnimalIdBody to be compared + /// Boolean + public bool Equals(AnimalAnimalIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/DogDogIdBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/DogDogIdBody.cs new file mode 100644 index 00000000000..72e095e5e17 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/DogDogIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// DogDogIdBody + /// + [DataContract] + public partial class DogDogIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the dog. + /// Updated status of the dog. + public DogDogIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the dog + /// + /// Updated name of the dog + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the dog + /// + /// Updated status of the dog + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DogDogIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DogDogIdBody); + } + + /// + /// Returns true if DogDogIdBody instances are equal + /// + /// Instance of DogDogIdBody to be compared + /// Boolean + public bool Equals(DogDogIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumFormBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumFormBody.cs new file mode 100644 index 00000000000..4d592ff742b --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/EnumFormBody.cs @@ -0,0 +1,221 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// EnumFormBody + /// + [DataContract] + public partial class EnumFormBody : IEquatable, IValidatableObject + { + /// + /// Defines EnumFormStringArray + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringArrayEnum + { + /// + /// Enum GreaterThan for value: > + /// + [EnumMember(Value = ">")] + GreaterThan = 1, + /// + /// Enum Dollar for value: $ + /// + [EnumMember(Value = "$")] + Dollar = 2 } + /// + /// Form parameter enum test (string array) + /// + /// Form parameter enum test (string array) + [DataMember(Name="enum_form_string_array", EmitDefaultValue=false)] + public List EnumFormStringArray { get; set; } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumFormStringEnum + { + /// + /// Enum Abc for value: _abc + /// + [EnumMember(Value = "_abc")] + Abc = 1, + /// + /// Enum Efg for value: -efg + /// + [EnumMember(Value = "-efg")] + Efg = 2, + /// + /// Enum Xyz for value: (xyz) + /// + [EnumMember(Value = "(xyz)")] + Xyz = 3 } + /// + /// Form parameter enum test (string) + /// + /// Form parameter enum test (string) + [DataMember(Name="enum_form_string", EmitDefaultValue=false)] + public EnumFormStringEnum? EnumFormString { get; set; } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumQueryDoubleEnum + { + /// + /// Enum NUMBER_1_DOT_1 for value: 1.1 + /// + [EnumMember(Value = "1.1")] + NUMBER_1_DOT_1 = 1, + /// + /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 + /// + [EnumMember(Value = "-1.2")] + NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Query parameter enum test (double) + /// + /// Query parameter enum test (double) + [DataMember(Name="enum_query_double", EmitDefaultValue=false)] + public EnumQueryDoubleEnum? EnumQueryDouble { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Form parameter enum test (string array). + /// Form parameter enum test (string) (default to EnumFormStringEnum.Efg). + /// Query parameter enum test (double). + public EnumFormBody(List enumFormStringArray = default(List), EnumFormStringEnum? enumFormString = EnumFormStringEnum.Efg, EnumQueryDoubleEnum? enumQueryDouble = default(EnumQueryDoubleEnum?)) + { + this.EnumFormStringArray = enumFormStringArray; + // use default value if no "enumFormString" provided + if (enumFormString == null) + { + this.EnumFormString = EnumFormStringEnum.Efg; + } + else + { + this.EnumFormString = enumFormString; + } + this.EnumQueryDouble = enumQueryDouble; + } + + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class EnumFormBody {\n"); + sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n"); + sb.Append(" EnumFormString: ").Append(EnumFormString).Append("\n"); + sb.Append(" EnumQueryDouble: ").Append(EnumQueryDouble).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as EnumFormBody); + } + + /// + /// Returns true if EnumFormBody instances are equal + /// + /// Instance of EnumFormBody to be compared + /// Boolean + public bool Equals(EnumFormBody input) + { + if (input == null) + return false; + + return + ( + this.EnumFormStringArray == input.EnumFormStringArray || + this.EnumFormStringArray != null && + input.EnumFormStringArray != null && + this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray) + ) && + ( + this.EnumFormString == input.EnumFormString || + (this.EnumFormString != null && + this.EnumFormString.Equals(input.EnumFormString)) + ) && + ( + this.EnumQueryDouble == input.EnumQueryDouble || + (this.EnumQueryDouble != null && + this.EnumQueryDouble.Equals(input.EnumQueryDouble)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumFormStringArray != null) + hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode(); + if (this.EnumFormString != null) + hashCode = hashCode * 59 + this.EnumFormString.GetHashCode(); + if (this.EnumQueryDouble != null) + hashCode = hashCode * 59 + this.EnumQueryDouble.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeBody.cs new file mode 100644 index 00000000000..e9195500f32 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeBody.cs @@ -0,0 +1,377 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody + /// + [DataContract] + public partial class FakeBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody); + } + + /// + /// Returns true if FakeBody instances are equal + /// + /// Instance of FakeBody to be compared + /// Boolean + public bool Equals(FakeBody input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeBody1.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeBody1.cs new file mode 100644 index 00000000000..661b57838ec --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeBody1.cs @@ -0,0 +1,377 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeBody1 + /// + [DataContract] + public partial class FakeBody1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// None. + /// None. + /// None. + /// None (required). + /// None. + /// None (required). + /// None. + /// None (required). + /// None (required). + /// None. + /// None. + /// None. + /// None. + /// None. + public FakeBody1(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), byte[] binary = default(byte[]), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) + { + // to ensure "number" is required (not null) + if (number == null) + { + throw new InvalidDataException("number is a required property for FakeBody1 and cannot be null"); + } + else + { + this.Number = number; + } + // to ensure "_double" is required (not null) + if (_double == null) + { + throw new InvalidDataException("_double is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Double = _double; + } + // to ensure "patternWithoutDelimiter" is required (not null) + if (patternWithoutDelimiter == null) + { + throw new InvalidDataException("patternWithoutDelimiter is a required property for FakeBody1 and cannot be null"); + } + else + { + this.PatternWithoutDelimiter = patternWithoutDelimiter; + } + // to ensure "_byte" is required (not null) + if (_byte == null) + { + throw new InvalidDataException("_byte is a required property for FakeBody1 and cannot be null"); + } + else + { + this._Byte = _byte; + } + this.Integer = integer; + this.Int32 = int32; + this.Int64 = int64; + this._Float = _float; + this._String = _string; + this.Binary = binary; + this.Date = date; + this.DateTime = dateTime; + this.Password = password; + this.Callback = callback; + } + + /// + /// None + /// + /// None + [DataMember(Name="integer", EmitDefaultValue=false)] + public int? Integer { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int32", EmitDefaultValue=false)] + public int? Int32 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="int64", EmitDefaultValue=false)] + public long? Int64 { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="number", EmitDefaultValue=false)] + public decimal? Number { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="float", EmitDefaultValue=false)] + public float? _Float { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="double", EmitDefaultValue=false)] + public double? _Double { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="string", EmitDefaultValue=false)] + public string _String { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)] + public string PatternWithoutDelimiter { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="byte", EmitDefaultValue=false)] + public byte[] _Byte { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="binary", EmitDefaultValue=false)] + public byte[] Binary { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="date", EmitDefaultValue=false)] + [JsonConverter(typeof(SwaggerDateConverter))] + public DateTime? Date { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="dateTime", EmitDefaultValue=false)] + public DateTime? DateTime { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// None + /// + /// None + [DataMember(Name="callback", EmitDefaultValue=false)] + public string Callback { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeBody1 {\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Int32: ").Append(Int32).Append("\n"); + sb.Append(" Int64: ").Append(Int64).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" _Float: ").Append(_Float).Append("\n"); + sb.Append(" _Double: ").Append(_Double).Append("\n"); + sb.Append(" _String: ").Append(_String).Append("\n"); + sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n"); + sb.Append(" _Byte: ").Append(_Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" Date: ").Append(Date).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Callback: ").Append(Callback).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeBody1); + } + + /// + /// Returns true if FakeBody1 instances are equal + /// + /// Instance of FakeBody1 to be compared + /// Boolean + public bool Equals(FakeBody1 input) + { + if (input == null) + return false; + + return + ( + this.Integer == input.Integer || + (this.Integer != null && + this.Integer.Equals(input.Integer)) + ) && + ( + this.Int32 == input.Int32 || + (this.Int32 != null && + this.Int32.Equals(input.Int32)) + ) && + ( + this.Int64 == input.Int64 || + (this.Int64 != null && + this.Int64.Equals(input.Int64)) + ) && + ( + this.Number == input.Number || + (this.Number != null && + this.Number.Equals(input.Number)) + ) && + ( + this._Float == input._Float || + (this._Float != null && + this._Float.Equals(input._Float)) + ) && + ( + this._Double == input._Double || + (this._Double != null && + this._Double.Equals(input._Double)) + ) && + ( + this._String == input._String || + (this._String != null && + this._String.Equals(input._String)) + ) && + ( + this.PatternWithoutDelimiter == input.PatternWithoutDelimiter || + (this.PatternWithoutDelimiter != null && + this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter)) + ) && + ( + this._Byte == input._Byte || + (this._Byte != null && + this._Byte.Equals(input._Byte)) + ) && + ( + this.Binary == input.Binary || + (this.Binary != null && + this.Binary.Equals(input.Binary)) + ) && + ( + this.Date == input.Date || + (this.Date != null && + this.Date.Equals(input.Date)) + ) && + ( + this.DateTime == input.DateTime || + (this.DateTime != null && + this.DateTime.Equals(input.DateTime)) + ) && + ( + this.Password == input.Password || + (this.Password != null && + this.Password.Equals(input.Password)) + ) && + ( + this.Callback == input.Callback || + (this.Callback != null && + this.Callback.Equals(input.Callback)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Integer != null) + hashCode = hashCode * 59 + this.Integer.GetHashCode(); + if (this.Int32 != null) + hashCode = hashCode * 59 + this.Int32.GetHashCode(); + if (this.Int64 != null) + hashCode = hashCode * 59 + this.Int64.GetHashCode(); + if (this.Number != null) + hashCode = hashCode * 59 + this.Number.GetHashCode(); + if (this._Float != null) + hashCode = hashCode * 59 + this._Float.GetHashCode(); + if (this._Double != null) + hashCode = hashCode * 59 + this._Double.GetHashCode(); + if (this._String != null) + hashCode = hashCode * 59 + this._String.GetHashCode(); + if (this.PatternWithoutDelimiter != null) + hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode(); + if (this._Byte != null) + hashCode = hashCode * 59 + this._Byte.GetHashCode(); + if (this.Binary != null) + hashCode = hashCode * 59 + this.Binary.GetHashCode(); + if (this.Date != null) + hashCode = hashCode * 59 + this.Date.GetHashCode(); + if (this.DateTime != null) + hashCode = hashCode * 59 + this.DateTime.GetHashCode(); + if (this.Password != null) + hashCode = hashCode * 59 + this.Password.GetHashCode(); + if (this.Callback != null) + hashCode = hashCode * 59 + this.Callback.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeJsonFormDataBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeJsonFormDataBody.cs new file mode 100644 index 00000000000..eba01f42903 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/FakeJsonFormDataBody.cs @@ -0,0 +1,156 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// FakeJsonFormDataBody + /// + [DataContract] + public partial class FakeJsonFormDataBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// field1 (required). + /// field2 (required). + public FakeJsonFormDataBody(string param = default(string), string param2 = default(string)) + { + // to ensure "param" is required (not null) + if (param == null) + { + throw new InvalidDataException("param is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param = param; + } + // to ensure "param2" is required (not null) + if (param2 == null) + { + throw new InvalidDataException("param2 is a required property for FakeJsonFormDataBody and cannot be null"); + } + else + { + this.Param2 = param2; + } + } + + /// + /// field1 + /// + /// field1 + [DataMember(Name="param", EmitDefaultValue=false)] + public string Param { get; set; } + + /// + /// field2 + /// + /// field2 + [DataMember(Name="param2", EmitDefaultValue=false)] + public string Param2 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class FakeJsonFormDataBody {\n"); + sb.Append(" Param: ").Append(Param).Append("\n"); + sb.Append(" Param2: ").Append(Param2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as FakeJsonFormDataBody); + } + + /// + /// Returns true if FakeJsonFormDataBody instances are equal + /// + /// Instance of FakeJsonFormDataBody to be compared + /// Boolean + public bool Equals(FakeJsonFormDataBody input) + { + if (input == null) + return false; + + return + ( + this.Param == input.Param || + (this.Param != null && + this.Param.Equals(input.Param)) + ) && + ( + this.Param2 == input.Param2 || + (this.Param2 != null && + this.Param2.Equals(input.Param2)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Param != null) + hashCode = hashCode * 59 + this.Param.GetHashCode(); + if (this.Param2 != null) + hashCode = hashCode * 59 + this.Param2.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetIdUploadImageBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetIdUploadImageBody.cs new file mode 100644 index 00000000000..bcc1f92da4f --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetIdUploadImageBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetIdUploadImageBody + /// + [DataContract] + public partial class PetIdUploadImageBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Additional data to pass to server. + /// file to upload. + public PetIdUploadImageBody(string additionalMetadata = default(string), byte[] file = default(byte[])) + { + this.AdditionalMetadata = additionalMetadata; + this.File = file; + } + + /// + /// Additional data to pass to server + /// + /// Additional data to pass to server + [DataMember(Name="additionalMetadata", EmitDefaultValue=false)] + public string AdditionalMetadata { get; set; } + + /// + /// file to upload + /// + /// file to upload + [DataMember(Name="file", EmitDefaultValue=false)] + public byte[] File { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetIdUploadImageBody {\n"); + sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n"); + sb.Append(" File: ").Append(File).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetIdUploadImageBody); + } + + /// + /// Returns true if PetIdUploadImageBody instances are equal + /// + /// Instance of PetIdUploadImageBody to be compared + /// Boolean + public bool Equals(PetIdUploadImageBody input) + { + if (input == null) + return false; + + return + ( + this.AdditionalMetadata == input.AdditionalMetadata || + (this.AdditionalMetadata != null && + this.AdditionalMetadata.Equals(input.AdditionalMetadata)) + ) && + ( + this.File == input.File || + (this.File != null && + this.File.Equals(input.File)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.AdditionalMetadata != null) + hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode(); + if (this.File != null) + hashCode = hashCode * 59 + this.File.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..0be642af289 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,140 @@ +/* + * 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 + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION b/samples/composed/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION index 5d9eef07d78..86820ab0dd0 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION +++ b/samples/composed/client/petstore/csharp/SwaggerClient/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.17-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/README.md b/samples/composed/client/petstore/csharp/SwaggerClient/README.md index 3ebc4c5095a..70698e4c32d 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/README.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/README.md @@ -74,7 +74,7 @@ namespace Example try { - List result = apiInstance.TestMethod(); + List result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -97,6 +97,7 @@ Class | Method | HTTP request | Description *PetApi* | [**AddParrot**](docs/PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**DoCategoryStuff**](docs/PetApi.md#docategorystuff) | **POST** /pet/category | *PetApi* | [**FeedPet**](docs/PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -122,38 +123,39 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.AllOfSubCategoryCategory](docs/AllOfSubCategoryCategory.md) + - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - - [Model.AnyOfbody1ParrotsItems](docs/AnyOfbody1ParrotsItems.md) - - [Model.AnyOfbody2](docs/AnyOfbody2.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) + - [Model.AnyOfparrotBodyParrotsItems](docs/AnyOfparrotBodyParrotsItems.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.Dog](docs/Dog.md) - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.InlineResponse2001](docs/InlineResponse2001.md) - [Model.Macaw](docs/Macaw.md) + - [Model.ModelApiResponse](docs/ModelApiResponse.md) + - [Model.NullableEnumModel](docs/NullableEnumModel.md) - [Model.OneOfAllPetsResponseItems](docs/OneOfAllPetsResponseItems.md) - [Model.OneOfPartMasterDestination](docs/OneOfPartMasterDestination.md) - [Model.OneOfPartMasterOrigin](docs/OneOfPartMasterOrigin.md) - [Model.OneOfPetPartItems](docs/OneOfPetPartItems.md) - [Model.OneOfPup](docs/OneOfPup.md) - - [Model.OneOfinlineResponse2001](docs/OneOfinlineResponse2001.md) - [Model.OneOfinlineResponse200ParrotsItems](docs/OneOfinlineResponse200ParrotsItems.md) - [Model.OneOfvalMembersValMemberItems](docs/OneOfvalMembersValMemberItems.md) - [Model.Order](docs/Order.md) - [Model.Parakeet](docs/Parakeet.md) + - [Model.ParrotBody](docs/ParrotBody.md) + - [Model.ParrotBody1](docs/ParrotBody1.md) - [Model.PartFour](docs/PartFour.md) - [Model.PartMaster](docs/PartMaster.md) - [Model.PartOne](docs/PartOne.md) - [Model.PartThree](docs/PartThree.md) - [Model.PartTwo](docs/PartTwo.md) - [Model.Pet](docs/Pet.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.Pup](docs/Pup.md) + - [Model.SubCategory](docs/SubCategory.md) - [Model.Tag](docs/Tag.md) - - [Model.Test](docs/Test.md) - [Model.User](docs/User.md) - [Model.ValMemberChoice1](docs/ValMemberChoice1.md) - [Model.ValMemberChoice2](docs/ValMemberChoice2.md) @@ -180,5 +182,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/AllOfSubCategoryCategory.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/AllOfSubCategoryCategory.md new file mode 100644 index 00000000000..f58e49769ef --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/AllOfSubCategoryCategory.md @@ -0,0 +1,15 @@ +# IO.Swagger.Model.AllOfSubCategoryCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | [optional] +**Subcategories** | [**List<Category>**](Category.md) | | [optional] +**Foo** | **bool?** | | [optional] +**Bar** | **int?** | | [optional] +**Beer** | **string** | | [optional] +**Drunk** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/AllOfSubCategoryPetsItems.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/AllOfSubCategoryPetsItems.md new file mode 100644 index 00000000000..f21b362dc89 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/AllOfSubCategoryPetsItems.md @@ -0,0 +1,12 @@ +# IO.Swagger.Model.AllOfSubCategoryPetsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | +**Status** | **string** | pet status in the store | [optional] +**Part** | **List<Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/AnyOfparrotBodyParrotsItems.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/AnyOfparrotBodyParrotsItems.md new file mode 100644 index 00000000000..6a9e62ad98f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/AnyOfparrotBodyParrotsItems.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.AnyOfparrotBodyParrotsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/Cat.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/Cat.md index a78e291b071..508f2203c66 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/Cat.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/Cat.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Hunts** | **bool?** | | [optional] **Age** | **int?** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/DefaultApi.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/DefaultApi.md index 7673e4e33ce..d1c5a072abb 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/DefaultApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/DefaultApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **TestMethod** -> List TestMethod () +> List TestMethod () @@ -31,7 +31,7 @@ namespace Example try { - List<Test> result = apiInstance.TestMethod(); + List<string> result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -[**List**](Test.md) +**List** ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/Dog.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/Dog.md index b6f7d9bce79..d2b4d917f58 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/Dog.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/Dog.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Bark** | **bool?** | | [optional] **Breed** | **string** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/InlineResponse200.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/InlineResponse200.md index d333d594be6..567456756cf 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/InlineResponse200.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/InlineResponse200.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Parrots** | [**List<OneOfinlineResponse200ParrotsItems>**](.md) | | [optional] +**Parrots** | **List<OneOfinlineResponse200ParrotsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/ModelApiResponse.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ModelApiResponse.md new file mode 100644 index 00000000000..a9e743b78ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ModelApiResponse.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.ModelApiResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **int?** | | [optional] +**Type** | **string** | | [optional] +**Message** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/NullableEnumModel.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/NullableEnumModel.md new file mode 100644 index 00000000000..56e19f258f7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/NullableEnumModel.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.NullableEnumModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumProp** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/ParrotBody.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ParrotBody.md new file mode 100644 index 00000000000..c8079e929ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ParrotBody.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.ParrotBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Parrots** | **List<AnyOfparrotBodyParrotsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/ParrotBody1.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ParrotBody1.md new file mode 100644 index 00000000000..97e4c785e6a --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ParrotBody1.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.ParrotBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/PartMaster.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/PartMaster.md index af910ffa960..5129b771794 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/PartMaster.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/PartMaster.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Destination** | [**OneOfPartMasterDestination**](OneOfPartMasterDestination.md) | | [optional] -**Origin** | [**OneOfPartMasterOrigin**](OneOfPartMasterOrigin.md) | | [optional] +**Destination** | **OneOfPartMasterDestination** | | [optional] +**Origin** | **OneOfPartMasterOrigin** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/Pet.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/Pet.md index 6f41e38bf68..190033af45f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/Pet.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/Pet.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<OneOfPetPartItems>**](.md) | | [optional] +**Part** | **List<OneOfPetPartItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetApi.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetApi.md index e2de3a2e37c..a6bfc42370c 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**AddParrot**](PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**DoCategoryStuff**](PetApi.md#docategorystuff) | **POST** /pet/category | [**FeedPet**](PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -19,7 +20,7 @@ Method | HTTP request | Description # **AddParrot** -> InlineResponse2001 AddParrot (Body2 body = null) +> InlineResponse2001 AddParrot (ParrotBody1 body = null) Add a new parrow to the store @@ -38,7 +39,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body2(); // Body2 | (optional) + var body = new ParrotBody1(); // ParrotBody1 | (optional) try { @@ -59,7 +60,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | [optional] + **body** | [**ParrotBody1**](ParrotBody1.md)| | [optional] ### Return type @@ -196,6 +197,63 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DoCategoryStuff** +> ModelApiResponse DoCategoryStuff (SubCategory body = null) + + + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class DoCategoryStuffExample + { + public void main() + { + var apiInstance = new PetApi(); + var body = new SubCategory(); // SubCategory | (optional) + + try + { + ModelApiResponse result = apiInstance.DoCategoryStuff(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.DoCategoryStuff: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SubCategory**](SubCategory.md)| | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FeedPet** @@ -392,7 +450,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetParrots** -> List<> GetParrots () +> List GetParrots () get Parrots @@ -415,7 +473,7 @@ namespace Example try { // get Parrots - List<> result = apiInstance.GetParrots(); + List<Object> result = apiInstance.GetParrots(); Debug.WriteLine(result); } catch (Exception e) @@ -432,7 +490,7 @@ This endpoint does not need any parameter. ### Return type -[**List<>**](.md) +**List** ### Authorization @@ -511,7 +569,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateParrots** -> InlineResponse200 UpdateParrots (Body1 body = null) +> InlineResponse200 UpdateParrots (ParrotBody body = null) update parrots @@ -530,7 +588,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body1(); // Body1 | (optional) + var body = new ParrotBody(); // ParrotBody | (optional) try { @@ -551,7 +609,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body1**](Body1.md)| | [optional] + **body** | [**ParrotBody**](ParrotBody.md)| | [optional] ### Return type @@ -693,7 +751,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UploadFile** -> ApiResponse UploadFile (long? petId, Object body = null) +> ModelApiResponse UploadFile (long? petId, Object body = null) uploads an image @@ -721,7 +779,7 @@ namespace Example try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, body); + ModelApiResponse result = apiInstance.UploadFile(petId, body); Debug.WriteLine(result); } catch (Exception e) @@ -742,7 +800,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**ModelApiResponse**](ModelApiResponse.md) ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/SubCategory.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/SubCategory.md new file mode 100644 index 00000000000..0353116e609 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/SubCategory.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.SubCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | **AllOfSubCategoryCategory** | | [optional] +**Category2** | [**Category**](Category.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/docs/ValMembers.md b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ValMembers.md index 2a71e4666c4..bcf897a1f7f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/docs/ValMembers.md +++ b/samples/composed/client/petstore/csharp/SwaggerClient/docs/ValMembers.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ValMember** | [**List<OneOfvalMembersValMemberItems>**](.md) | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | +**ValMember** | **List<OneOfvalMembersValMemberItems>** | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs new file mode 100644 index 00000000000..e59e87eedda --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs @@ -0,0 +1,103 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryCategoryTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryCategory + //private AllOfSubCategoryCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryCategory + //instance = new AllOfSubCategoryCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryCategory + /// + [Test] + public void AllOfSubCategoryCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryCategory"); + } + + + /// + /// Test the property 'Foo' + /// + [Test] + public void FooTest() + { + // TODO unit test for the property 'Foo' + } + /// + /// Test the property 'Bar' + /// + [Test] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + /// + /// Test the property 'Beer' + /// + [Test] + public void BeerTest() + { + // TODO unit test for the property 'Beer' + } + /// + /// Test the property 'Drunk' + /// + [Test] + public void DrunkTest() + { + // TODO unit test for the property 'Drunk' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs new file mode 100644 index 00000000000..04abff11413 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryPetsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryPetsItemsTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryPetsItems + //private AllOfSubCategoryPetsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryPetsItems + //instance = new AllOfSubCategoryPetsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryPetsItems + /// + [Test] + public void AllOfSubCategoryPetsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryPetsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryPetsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs new file mode 100644 index 00000000000..0f4ed0178e7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnyOfparrotBodyParrotsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnyOfparrotBodyParrotsItemsTests + { + // TODO uncomment below to declare an instance variable for AnyOfparrotBodyParrotsItems + //private AnyOfparrotBodyParrotsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnyOfparrotBodyParrotsItems + //instance = new AnyOfparrotBodyParrotsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnyOfparrotBodyParrotsItems + /// + [Test] + public void AnyOfparrotBodyParrotsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnyOfparrotBodyParrotsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnyOfparrotBodyParrotsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs new file mode 100644 index 00000000000..798a3bcda23 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ModelApiResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ModelApiResponseTests + { + // TODO uncomment below to declare an instance variable for ModelApiResponse + //private ModelApiResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ModelApiResponse + //instance = new ModelApiResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ModelApiResponse + /// + [Test] + public void ModelApiResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ModelApiResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ModelApiResponse"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs new file mode 100644 index 00000000000..e2035b16000 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing NullableEnumModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class NullableEnumModelTests + { + // TODO uncomment below to declare an instance variable for NullableEnumModel + //private NullableEnumModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of NullableEnumModel + //instance = new NullableEnumModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of NullableEnumModel + /// + [Test] + public void NullableEnumModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" NullableEnumModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a NullableEnumModel"); + } + + + /// + /// Test the property 'EnumProp' + /// + [Test] + public void EnumPropTest() + { + // TODO unit test for the property 'EnumProp' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs new file mode 100644 index 00000000000..720c49b6871 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBody1Tests + { + // TODO uncomment below to declare an instance variable for ParrotBody1 + //private ParrotBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody1 + //instance = new ParrotBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody1 + /// + [Test] + public void ParrotBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody1"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ParrotBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ParrotBodyTests.cs new file mode 100644 index 00000000000..e4e29538d4c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/ParrotBodyTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBodyTests + { + // TODO uncomment below to declare an instance variable for ParrotBody + //private ParrotBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody + //instance = new ParrotBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody + /// + [Test] + public void ParrotBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody"); + } + + + /// + /// Test the property 'Parrots' + /// + [Test] + public void ParrotsTest() + { + // TODO unit test for the property 'Parrots' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..548d15aaa0c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SubCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SubCategoryTests.cs new file mode 100644 index 00000000000..844d772cf1f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger.Test/Model/SubCategoryTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing SubCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SubCategoryTests + { + // TODO uncomment below to declare an instance variable for SubCategory + //private SubCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SubCategory + //instance = new SubCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SubCategory + /// + [Test] + public void SubCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SubCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SubCategory"); + } + + + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Category2' + /// + [Test] + public void Category2Test() + { + // TODO unit test for the property 'Category2' + } + /// + /// Test the property 'Pets' + /// + [Test] + public void PetsTest() + { + // TODO unit test for the property 'Pets' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/DefaultApi.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/DefaultApi.cs index 541adc5c6cb..bd8ae46d2c1 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/DefaultApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/DefaultApi.cs @@ -13,7 +13,6 @@ using System.Linq; using RestSharp; using IO.Swagger.Client; -using IO.Swagger.Model; namespace IO.Swagger.Api { @@ -30,8 +29,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<Test> - List TestMethod (); + /// List<string> + List TestMethod (); /// /// @@ -40,8 +39,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - ApiResponse> TestMethodWithHttpInfo (); + /// ApiResponse of List<string> + ApiResponse> TestMethodWithHttpInfo (); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -51,8 +50,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of List<Test> - System.Threading.Tasks.Task> TestMethodAsync (); + /// Task of List<string> + System.Threading.Tasks.Task> TestMethodAsync (); /// /// @@ -61,8 +60,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<Test>) - System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo (); + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo (); #endregion Asynchronous Operations } @@ -178,10 +177,10 @@ public void AddDefaultHeader(string key, string value) /// /// /// Thrown when fails to make API call - /// List<Test> - public List TestMethod () + /// List<string> + public List TestMethod () { - ApiResponse> localVarResponse = TestMethodWithHttpInfo(); + ApiResponse> localVarResponse = TestMethodWithHttpInfo(); return localVarResponse.Data; } @@ -189,8 +188,8 @@ public List TestMethod () /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - public ApiResponse< List > TestMethodWithHttpInfo () + /// ApiResponse of List<string> + public ApiResponse< List > TestMethodWithHttpInfo () { var localVarPath = "/test"; @@ -234,19 +233,19 @@ public ApiResponse< List > TestMethodWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// /// /// /// Thrown when fails to make API call - /// Task of List<Test> - public async System.Threading.Tasks.Task> TestMethodAsync () + /// Task of List<string> + public async System.Threading.Tasks.Task> TestMethodAsync () { - ApiResponse> localVarResponse = await TestMethodAsyncWithHttpInfo(); + ApiResponse> localVarResponse = await TestMethodAsyncWithHttpInfo(); return localVarResponse.Data; } @@ -255,8 +254,8 @@ public async System.Threading.Tasks.Task> TestMethodAsync () /// /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<Test>) - public async System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo () + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo () { var localVarPath = "/test"; @@ -300,9 +299,9 @@ public async System.Threading.Tasks.Task>> TestMethodAsyn if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs index 9dccfea10ef..548d953cd2b 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/PetApi.cs @@ -32,7 +32,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - InlineResponse2001 AddParrot (Body2 body = null); + InlineResponse2001 AddParrot (ParrotBody1 body = null); /// /// Add a new parrow to the store @@ -43,7 +43,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - ApiResponse AddParrotWithHttpInfo (Body2 body = null); + ApiResponse AddParrotWithHttpInfo (ParrotBody1 body = null); /// /// Add a new pet to the store /// @@ -89,6 +89,27 @@ public interface IPetApi : IApiAccessor /// ApiResponse of Object(void) ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null); /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + ModelApiResponse DoCategoryStuff (SubCategory body = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + ApiResponse DoCategoryStuffWithHttpInfo (SubCategory body = null); + /// /// Find pet by ID /// /// @@ -166,8 +187,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<> - List<> GetParrots (); + /// List<Object> + List GetParrots (); /// /// get Parrots @@ -176,8 +197,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<> - ApiResponse> GetParrotsWithHttpInfo (); + /// ApiResponse of List<Object> + ApiResponse> GetParrotsWithHttpInfo (); /// /// Find pet by ID /// @@ -208,7 +229,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - InlineResponse200 UpdateParrots (Body1 body = null); + InlineResponse200 UpdateParrots (ParrotBody body = null); /// /// update parrots @@ -219,7 +240,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - ApiResponse UpdateParrotsWithHttpInfo (Body1 body = null); + ApiResponse UpdateParrotsWithHttpInfo (ParrotBody body = null); /// /// Update an existing pet /// @@ -275,8 +296,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - ApiResponse UploadFile (long? petId, Object body = null); + /// ModelApiResponse + ModelApiResponse UploadFile (long? petId, Object body = null); /// /// uploads an image @@ -287,8 +308,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); + /// ApiResponse of ModelApiResponse + ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -300,7 +321,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse2001 - System.Threading.Tasks.Task AddParrotAsync (Body2 body = null); + System.Threading.Tasks.Task AddParrotAsync (ParrotBody1 body = null); /// /// Add a new parrow to the store @@ -311,7 +332,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse2001) - System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (Body2 body = null); + System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (ParrotBody1 body = null); /// /// Add a new pet to the store /// @@ -357,6 +378,27 @@ public interface IPetApi : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null); /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ModelApiResponse + System.Threading.Tasks.Task DoCategoryStuffAsync (SubCategory body = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse (ModelApiResponse) + System.Threading.Tasks.Task> DoCategoryStuffAsyncWithHttpInfo (SubCategory body = null); + /// /// Find pet by ID /// /// @@ -434,8 +476,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of List<> - System.Threading.Tasks.Task> GetParrotsAsync (); + /// Task of List<Object> + System.Threading.Tasks.Task> GetParrotsAsync (); /// /// get Parrots @@ -444,8 +486,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<>) - System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo (); + /// Task of ApiResponse (List<Object>) + System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo (); /// /// Find pet by ID /// @@ -476,7 +518,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse200 - System.Threading.Tasks.Task UpdateParrotsAsync (Body1 body = null); + System.Threading.Tasks.Task UpdateParrotsAsync (ParrotBody body = null); /// /// update parrots @@ -487,7 +529,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse200) - System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (Body1 body = null); + System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (ParrotBody body = null); /// /// Update an existing pet /// @@ -543,8 +585,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null); + /// Task of ModelApiResponse + System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null); /// /// uploads an image @@ -555,8 +597,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null); + /// Task of ApiResponse (ModelApiResponse) + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null); #endregion Asynchronous Operations } @@ -674,7 +716,7 @@ public void AddDefaultHeader(string key, string value) /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - public InlineResponse2001 AddParrot (Body2 body = null) + public InlineResponse2001 AddParrot (ParrotBody1 body = null) { ApiResponse localVarResponse = AddParrotWithHttpInfo(body); return localVarResponse.Data; @@ -686,7 +728,7 @@ public InlineResponse2001 AddParrot (Body2 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (Body2 body = null) + public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (ParrotBody1 body = null) { var localVarPath = "/parrot"; @@ -744,7 +786,7 @@ public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (Body2 body = nul /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse2001 - public async System.Threading.Tasks.Task AddParrotAsync (Body2 body = null) + public async System.Threading.Tasks.Task AddParrotAsync (ParrotBody1 body = null) { ApiResponse localVarResponse = await AddParrotAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -757,7 +799,7 @@ public async System.Threading.Tasks.Task AddParrotAsync (Bod /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse2001) - public async System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (Body2 body = null) + public async System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (ParrotBody1 body = null) { var localVarPath = "/parrot"; @@ -1111,6 +1153,147 @@ public async System.Threading.Tasks.Task> DeletePetAsyncWith null); } + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + public ModelApiResponse DoCategoryStuff (SubCategory body = null) + { + ApiResponse localVarResponse = DoCategoryStuffWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > DoCategoryStuffWithHttpInfo (SubCategory body = null) + { + + var localVarPath = "/pet/category"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DoCategoryStuff", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ModelApiResponse + public async System.Threading.Tasks.Task DoCategoryStuffAsync (SubCategory body = null) + { + ApiResponse localVarResponse = await DoCategoryStuffAsyncWithHttpInfo(body); + return localVarResponse.Data; + + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse (ModelApiResponse) + public async System.Threading.Tasks.Task> DoCategoryStuffAsyncWithHttpInfo (SubCategory body = null) + { + + var localVarPath = "/pet/category"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DoCategoryStuff", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); + } + /// /// Find pet by ID schedule pet feeding /// @@ -1598,10 +1781,10 @@ public async System.Threading.Tasks.Task>> FindPetsByTagsA /// get Parrots /// /// Thrown when fails to make API call - /// List<> - public List<> GetParrots () + /// List<Object> + public List GetParrots () { - ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); + ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); return localVarResponse.Data; } @@ -1609,8 +1792,8 @@ public async System.Threading.Tasks.Task>> FindPetsByTagsA /// get Parrots /// /// Thrown when fails to make API call - /// ApiResponse of List<> - public ApiResponse< List<> > GetParrotsWithHttpInfo () + /// ApiResponse of List<Object> + public ApiResponse< List > GetParrotsWithHttpInfo () { var localVarPath = "/parrot"; @@ -1648,19 +1831,19 @@ public ApiResponse< List<> > GetParrotsWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List<>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<>))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// /// get Parrots /// /// Thrown when fails to make API call - /// Task of List<> - public async System.Threading.Tasks.Task> GetParrotsAsync () + /// Task of List<Object> + public async System.Threading.Tasks.Task> GetParrotsAsync () { - ApiResponse> localVarResponse = await GetParrotsAsyncWithHttpInfo(); + ApiResponse> localVarResponse = await GetParrotsAsyncWithHttpInfo(); return localVarResponse.Data; } @@ -1669,8 +1852,8 @@ public async System.Threading.Tasks.Task> GetParrotsAsync () /// get Parrots /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<>) - public async System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo () + /// Task of ApiResponse (List<Object>) + public async System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo () { var localVarPath = "/parrot"; @@ -1708,9 +1891,9 @@ public async System.Threading.Tasks.Task>> GetParrotsAsyncWit if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List<>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<>))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1862,7 +2045,7 @@ public async System.Threading.Tasks.Task> GetPetByIdAsyncWithHt /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - public InlineResponse200 UpdateParrots (Body1 body = null) + public InlineResponse200 UpdateParrots (ParrotBody body = null) { ApiResponse localVarResponse = UpdateParrotsWithHttpInfo(body); return localVarResponse.Data; @@ -1874,7 +2057,7 @@ public InlineResponse200 UpdateParrots (Body1 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (Body1 body = null) + public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (ParrotBody body = null) { var localVarPath = "/parrot"; @@ -1932,7 +2115,7 @@ public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (Body1 body = /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse200 - public async System.Threading.Tasks.Task UpdateParrotsAsync (Body1 body = null) + public async System.Threading.Tasks.Task UpdateParrotsAsync (ParrotBody body = null) { ApiResponse localVarResponse = await UpdateParrotsAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1945,7 +2128,7 @@ public async System.Threading.Tasks.Task UpdateParrotsAsync ( /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse200) - public async System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (Body1 body = null) + public async System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (ParrotBody body = null) { var localVarPath = "/parrot"; @@ -2313,10 +2496,10 @@ public async System.Threading.Tasks.Task> UpdatePetWithFormA /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - public ApiResponse UploadFile (long? petId, Object body = null) + /// ModelApiResponse + public ModelApiResponse UploadFile (long? petId, Object body = null) { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); + ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); return localVarResponse.Data; } @@ -2326,8 +2509,8 @@ public ApiResponse UploadFile (long? petId, Object body = null) /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -2384,9 +2567,9 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object bo if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); } /// @@ -2395,10 +2578,10 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object bo /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null) + /// Task of ModelApiResponse + public async System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null) { - ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, body); + ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, body); return localVarResponse.Data; } @@ -2409,8 +2592,8 @@ public async System.Threading.Tasks.Task UploadFileAsync (long? pet /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null) + /// Task of ApiResponse (ModelApiResponse) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -2467,9 +2650,9 @@ public async System.Threading.Tasks.Task> UploadFileAsy if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs index 1b488e52fd3..b73124c8f88 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { @@ -231,6 +231,11 @@ public FileParameter ParameterToFile(string name, Stream stream) return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); } + public FileParameter ParameterToFile(string name, byte[] stream) + { + return FileParameter.Create(name, stream, "no_file_name_provided"); + } + /// /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. /// If parameter is a list, join the list with ",". diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs index 8383aa21a28..1081c5edae3 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs index 10a8a3e25a4..fc72e347e1f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs index 761ac7a065d..8ce26cc5869 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/Configuration.cs @@ -20,7 +20,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants @@ -119,7 +119,6 @@ public Configuration() ApiKey = new ConcurrentDictionary(); ApiKeyPrefix = new ConcurrentDictionary(); - // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; } @@ -242,14 +241,32 @@ public virtual string BasePath { /// public virtual IDictionary DefaultHeader { get; set; } + private int _timeout = 100000; /// /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. /// public virtual int Timeout { - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } + get + { + if (_apiClient == null) + { + return _timeout; + } + else + { + return ApiClient.RestClient.Timeout; + } + } + set + { + _timeout = value; + if (_apiClient != null) + { + ApiClient.RestClient.Timeout = _timeout; + } + } } /// diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs index 386c148dfdf..8151e9194f2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs index 2596d55b928..9ea748b6d92 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs new file mode 100644 index 00000000000..2293396eecd --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs @@ -0,0 +1,171 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryCategory + /// + [DataContract] + public partial class AllOfSubCategoryCategory : Category, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// foo. + /// bar. + /// beer. + /// drunk. + public AllOfSubCategoryCategory(bool? foo = default(bool?), int? bar = default(int?), string beer = default(string), User drunk = default(User), long? id = default(long?), string name = default(string), List subcategories = default(List)) : base(id, name, subcategories) + { + this.Foo = foo; + this.Bar = bar; + this.Beer = beer; + this.Drunk = drunk; + } + + /// + /// Gets or Sets Foo + /// + [DataMember(Name="foo", EmitDefaultValue=false)] + public bool? Foo { get; set; } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name="bar", EmitDefaultValue=false)] + public int? Bar { get; set; } + + /// + /// Gets or Sets Beer + /// + [DataMember(Name="beer", EmitDefaultValue=false)] + public string Beer { get; set; } + + /// + /// Gets or Sets Drunk + /// + [DataMember(Name="drunk", EmitDefaultValue=false)] + public User Drunk { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryCategory {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Beer: ").Append(Beer).Append("\n"); + sb.Append(" Drunk: ").Append(Drunk).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryCategory); + } + + /// + /// Returns true if AllOfSubCategoryCategory instances are equal + /// + /// Instance of AllOfSubCategoryCategory to be compared + /// Boolean + public bool Equals(AllOfSubCategoryCategory input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Foo == input.Foo || + (this.Foo != null && + this.Foo.Equals(input.Foo)) + ) && base.Equals(input) && + ( + this.Bar == input.Bar || + (this.Bar != null && + this.Bar.Equals(input.Bar)) + ) && base.Equals(input) && + ( + this.Beer == input.Beer || + (this.Beer != null && + this.Beer.Equals(input.Beer)) + ) && base.Equals(input) && + ( + this.Drunk == input.Drunk || + (this.Drunk != null && + this.Drunk.Equals(input.Drunk)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Foo != null) + hashCode = hashCode * 59 + this.Foo.GetHashCode(); + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.Beer != null) + hashCode = hashCode * 59 + this.Beer.GetHashCode(); + if (this.Drunk != null) + hashCode = hashCode * 59 + this.Drunk.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs new file mode 100644 index 00000000000..78cdb6e7e5c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs @@ -0,0 +1,107 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryPetsItems + /// + [DataContract] + public partial class AllOfSubCategoryPetsItems : Pet, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public AllOfSubCategoryPetsItems(long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryPetsItems {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryPetsItems); + } + + /// + /// Returns true if AllOfSubCategoryPetsItems instances are equal + /// + /// Instance of AllOfSubCategoryPetsItems to be compared + /// Boolean + public bool Equals(AllOfSubCategoryPetsItems input) + { + if (input == null) + return false; + + return base.Equals(input); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs new file mode 100644 index 00000000000..c3828a4638b --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnyOfparrotBodyParrotsItems + /// + [DataContract] + public partial class AnyOfparrotBodyParrotsItems : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public AnyOfparrotBodyParrotsItems() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnyOfparrotBodyParrotsItems {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnyOfparrotBodyParrotsItems); + } + + /// + /// Returns true if AnyOfparrotBodyParrotsItems instances are equal + /// + /// Instance of AnyOfparrotBodyParrotsItems to be compared + /// Boolean + public bool Equals(AnyOfparrotBodyParrotsItems input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs index 1a3345ea1ce..c54530ce0e8 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Cat.cs @@ -34,7 +34,7 @@ public partial class Cat : Pet, IEquatable, IValidatableObject /// /// hunts. /// age. - public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Hunts = hunts; this.Age = age; @@ -133,7 +133,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - foreach(var x in BaseValidate(validationContext)) yield return x; yield break; } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs index 9656b784703..6fc57708871 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/Dog.cs @@ -65,7 +65,7 @@ public enum BreedEnum /// /// bark. /// breed. - public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Bark = bark; this.Breed = breed; @@ -159,7 +159,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - foreach(var x in BaseValidate(validationContext)) yield return x; yield break; } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelApiResponse.cs new file mode 100644 index 00000000000..07b7c061210 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ModelApiResponse.cs @@ -0,0 +1,154 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ModelApiResponse + /// + [DataContract] + public partial class ModelApiResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// type. + /// message. + public ModelApiResponse(int? code = default(int?), string type = default(string), string message = default(string)) + { + this.Code = code; + this.Type = type; + this.Message = message; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public int? Code { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ModelApiResponse {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ModelApiResponse); + } + + /// + /// Returns true if ModelApiResponse instances are equal + /// + /// Instance of ModelApiResponse to be compared + /// Boolean + public bool Equals(ModelApiResponse input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NullableEnumModel.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NullableEnumModel.cs new file mode 100644 index 00000000000..db0e0e97494 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/NullableEnumModel.cs @@ -0,0 +1,143 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// NullableEnumModel + /// + [DataContract] + public partial class NullableEnumModel : IEquatable, IValidatableObject + { + /// + /// Defines EnumProp + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumPropEnum + { + /// + /// Enum A for value: a + /// + [EnumMember(Value = "a")] + A = 1, + /// + /// Enum B for value: b + /// + [EnumMember(Value = "b")] + B = 2, + /// + /// Enum Null for value: null + /// + [EnumMember(Value = null)] + Null = 3 } + /// + /// Gets or Sets EnumProp + /// + [DataMember(Name="enumProp", EmitDefaultValue=false)] + public EnumPropEnum? EnumProp { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// enumProp. + public NullableEnumModel(EnumPropEnum? enumProp = default(EnumPropEnum?)) + { + this.EnumProp = enumProp; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NullableEnumModel {\n"); + sb.Append(" EnumProp: ").Append(EnumProp).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NullableEnumModel); + } + + /// + /// Returns true if NullableEnumModel instances are equal + /// + /// Instance of NullableEnumModel to be compared + /// Boolean + public bool Equals(NullableEnumModel input) + { + if (input == null) + return false; + + return + ( + this.EnumProp == input.EnumProp || + (this.EnumProp != null && + this.EnumProp.Equals(input.EnumProp)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumProp != null) + hashCode = hashCode * 59 + this.EnumProp.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ParrotBody.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ParrotBody.cs new file mode 100644 index 00000000000..1ba40dddb5f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ParrotBody.cs @@ -0,0 +1,123 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody + /// + [DataContract] + public partial class ParrotBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// parrots. + public ParrotBody(List parrots = default(List)) + { + this.Parrots = parrots; + } + + /// + /// Gets or Sets Parrots + /// + [DataMember(Name="parrots", EmitDefaultValue=false)] + public List Parrots { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody {\n"); + sb.Append(" Parrots: ").Append(Parrots).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody); + } + + /// + /// Returns true if ParrotBody instances are equal + /// + /// Instance of ParrotBody to be compared + /// Boolean + public bool Equals(ParrotBody input) + { + if (input == null) + return false; + + return + ( + this.Parrots == input.Parrots || + this.Parrots != null && + input.Parrots != null && + this.Parrots.SequenceEqual(input.Parrots) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Parrots != null) + hashCode = hashCode * 59 + this.Parrots.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ParrotBody1.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ParrotBody1.cs new file mode 100644 index 00000000000..28760731c14 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/ParrotBody1.cs @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody1 + /// + [DataContract] + public partial class ParrotBody1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public ParrotBody1() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody1 {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody1); + } + + /// + /// Returns true if ParrotBody1 instances are equal + /// + /// Instance of ParrotBody1 to be compared + /// Boolean + public bool Equals(ParrotBody1 input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..9b4213539da --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,140 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SubCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SubCategory.cs new file mode 100644 index 00000000000..bf8a7850711 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Model/SubCategory.cs @@ -0,0 +1,155 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// SubCategory + /// + [DataContract] + public partial class SubCategory : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// category. + /// category2. + /// pets. + public SubCategory(AllOfSubCategoryCategory category = default(AllOfSubCategoryCategory), Category category2 = default(Category), List pets = default(List)) + { + this.Category = category; + this.Category2 = category2; + this.Pets = pets; + } + + /// + /// Gets or Sets Category + /// + [DataMember(Name="category", EmitDefaultValue=false)] + public AllOfSubCategoryCategory Category { get; set; } + + /// + /// Gets or Sets Category2 + /// + [DataMember(Name="category2", EmitDefaultValue=false)] + public Category Category2 { get; set; } + + /// + /// Gets or Sets Pets + /// + [DataMember(Name="pets", EmitDefaultValue=false)] + public List Pets { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SubCategory {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Category2: ").Append(Category2).Append("\n"); + sb.Append(" Pets: ").Append(Pets).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SubCategory); + } + + /// + /// Returns true if SubCategory instances are equal + /// + /// Instance of SubCategory to be compared + /// Boolean + public bool Equals(SubCategory input) + { + if (input == null) + return false; + + return + ( + this.Category == input.Category || + (this.Category != null && + this.Category.Equals(input.Category)) + ) && + ( + this.Category2 == input.Category2 || + (this.Category2 != null && + this.Category2.Equals(input.Category2)) + ) && + ( + this.Pets == input.Pets || + this.Pets != null && + input.Pets != null && + this.Pets.SequenceEqual(input.Pets) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Category != null) + hashCode = hashCode * 59 + this.Category.GetHashCode(); + if (this.Category2 != null) + hashCode = hashCode * 59 + this.Category2.GetHashCode(); + if (this.Pets != null) + hashCode = hashCode * 59 + this.Pets.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION b/samples/composed/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION index 5d9eef07d78..86820ab0dd0 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.17-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/README.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/README.md index 3ebc4c5095a..70698e4c32d 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/README.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/README.md @@ -74,7 +74,7 @@ namespace Example try { - List result = apiInstance.TestMethod(); + List result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -97,6 +97,7 @@ Class | Method | HTTP request | Description *PetApi* | [**AddParrot**](docs/PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**DoCategoryStuff**](docs/PetApi.md#docategorystuff) | **POST** /pet/category | *PetApi* | [**FeedPet**](docs/PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -122,38 +123,39 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.AllOfSubCategoryCategory](docs/AllOfSubCategoryCategory.md) + - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - - [Model.AnyOfbody1ParrotsItems](docs/AnyOfbody1ParrotsItems.md) - - [Model.AnyOfbody2](docs/AnyOfbody2.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) + - [Model.AnyOfparrotBodyParrotsItems](docs/AnyOfparrotBodyParrotsItems.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.Dog](docs/Dog.md) - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.InlineResponse2001](docs/InlineResponse2001.md) - [Model.Macaw](docs/Macaw.md) + - [Model.ModelApiResponse](docs/ModelApiResponse.md) + - [Model.NullableEnumModel](docs/NullableEnumModel.md) - [Model.OneOfAllPetsResponseItems](docs/OneOfAllPetsResponseItems.md) - [Model.OneOfPartMasterDestination](docs/OneOfPartMasterDestination.md) - [Model.OneOfPartMasterOrigin](docs/OneOfPartMasterOrigin.md) - [Model.OneOfPetPartItems](docs/OneOfPetPartItems.md) - [Model.OneOfPup](docs/OneOfPup.md) - - [Model.OneOfinlineResponse2001](docs/OneOfinlineResponse2001.md) - [Model.OneOfinlineResponse200ParrotsItems](docs/OneOfinlineResponse200ParrotsItems.md) - [Model.OneOfvalMembersValMemberItems](docs/OneOfvalMembersValMemberItems.md) - [Model.Order](docs/Order.md) - [Model.Parakeet](docs/Parakeet.md) + - [Model.ParrotBody](docs/ParrotBody.md) + - [Model.ParrotBody1](docs/ParrotBody1.md) - [Model.PartFour](docs/PartFour.md) - [Model.PartMaster](docs/PartMaster.md) - [Model.PartOne](docs/PartOne.md) - [Model.PartThree](docs/PartThree.md) - [Model.PartTwo](docs/PartTwo.md) - [Model.Pet](docs/Pet.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.Pup](docs/Pup.md) + - [Model.SubCategory](docs/SubCategory.md) - [Model.Tag](docs/Tag.md) - - [Model.Test](docs/Test.md) - [Model.User](docs/User.md) - [Model.ValMemberChoice1](docs/ValMemberChoice1.md) - [Model.ValMemberChoice2](docs/ValMemberChoice2.md) @@ -180,5 +182,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AllOfSubCategoryCategory.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AllOfSubCategoryCategory.md new file mode 100644 index 00000000000..f58e49769ef --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AllOfSubCategoryCategory.md @@ -0,0 +1,15 @@ +# IO.Swagger.Model.AllOfSubCategoryCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | [optional] +**Subcategories** | [**List<Category>**](Category.md) | | [optional] +**Foo** | **bool?** | | [optional] +**Bar** | **int?** | | [optional] +**Beer** | **string** | | [optional] +**Drunk** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AllOfSubCategoryPetsItems.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AllOfSubCategoryPetsItems.md new file mode 100644 index 00000000000..f21b362dc89 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AllOfSubCategoryPetsItems.md @@ -0,0 +1,12 @@ +# IO.Swagger.Model.AllOfSubCategoryPetsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | +**Status** | **string** | pet status in the store | [optional] +**Part** | **List<Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AnyOfparrotBodyParrotsItems.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AnyOfparrotBodyParrotsItems.md new file mode 100644 index 00000000000..6a9e62ad98f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/AnyOfparrotBodyParrotsItems.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.AnyOfparrotBodyParrotsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Cat.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Cat.md index a78e291b071..508f2203c66 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Cat.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Cat.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Hunts** | **bool?** | | [optional] **Age** | **int?** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/DefaultApi.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/DefaultApi.md index 7673e4e33ce..d1c5a072abb 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/DefaultApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/DefaultApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **TestMethod** -> List TestMethod () +> List TestMethod () @@ -31,7 +31,7 @@ namespace Example try { - List<Test> result = apiInstance.TestMethod(); + List<string> result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -[**List**](Test.md) +**List** ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Dog.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Dog.md index b6f7d9bce79..d2b4d917f58 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Dog.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Dog.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Bark** | **bool?** | | [optional] **Breed** | **string** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/InlineResponse200.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/InlineResponse200.md index d333d594be6..567456756cf 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/InlineResponse200.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/InlineResponse200.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Parrots** | [**List<OneOfinlineResponse200ParrotsItems>**](.md) | | [optional] +**Parrots** | **List<OneOfinlineResponse200ParrotsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ModelApiResponse.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ModelApiResponse.md new file mode 100644 index 00000000000..a9e743b78ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ModelApiResponse.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.ModelApiResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **int?** | | [optional] +**Type** | **string** | | [optional] +**Message** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/NullableEnumModel.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/NullableEnumModel.md new file mode 100644 index 00000000000..56e19f258f7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/NullableEnumModel.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.NullableEnumModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumProp** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ParrotBody.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ParrotBody.md new file mode 100644 index 00000000000..c8079e929ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ParrotBody.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.ParrotBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Parrots** | **List<AnyOfparrotBodyParrotsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ParrotBody1.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ParrotBody1.md new file mode 100644 index 00000000000..97e4c785e6a --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ParrotBody1.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.ParrotBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PartMaster.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PartMaster.md index af910ffa960..5129b771794 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PartMaster.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PartMaster.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Destination** | [**OneOfPartMasterDestination**](OneOfPartMasterDestination.md) | | [optional] -**Origin** | [**OneOfPartMasterOrigin**](OneOfPartMasterOrigin.md) | | [optional] +**Destination** | **OneOfPartMasterDestination** | | [optional] +**Origin** | **OneOfPartMasterOrigin** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Pet.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Pet.md index 6f41e38bf68..190033af45f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Pet.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/Pet.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<OneOfPetPartItems>**](.md) | | [optional] +**Part** | **List<OneOfPetPartItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetApi.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetApi.md index e2de3a2e37c..a6bfc42370c 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**AddParrot**](PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**DoCategoryStuff**](PetApi.md#docategorystuff) | **POST** /pet/category | [**FeedPet**](PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -19,7 +20,7 @@ Method | HTTP request | Description # **AddParrot** -> InlineResponse2001 AddParrot (Body2 body = null) +> InlineResponse2001 AddParrot (ParrotBody1 body = null) Add a new parrow to the store @@ -38,7 +39,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body2(); // Body2 | (optional) + var body = new ParrotBody1(); // ParrotBody1 | (optional) try { @@ -59,7 +60,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | [optional] + **body** | [**ParrotBody1**](ParrotBody1.md)| | [optional] ### Return type @@ -196,6 +197,63 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DoCategoryStuff** +> ModelApiResponse DoCategoryStuff (SubCategory body = null) + + + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class DoCategoryStuffExample + { + public void main() + { + var apiInstance = new PetApi(); + var body = new SubCategory(); // SubCategory | (optional) + + try + { + ModelApiResponse result = apiInstance.DoCategoryStuff(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.DoCategoryStuff: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SubCategory**](SubCategory.md)| | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FeedPet** @@ -392,7 +450,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetParrots** -> List<> GetParrots () +> List GetParrots () get Parrots @@ -415,7 +473,7 @@ namespace Example try { // get Parrots - List<> result = apiInstance.GetParrots(); + List<Object> result = apiInstance.GetParrots(); Debug.WriteLine(result); } catch (Exception e) @@ -432,7 +490,7 @@ This endpoint does not need any parameter. ### Return type -[**List<>**](.md) +**List** ### Authorization @@ -511,7 +569,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateParrots** -> InlineResponse200 UpdateParrots (Body1 body = null) +> InlineResponse200 UpdateParrots (ParrotBody body = null) update parrots @@ -530,7 +588,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body1(); // Body1 | (optional) + var body = new ParrotBody(); // ParrotBody | (optional) try { @@ -551,7 +609,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body1**](Body1.md)| | [optional] + **body** | [**ParrotBody**](ParrotBody.md)| | [optional] ### Return type @@ -693,7 +751,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UploadFile** -> ApiResponse UploadFile (long? petId, Object body = null) +> ModelApiResponse UploadFile (long? petId, Object body = null) uploads an image @@ -721,7 +779,7 @@ namespace Example try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, body); + ModelApiResponse result = apiInstance.UploadFile(petId, body); Debug.WriteLine(result); } catch (Exception e) @@ -742,7 +800,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**ModelApiResponse**](ModelApiResponse.md) ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetPetIdBody.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md new file mode 100644 index 00000000000..0353116e609 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/SubCategory.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.SubCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | **AllOfSubCategoryCategory** | | [optional] +**Category2** | [**Category**](Category.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ValMembers.md b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ValMembers.md index 2a71e4666c4..bcf897a1f7f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ValMembers.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/docs/ValMembers.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ValMember** | [**List<OneOfvalMembersValMemberItems>**](.md) | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | +**ValMember** | **List<OneOfvalMembersValMemberItems>** | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs new file mode 100644 index 00000000000..e59e87eedda --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs @@ -0,0 +1,103 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryCategoryTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryCategory + //private AllOfSubCategoryCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryCategory + //instance = new AllOfSubCategoryCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryCategory + /// + [Test] + public void AllOfSubCategoryCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryCategory"); + } + + + /// + /// Test the property 'Foo' + /// + [Test] + public void FooTest() + { + // TODO unit test for the property 'Foo' + } + /// + /// Test the property 'Bar' + /// + [Test] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + /// + /// Test the property 'Beer' + /// + [Test] + public void BeerTest() + { + // TODO unit test for the property 'Beer' + } + /// + /// Test the property 'Drunk' + /// + [Test] + public void DrunkTest() + { + // TODO unit test for the property 'Drunk' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs new file mode 100644 index 00000000000..04abff11413 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryPetsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryPetsItemsTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryPetsItems + //private AllOfSubCategoryPetsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryPetsItems + //instance = new AllOfSubCategoryPetsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryPetsItems + /// + [Test] + public void AllOfSubCategoryPetsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryPetsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryPetsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs new file mode 100644 index 00000000000..0f4ed0178e7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnyOfparrotBodyParrotsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnyOfparrotBodyParrotsItemsTests + { + // TODO uncomment below to declare an instance variable for AnyOfparrotBodyParrotsItems + //private AnyOfparrotBodyParrotsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnyOfparrotBodyParrotsItems + //instance = new AnyOfparrotBodyParrotsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnyOfparrotBodyParrotsItems + /// + [Test] + public void AnyOfparrotBodyParrotsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnyOfparrotBodyParrotsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnyOfparrotBodyParrotsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs new file mode 100644 index 00000000000..798a3bcda23 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ModelApiResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ModelApiResponseTests + { + // TODO uncomment below to declare an instance variable for ModelApiResponse + //private ModelApiResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ModelApiResponse + //instance = new ModelApiResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ModelApiResponse + /// + [Test] + public void ModelApiResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ModelApiResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ModelApiResponse"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs new file mode 100644 index 00000000000..e2035b16000 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing NullableEnumModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class NullableEnumModelTests + { + // TODO uncomment below to declare an instance variable for NullableEnumModel + //private NullableEnumModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of NullableEnumModel + //instance = new NullableEnumModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of NullableEnumModel + /// + [Test] + public void NullableEnumModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" NullableEnumModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a NullableEnumModel"); + } + + + /// + /// Test the property 'EnumProp' + /// + [Test] + public void EnumPropTest() + { + // TODO unit test for the property 'EnumProp' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs new file mode 100644 index 00000000000..720c49b6871 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBody1Tests + { + // TODO uncomment below to declare an instance variable for ParrotBody1 + //private ParrotBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody1 + //instance = new ParrotBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody1 + /// + [Test] + public void ParrotBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody1"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ParrotBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ParrotBodyTests.cs new file mode 100644 index 00000000000..e4e29538d4c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/ParrotBodyTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBodyTests + { + // TODO uncomment below to declare an instance variable for ParrotBody + //private ParrotBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody + //instance = new ParrotBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody + /// + [Test] + public void ParrotBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody"); + } + + + /// + /// Test the property 'Parrots' + /// + [Test] + public void ParrotsTest() + { + // TODO unit test for the property 'Parrots' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..548d15aaa0c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/SubCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/SubCategoryTests.cs new file mode 100644 index 00000000000..844d772cf1f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger.Test/Model/SubCategoryTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing SubCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SubCategoryTests + { + // TODO uncomment below to declare an instance variable for SubCategory + //private SubCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SubCategory + //instance = new SubCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SubCategory + /// + [Test] + public void SubCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SubCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SubCategory"); + } + + + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Category2' + /// + [Test] + public void Category2Test() + { + // TODO unit test for the property 'Category2' + } + /// + /// Test the property 'Pets' + /// + [Test] + public void PetsTest() + { + // TODO unit test for the property 'Pets' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/DefaultApi.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/DefaultApi.cs index 8236f4393a4..b52ef372266 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/DefaultApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/DefaultApi.cs @@ -13,7 +13,6 @@ using System.Linq; using RestSharp; using IO.Swagger.Client; -using IO.Swagger.Model; namespace IO.Swagger.Api { @@ -30,8 +29,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<Test> - List TestMethod (); + /// List<string> + List TestMethod (); /// /// @@ -40,8 +39,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - ApiResponse> TestMethodWithHttpInfo (); + /// ApiResponse of List<string> + ApiResponse> TestMethodWithHttpInfo (); #endregion Synchronous Operations } @@ -157,10 +156,10 @@ public void AddDefaultHeader(string key, string value) /// /// /// Thrown when fails to make API call - /// List<Test> - public List TestMethod () + /// List<string> + public List TestMethod () { - ApiResponse> localVarResponse = TestMethodWithHttpInfo(); + ApiResponse> localVarResponse = TestMethodWithHttpInfo(); return localVarResponse.Data; } @@ -168,8 +167,8 @@ public List TestMethod () /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - public ApiResponse< List > TestMethodWithHttpInfo () + /// ApiResponse of List<string> + public ApiResponse< List > TestMethodWithHttpInfo () { var localVarPath = "/test"; @@ -213,9 +212,9 @@ public ApiResponse< List > TestMethodWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/PetApi.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/PetApi.cs index d4c9f9d8004..e680367288e 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/PetApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/PetApi.cs @@ -32,7 +32,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - InlineResponse2001 AddParrot (Body2 body = null); + InlineResponse2001 AddParrot (ParrotBody1 body = null); /// /// Add a new parrow to the store @@ -43,7 +43,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - ApiResponse AddParrotWithHttpInfo (Body2 body = null); + ApiResponse AddParrotWithHttpInfo (ParrotBody1 body = null); /// /// Add a new pet to the store /// @@ -89,6 +89,27 @@ public interface IPetApi : IApiAccessor /// ApiResponse of Object(void) ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null); /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + ModelApiResponse DoCategoryStuff (SubCategory body = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + ApiResponse DoCategoryStuffWithHttpInfo (SubCategory body = null); + /// /// Find pet by ID /// /// @@ -166,8 +187,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<> - List<> GetParrots (); + /// List<Object> + List GetParrots (); /// /// get Parrots @@ -176,8 +197,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<> - ApiResponse> GetParrotsWithHttpInfo (); + /// ApiResponse of List<Object> + ApiResponse> GetParrotsWithHttpInfo (); /// /// Find pet by ID /// @@ -208,7 +229,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - InlineResponse200 UpdateParrots (Body1 body = null); + InlineResponse200 UpdateParrots (ParrotBody body = null); /// /// update parrots @@ -219,7 +240,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - ApiResponse UpdateParrotsWithHttpInfo (Body1 body = null); + ApiResponse UpdateParrotsWithHttpInfo (ParrotBody body = null); /// /// Update an existing pet /// @@ -275,8 +296,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - ApiResponse UploadFile (long? petId, Object body = null); + /// ModelApiResponse + ModelApiResponse UploadFile (long? petId, Object body = null); /// /// uploads an image @@ -287,8 +308,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); + /// ApiResponse of ModelApiResponse + ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); #endregion Synchronous Operations } @@ -406,7 +427,7 @@ public void AddDefaultHeader(string key, string value) /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - public InlineResponse2001 AddParrot (Body2 body = null) + public InlineResponse2001 AddParrot (ParrotBody1 body = null) { ApiResponse localVarResponse = AddParrotWithHttpInfo(body); return localVarResponse.Data; @@ -418,7 +439,7 @@ public InlineResponse2001 AddParrot (Body2 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (Body2 body = null) + public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (ParrotBody1 body = null) { var localVarPath = "/parrot"; @@ -620,6 +641,76 @@ public ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = n null); } + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + public ModelApiResponse DoCategoryStuff (SubCategory body = null) + { + ApiResponse localVarResponse = DoCategoryStuffWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > DoCategoryStuffWithHttpInfo (SubCategory body = null) + { + + var localVarPath = "/pet/category"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DoCategoryStuff", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); + } + /// /// Find pet by ID schedule pet feeding /// @@ -864,10 +955,10 @@ public ApiResponse< List > FindPetsByTagsWithHttpInfo (List tags) /// get Parrots /// /// Thrown when fails to make API call - /// List<> - public List<> GetParrots () + /// List<Object> + public List GetParrots () { - ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); + ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); return localVarResponse.Data; } @@ -875,8 +966,8 @@ public ApiResponse< List > FindPetsByTagsWithHttpInfo (List tags) /// get Parrots /// /// Thrown when fails to make API call - /// ApiResponse of List<> - public ApiResponse< List<> > GetParrotsWithHttpInfo () + /// ApiResponse of List<Object> + public ApiResponse< List > GetParrotsWithHttpInfo () { var localVarPath = "/parrot"; @@ -914,9 +1005,9 @@ public ApiResponse< List<> > GetParrotsWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List<>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<>))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -996,7 +1087,7 @@ public ApiResponse< Pet > GetPetByIdWithHttpInfo (long? petId) /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - public InlineResponse200 UpdateParrots (Body1 body = null) + public InlineResponse200 UpdateParrots (ParrotBody body = null) { ApiResponse localVarResponse = UpdateParrotsWithHttpInfo(body); return localVarResponse.Data; @@ -1008,7 +1099,7 @@ public InlineResponse200 UpdateParrots (Body1 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (Body1 body = null) + public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (ParrotBody body = null) { var localVarPath = "/parrot"; @@ -1220,10 +1311,10 @@ public ApiResponse UpdatePetWithFormWithHttpInfo (long? petId, string na /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - public ApiResponse UploadFile (long? petId, Object body = null) + /// ModelApiResponse + public ModelApiResponse UploadFile (long? petId, Object body = null) { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); + ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); return localVarResponse.Data; } @@ -1233,8 +1324,8 @@ public ApiResponse UploadFile (long? petId, Object body = null) /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -1291,9 +1382,9 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object bo if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs index 545ad1c3ee8..4ad4d8012be 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { @@ -205,6 +205,11 @@ public FileParameter ParameterToFile(string name, Stream stream) return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); } + public FileParameter ParameterToFile(string name, byte[] stream) + { + return FileParameter.Create(name, stream, "no_file_name_provided"); + } + /// /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. /// If parameter is a list, join the list with ",". diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs index 0ee7b296a50..1d26667dfe8 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs index 10a8a3e25a4..fc72e347e1f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs index 4ad43697275..76449aca35b 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/Configuration.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants @@ -118,7 +118,6 @@ public Configuration() ApiKey = new Dictionary(); ApiKeyPrefix = new Dictionary(); - // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; } @@ -241,14 +240,32 @@ public virtual string BasePath { /// public virtual IDictionary DefaultHeader { get; set; } + private int _timeout = 100000; /// /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. /// public virtual int Timeout { - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } + get + { + if (_apiClient == null) + { + return _timeout; + } + else + { + return ApiClient.RestClient.Timeout; + } + } + set + { + _timeout = value; + if (_apiClient != null) + { + ApiClient.RestClient.Timeout = _timeout; + } + } } /// diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs index 386c148dfdf..8151e9194f2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs index 2596d55b928..9ea748b6d92 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs new file mode 100644 index 00000000000..882d2e62cc0 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs @@ -0,0 +1,162 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryCategory + /// + [DataContract] + public partial class AllOfSubCategoryCategory : Category, IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// foo. + /// bar. + /// beer. + /// drunk. + public AllOfSubCategoryCategory(bool? foo = default(bool?), int? bar = default(int?), string beer = default(string), User drunk = default(User), long? id = default(long?), string name = default(string), List subcategories = default(List)) : base(id, name, subcategories) + { + this.Foo = foo; + this.Bar = bar; + this.Beer = beer; + this.Drunk = drunk; + } + + /// + /// Gets or Sets Foo + /// + [DataMember(Name="foo", EmitDefaultValue=false)] + public bool? Foo { get; set; } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name="bar", EmitDefaultValue=false)] + public int? Bar { get; set; } + + /// + /// Gets or Sets Beer + /// + [DataMember(Name="beer", EmitDefaultValue=false)] + public string Beer { get; set; } + + /// + /// Gets or Sets Drunk + /// + [DataMember(Name="drunk", EmitDefaultValue=false)] + public User Drunk { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryCategory {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Beer: ").Append(Beer).Append("\n"); + sb.Append(" Drunk: ").Append(Drunk).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryCategory); + } + + /// + /// Returns true if AllOfSubCategoryCategory instances are equal + /// + /// Instance of AllOfSubCategoryCategory to be compared + /// Boolean + public bool Equals(AllOfSubCategoryCategory input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Foo == input.Foo || + (this.Foo != null && + this.Foo.Equals(input.Foo)) + ) && base.Equals(input) && + ( + this.Bar == input.Bar || + (this.Bar != null && + this.Bar.Equals(input.Bar)) + ) && base.Equals(input) && + ( + this.Beer == input.Beer || + (this.Beer != null && + this.Beer.Equals(input.Beer)) + ) && base.Equals(input) && + ( + this.Drunk == input.Drunk || + (this.Drunk != null && + this.Drunk.Equals(input.Drunk)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Foo != null) + hashCode = hashCode * 59 + this.Foo.GetHashCode(); + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.Beer != null) + hashCode = hashCode * 59 + this.Beer.GetHashCode(); + if (this.Drunk != null) + hashCode = hashCode * 59 + this.Drunk.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs new file mode 100644 index 00000000000..2478bb68d0b --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs @@ -0,0 +1,98 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryPetsItems + /// + [DataContract] + public partial class AllOfSubCategoryPetsItems : Pet, IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public AllOfSubCategoryPetsItems(long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryPetsItems {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryPetsItems); + } + + /// + /// Returns true if AllOfSubCategoryPetsItems instances are equal + /// + /// Instance of AllOfSubCategoryPetsItems to be compared + /// Boolean + public bool Equals(AllOfSubCategoryPetsItems input) + { + if (input == null) + return false; + + return base.Equals(input); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs new file mode 100644 index 00000000000..55bc5ddb2fc --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs @@ -0,0 +1,97 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnyOfparrotBodyParrotsItems + /// + [DataContract] + public partial class AnyOfparrotBodyParrotsItems : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public AnyOfparrotBodyParrotsItems() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnyOfparrotBodyParrotsItems {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnyOfparrotBodyParrotsItems); + } + + /// + /// Returns true if AnyOfparrotBodyParrotsItems instances are equal + /// + /// Instance of AnyOfparrotBodyParrotsItems to be compared + /// Boolean + public bool Equals(AnyOfparrotBodyParrotsItems input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Cat.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Cat.cs index 0cd899fff4a..17a73ce2f2a 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Cat.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Cat.cs @@ -34,7 +34,7 @@ public partial class Cat : Pet, IEquatable /// /// hunts. /// age. - public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Hunts = hunts; this.Age = age; diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Dog.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Dog.cs index 09ebfb2c9f0..3d083ebef4a 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Dog.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/Dog.cs @@ -65,7 +65,7 @@ public enum BreedEnum /// /// bark. /// breed. - public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Bark = bark; this.Breed = breed; diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ModelApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ModelApiResponse.cs new file mode 100644 index 00000000000..bf6a21df564 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ModelApiResponse.cs @@ -0,0 +1,145 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ModelApiResponse + /// + [DataContract] + public partial class ModelApiResponse : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// type. + /// message. + public ModelApiResponse(int? code = default(int?), string type = default(string), string message = default(string)) + { + this.Code = code; + this.Type = type; + this.Message = message; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public int? Code { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ModelApiResponse {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ModelApiResponse); + } + + /// + /// Returns true if ModelApiResponse instances are equal + /// + /// Instance of ModelApiResponse to be compared + /// Boolean + public bool Equals(ModelApiResponse input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/NullableEnumModel.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/NullableEnumModel.cs new file mode 100644 index 00000000000..060a98d79de --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/NullableEnumModel.cs @@ -0,0 +1,134 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// NullableEnumModel + /// + [DataContract] + public partial class NullableEnumModel : IEquatable + { + /// + /// Defines EnumProp + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumPropEnum + { + /// + /// Enum A for value: a + /// + [EnumMember(Value = "a")] + A = 1, + /// + /// Enum B for value: b + /// + [EnumMember(Value = "b")] + B = 2, + /// + /// Enum Null for value: null + /// + [EnumMember(Value = null)] + Null = 3 } + /// + /// Gets or Sets EnumProp + /// + [DataMember(Name="enumProp", EmitDefaultValue=false)] + public EnumPropEnum? EnumProp { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// enumProp. + public NullableEnumModel(EnumPropEnum? enumProp = default(EnumPropEnum?)) + { + this.EnumProp = enumProp; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NullableEnumModel {\n"); + sb.Append(" EnumProp: ").Append(EnumProp).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NullableEnumModel); + } + + /// + /// Returns true if NullableEnumModel instances are equal + /// + /// Instance of NullableEnumModel to be compared + /// Boolean + public bool Equals(NullableEnumModel input) + { + if (input == null) + return false; + + return + ( + this.EnumProp == input.EnumProp || + (this.EnumProp != null && + this.EnumProp.Equals(input.EnumProp)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumProp != null) + hashCode = hashCode * 59 + this.EnumProp.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ParrotBody.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ParrotBody.cs new file mode 100644 index 00000000000..385949d2abc --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ParrotBody.cs @@ -0,0 +1,114 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody + /// + [DataContract] + public partial class ParrotBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// parrots. + public ParrotBody(List parrots = default(List)) + { + this.Parrots = parrots; + } + + /// + /// Gets or Sets Parrots + /// + [DataMember(Name="parrots", EmitDefaultValue=false)] + public List Parrots { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody {\n"); + sb.Append(" Parrots: ").Append(Parrots).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody); + } + + /// + /// Returns true if ParrotBody instances are equal + /// + /// Instance of ParrotBody to be compared + /// Boolean + public bool Equals(ParrotBody input) + { + if (input == null) + return false; + + return + ( + this.Parrots == input.Parrots || + this.Parrots != null && + input.Parrots != null && + this.Parrots.SequenceEqual(input.Parrots) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Parrots != null) + hashCode = hashCode * 59 + this.Parrots.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ParrotBody1.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ParrotBody1.cs new file mode 100644 index 00000000000..39fb1c3037b --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/ParrotBody1.cs @@ -0,0 +1,97 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody1 + /// + [DataContract] + public partial class ParrotBody1 : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public ParrotBody1() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody1 {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody1); + } + + /// + /// Returns true if ParrotBody1 instances are equal + /// + /// Instance of ParrotBody1 to be compared + /// Boolean + public bool Equals(ParrotBody1 input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..cd147ee7eb6 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,131 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/SubCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/SubCategory.cs new file mode 100644 index 00000000000..bacad26a94f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Model/SubCategory.cs @@ -0,0 +1,146 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// SubCategory + /// + [DataContract] + public partial class SubCategory : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// category. + /// category2. + /// pets. + public SubCategory(AllOfSubCategoryCategory category = default(AllOfSubCategoryCategory), Category category2 = default(Category), List pets = default(List)) + { + this.Category = category; + this.Category2 = category2; + this.Pets = pets; + } + + /// + /// Gets or Sets Category + /// + [DataMember(Name="category", EmitDefaultValue=false)] + public AllOfSubCategoryCategory Category { get; set; } + + /// + /// Gets or Sets Category2 + /// + [DataMember(Name="category2", EmitDefaultValue=false)] + public Category Category2 { get; set; } + + /// + /// Gets or Sets Pets + /// + [DataMember(Name="pets", EmitDefaultValue=false)] + public List Pets { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SubCategory {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Category2: ").Append(Category2).Append("\n"); + sb.Append(" Pets: ").Append(Pets).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SubCategory); + } + + /// + /// Returns true if SubCategory instances are equal + /// + /// Instance of SubCategory to be compared + /// Boolean + public bool Equals(SubCategory input) + { + if (input == null) + return false; + + return + ( + this.Category == input.Category || + (this.Category != null && + this.Category.Equals(input.Category)) + ) && + ( + this.Category2 == input.Category2 || + (this.Category2 != null && + this.Category2.Equals(input.Category2)) + ) && + ( + this.Pets == input.Pets || + this.Pets != null && + input.Pets != null && + this.Pets.SequenceEqual(input.Pets) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Category != null) + hashCode = hashCode * 59 + this.Category.GetHashCode(); + if (this.Category2 != null) + hashCode = hashCode * 59 + this.Category2.GetHashCode(); + if (this.Pets != null) + hashCode = hashCode * 59 + this.Pets.GetHashCode(); + return hashCode; + } + } + + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION b/samples/composed/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION index 5d9eef07d78..86820ab0dd0 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.17-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/README.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/README.md index 3ebc4c5095a..70698e4c32d 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/README.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/README.md @@ -74,7 +74,7 @@ namespace Example try { - List result = apiInstance.TestMethod(); + List result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -97,6 +97,7 @@ Class | Method | HTTP request | Description *PetApi* | [**AddParrot**](docs/PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**DoCategoryStuff**](docs/PetApi.md#docategorystuff) | **POST** /pet/category | *PetApi* | [**FeedPet**](docs/PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -122,38 +123,39 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.AllOfSubCategoryCategory](docs/AllOfSubCategoryCategory.md) + - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - - [Model.AnyOfbody1ParrotsItems](docs/AnyOfbody1ParrotsItems.md) - - [Model.AnyOfbody2](docs/AnyOfbody2.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) + - [Model.AnyOfparrotBodyParrotsItems](docs/AnyOfparrotBodyParrotsItems.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.Dog](docs/Dog.md) - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.InlineResponse2001](docs/InlineResponse2001.md) - [Model.Macaw](docs/Macaw.md) + - [Model.ModelApiResponse](docs/ModelApiResponse.md) + - [Model.NullableEnumModel](docs/NullableEnumModel.md) - [Model.OneOfAllPetsResponseItems](docs/OneOfAllPetsResponseItems.md) - [Model.OneOfPartMasterDestination](docs/OneOfPartMasterDestination.md) - [Model.OneOfPartMasterOrigin](docs/OneOfPartMasterOrigin.md) - [Model.OneOfPetPartItems](docs/OneOfPetPartItems.md) - [Model.OneOfPup](docs/OneOfPup.md) - - [Model.OneOfinlineResponse2001](docs/OneOfinlineResponse2001.md) - [Model.OneOfinlineResponse200ParrotsItems](docs/OneOfinlineResponse200ParrotsItems.md) - [Model.OneOfvalMembersValMemberItems](docs/OneOfvalMembersValMemberItems.md) - [Model.Order](docs/Order.md) - [Model.Parakeet](docs/Parakeet.md) + - [Model.ParrotBody](docs/ParrotBody.md) + - [Model.ParrotBody1](docs/ParrotBody1.md) - [Model.PartFour](docs/PartFour.md) - [Model.PartMaster](docs/PartMaster.md) - [Model.PartOne](docs/PartOne.md) - [Model.PartThree](docs/PartThree.md) - [Model.PartTwo](docs/PartTwo.md) - [Model.Pet](docs/Pet.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.Pup](docs/Pup.md) + - [Model.SubCategory](docs/SubCategory.md) - [Model.Tag](docs/Tag.md) - - [Model.Test](docs/Test.md) - [Model.User](docs/User.md) - [Model.ValMemberChoice1](docs/ValMemberChoice1.md) - [Model.ValMemberChoice2](docs/ValMemberChoice2.md) @@ -180,5 +182,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AllOfSubCategoryCategory.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AllOfSubCategoryCategory.md new file mode 100644 index 00000000000..f58e49769ef --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AllOfSubCategoryCategory.md @@ -0,0 +1,15 @@ +# IO.Swagger.Model.AllOfSubCategoryCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | [optional] +**Subcategories** | [**List<Category>**](Category.md) | | [optional] +**Foo** | **bool?** | | [optional] +**Bar** | **int?** | | [optional] +**Beer** | **string** | | [optional] +**Drunk** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AllOfSubCategoryPetsItems.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AllOfSubCategoryPetsItems.md new file mode 100644 index 00000000000..f21b362dc89 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AllOfSubCategoryPetsItems.md @@ -0,0 +1,12 @@ +# IO.Swagger.Model.AllOfSubCategoryPetsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | +**Status** | **string** | pet status in the store | [optional] +**Part** | **List<Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AnyOfparrotBodyParrotsItems.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AnyOfparrotBodyParrotsItems.md new file mode 100644 index 00000000000..6a9e62ad98f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/AnyOfparrotBodyParrotsItems.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.AnyOfparrotBodyParrotsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Cat.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Cat.md index a78e291b071..508f2203c66 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Cat.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Cat.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Hunts** | **bool?** | | [optional] **Age** | **int?** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/DefaultApi.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/DefaultApi.md index 7673e4e33ce..d1c5a072abb 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/DefaultApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/DefaultApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **TestMethod** -> List TestMethod () +> List TestMethod () @@ -31,7 +31,7 @@ namespace Example try { - List<Test> result = apiInstance.TestMethod(); + List<string> result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -[**List**](Test.md) +**List** ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Dog.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Dog.md index b6f7d9bce79..d2b4d917f58 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Dog.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Dog.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Bark** | **bool?** | | [optional] **Breed** | **string** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/InlineResponse200.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/InlineResponse200.md index d333d594be6..567456756cf 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/InlineResponse200.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/InlineResponse200.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Parrots** | [**List<OneOfinlineResponse200ParrotsItems>**](.md) | | [optional] +**Parrots** | **List<OneOfinlineResponse200ParrotsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ModelApiResponse.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ModelApiResponse.md new file mode 100644 index 00000000000..a9e743b78ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ModelApiResponse.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.ModelApiResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **int?** | | [optional] +**Type** | **string** | | [optional] +**Message** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/NullableEnumModel.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/NullableEnumModel.md new file mode 100644 index 00000000000..56e19f258f7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/NullableEnumModel.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.NullableEnumModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumProp** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ParrotBody.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ParrotBody.md new file mode 100644 index 00000000000..c8079e929ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ParrotBody.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.ParrotBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Parrots** | **List<AnyOfparrotBodyParrotsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ParrotBody1.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ParrotBody1.md new file mode 100644 index 00000000000..97e4c785e6a --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ParrotBody1.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.ParrotBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PartMaster.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PartMaster.md index af910ffa960..5129b771794 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PartMaster.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PartMaster.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Destination** | [**OneOfPartMasterDestination**](OneOfPartMasterDestination.md) | | [optional] -**Origin** | [**OneOfPartMasterOrigin**](OneOfPartMasterOrigin.md) | | [optional] +**Destination** | **OneOfPartMasterDestination** | | [optional] +**Origin** | **OneOfPartMasterOrigin** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Pet.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Pet.md index 6f41e38bf68..190033af45f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Pet.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/Pet.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<OneOfPetPartItems>**](.md) | | [optional] +**Part** | **List<OneOfPetPartItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetApi.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetApi.md index e2de3a2e37c..a6bfc42370c 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**AddParrot**](PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**DoCategoryStuff**](PetApi.md#docategorystuff) | **POST** /pet/category | [**FeedPet**](PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -19,7 +20,7 @@ Method | HTTP request | Description # **AddParrot** -> InlineResponse2001 AddParrot (Body2 body = null) +> InlineResponse2001 AddParrot (ParrotBody1 body = null) Add a new parrow to the store @@ -38,7 +39,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body2(); // Body2 | (optional) + var body = new ParrotBody1(); // ParrotBody1 | (optional) try { @@ -59,7 +60,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | [optional] + **body** | [**ParrotBody1**](ParrotBody1.md)| | [optional] ### Return type @@ -196,6 +197,63 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DoCategoryStuff** +> ModelApiResponse DoCategoryStuff (SubCategory body = null) + + + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class DoCategoryStuffExample + { + public void main() + { + var apiInstance = new PetApi(); + var body = new SubCategory(); // SubCategory | (optional) + + try + { + ModelApiResponse result = apiInstance.DoCategoryStuff(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.DoCategoryStuff: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SubCategory**](SubCategory.md)| | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FeedPet** @@ -392,7 +450,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetParrots** -> List<> GetParrots () +> List GetParrots () get Parrots @@ -415,7 +473,7 @@ namespace Example try { // get Parrots - List<> result = apiInstance.GetParrots(); + List<Object> result = apiInstance.GetParrots(); Debug.WriteLine(result); } catch (Exception e) @@ -432,7 +490,7 @@ This endpoint does not need any parameter. ### Return type -[**List<>**](.md) +**List** ### Authorization @@ -511,7 +569,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateParrots** -> InlineResponse200 UpdateParrots (Body1 body = null) +> InlineResponse200 UpdateParrots (ParrotBody body = null) update parrots @@ -530,7 +588,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body1(); // Body1 | (optional) + var body = new ParrotBody(); // ParrotBody | (optional) try { @@ -551,7 +609,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body1**](Body1.md)| | [optional] + **body** | [**ParrotBody**](ParrotBody.md)| | [optional] ### Return type @@ -693,7 +751,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UploadFile** -> ApiResponse UploadFile (long? petId, Object body = null) +> ModelApiResponse UploadFile (long? petId, Object body = null) uploads an image @@ -721,7 +779,7 @@ namespace Example try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, body); + ModelApiResponse result = apiInstance.UploadFile(petId, body); Debug.WriteLine(result); } catch (Exception e) @@ -742,7 +800,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**ModelApiResponse**](ModelApiResponse.md) ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetPetIdBody.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md new file mode 100644 index 00000000000..0353116e609 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/SubCategory.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.SubCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | **AllOfSubCategoryCategory** | | [optional] +**Category2** | [**Category**](Category.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ValMembers.md b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ValMembers.md index 2a71e4666c4..bcf897a1f7f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ValMembers.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/docs/ValMembers.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ValMember** | [**List<OneOfvalMembersValMemberItems>**](.md) | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | +**ValMember** | **List<OneOfvalMembersValMemberItems>** | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs new file mode 100644 index 00000000000..e59e87eedda --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs @@ -0,0 +1,103 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryCategoryTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryCategory + //private AllOfSubCategoryCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryCategory + //instance = new AllOfSubCategoryCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryCategory + /// + [Test] + public void AllOfSubCategoryCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryCategory"); + } + + + /// + /// Test the property 'Foo' + /// + [Test] + public void FooTest() + { + // TODO unit test for the property 'Foo' + } + /// + /// Test the property 'Bar' + /// + [Test] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + /// + /// Test the property 'Beer' + /// + [Test] + public void BeerTest() + { + // TODO unit test for the property 'Beer' + } + /// + /// Test the property 'Drunk' + /// + [Test] + public void DrunkTest() + { + // TODO unit test for the property 'Drunk' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs new file mode 100644 index 00000000000..04abff11413 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryPetsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryPetsItemsTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryPetsItems + //private AllOfSubCategoryPetsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryPetsItems + //instance = new AllOfSubCategoryPetsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryPetsItems + /// + [Test] + public void AllOfSubCategoryPetsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryPetsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryPetsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs new file mode 100644 index 00000000000..0f4ed0178e7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnyOfparrotBodyParrotsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnyOfparrotBodyParrotsItemsTests + { + // TODO uncomment below to declare an instance variable for AnyOfparrotBodyParrotsItems + //private AnyOfparrotBodyParrotsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnyOfparrotBodyParrotsItems + //instance = new AnyOfparrotBodyParrotsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnyOfparrotBodyParrotsItems + /// + [Test] + public void AnyOfparrotBodyParrotsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnyOfparrotBodyParrotsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnyOfparrotBodyParrotsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs new file mode 100644 index 00000000000..798a3bcda23 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ModelApiResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ModelApiResponseTests + { + // TODO uncomment below to declare an instance variable for ModelApiResponse + //private ModelApiResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ModelApiResponse + //instance = new ModelApiResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ModelApiResponse + /// + [Test] + public void ModelApiResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ModelApiResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ModelApiResponse"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs new file mode 100644 index 00000000000..e2035b16000 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing NullableEnumModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class NullableEnumModelTests + { + // TODO uncomment below to declare an instance variable for NullableEnumModel + //private NullableEnumModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of NullableEnumModel + //instance = new NullableEnumModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of NullableEnumModel + /// + [Test] + public void NullableEnumModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" NullableEnumModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a NullableEnumModel"); + } + + + /// + /// Test the property 'EnumProp' + /// + [Test] + public void EnumPropTest() + { + // TODO unit test for the property 'EnumProp' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs new file mode 100644 index 00000000000..720c49b6871 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBody1Tests + { + // TODO uncomment below to declare an instance variable for ParrotBody1 + //private ParrotBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody1 + //instance = new ParrotBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody1 + /// + [Test] + public void ParrotBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody1"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ParrotBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ParrotBodyTests.cs new file mode 100644 index 00000000000..e4e29538d4c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/ParrotBodyTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBodyTests + { + // TODO uncomment below to declare an instance variable for ParrotBody + //private ParrotBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody + //instance = new ParrotBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody + /// + [Test] + public void ParrotBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody"); + } + + + /// + /// Test the property 'Parrots' + /// + [Test] + public void ParrotsTest() + { + // TODO unit test for the property 'Parrots' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..548d15aaa0c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/SubCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/SubCategoryTests.cs new file mode 100644 index 00000000000..844d772cf1f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger.Test/Model/SubCategoryTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing SubCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SubCategoryTests + { + // TODO uncomment below to declare an instance variable for SubCategory + //private SubCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SubCategory + //instance = new SubCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SubCategory + /// + [Test] + public void SubCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SubCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SubCategory"); + } + + + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Category2' + /// + [Test] + public void Category2Test() + { + // TODO unit test for the property 'Category2' + } + /// + /// Test the property 'Pets' + /// + [Test] + public void PetsTest() + { + // TODO unit test for the property 'Pets' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/DefaultApi.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/DefaultApi.cs index 1be7296a47b..b041e6ffc26 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/DefaultApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/DefaultApi.cs @@ -13,7 +13,6 @@ using System.Linq; using RestSharp; using IO.Swagger.Client; -using IO.Swagger.Model; namespace IO.Swagger.Api { @@ -30,8 +29,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<Test> - List TestMethod (); + /// List<string> + List TestMethod (); /// /// @@ -40,8 +39,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - ApiResponse> TestMethodWithHttpInfo (); + /// ApiResponse of List<string> + ApiResponse> TestMethodWithHttpInfo (); #endregion Synchronous Operations } @@ -157,10 +156,10 @@ public void AddDefaultHeader(string key, string value) /// /// /// Thrown when fails to make API call - /// List<Test> - public List TestMethod () + /// List<string> + public List TestMethod () { - ApiResponse> localVarResponse = TestMethodWithHttpInfo(); + ApiResponse> localVarResponse = TestMethodWithHttpInfo(); return localVarResponse.Data; } @@ -168,8 +167,8 @@ public List TestMethod () /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - public ApiResponse< List > TestMethodWithHttpInfo () + /// ApiResponse of List<string> + public ApiResponse< List > TestMethodWithHttpInfo () { var localVarPath = "/test"; @@ -213,9 +212,9 @@ public ApiResponse< List > TestMethodWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/PetApi.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/PetApi.cs index abab48cefa7..de0d8711deb 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/PetApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Api/PetApi.cs @@ -32,7 +32,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - InlineResponse2001 AddParrot (Body2 body = null); + InlineResponse2001 AddParrot (ParrotBody1 body = null); /// /// Add a new parrow to the store @@ -43,7 +43,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - ApiResponse AddParrotWithHttpInfo (Body2 body = null); + ApiResponse AddParrotWithHttpInfo (ParrotBody1 body = null); /// /// Add a new pet to the store /// @@ -89,6 +89,27 @@ public interface IPetApi : IApiAccessor /// ApiResponse of Object(void) ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null); /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + ModelApiResponse DoCategoryStuff (SubCategory body = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + ApiResponse DoCategoryStuffWithHttpInfo (SubCategory body = null); + /// /// Find pet by ID /// /// @@ -166,8 +187,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<> - List<> GetParrots (); + /// List<Object> + List GetParrots (); /// /// get Parrots @@ -176,8 +197,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<> - ApiResponse> GetParrotsWithHttpInfo (); + /// ApiResponse of List<Object> + ApiResponse> GetParrotsWithHttpInfo (); /// /// Find pet by ID /// @@ -208,7 +229,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - InlineResponse200 UpdateParrots (Body1 body = null); + InlineResponse200 UpdateParrots (ParrotBody body = null); /// /// update parrots @@ -219,7 +240,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - ApiResponse UpdateParrotsWithHttpInfo (Body1 body = null); + ApiResponse UpdateParrotsWithHttpInfo (ParrotBody body = null); /// /// Update an existing pet /// @@ -275,8 +296,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - ApiResponse UploadFile (long? petId, Object body = null); + /// ModelApiResponse + ModelApiResponse UploadFile (long? petId, Object body = null); /// /// uploads an image @@ -287,8 +308,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); + /// ApiResponse of ModelApiResponse + ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); #endregion Synchronous Operations } @@ -406,7 +427,7 @@ public void AddDefaultHeader(string key, string value) /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - public InlineResponse2001 AddParrot (Body2 body = null) + public InlineResponse2001 AddParrot (ParrotBody1 body = null) { ApiResponse localVarResponse = AddParrotWithHttpInfo(body); return localVarResponse.Data; @@ -418,7 +439,7 @@ public InlineResponse2001 AddParrot (Body2 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (Body2 body = null) + public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (ParrotBody1 body = null) { var localVarPath = "/parrot"; @@ -620,6 +641,76 @@ public ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = n null); } + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + public ModelApiResponse DoCategoryStuff (SubCategory body = null) + { + ApiResponse localVarResponse = DoCategoryStuffWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > DoCategoryStuffWithHttpInfo (SubCategory body = null) + { + + var localVarPath = "/pet/category"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DoCategoryStuff", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); + } + /// /// Find pet by ID schedule pet feeding /// @@ -864,10 +955,10 @@ public ApiResponse< List > FindPetsByTagsWithHttpInfo (List tags) /// get Parrots /// /// Thrown when fails to make API call - /// List<> - public List<> GetParrots () + /// List<Object> + public List GetParrots () { - ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); + ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); return localVarResponse.Data; } @@ -875,8 +966,8 @@ public ApiResponse< List > FindPetsByTagsWithHttpInfo (List tags) /// get Parrots /// /// Thrown when fails to make API call - /// ApiResponse of List<> - public ApiResponse< List<> > GetParrotsWithHttpInfo () + /// ApiResponse of List<Object> + public ApiResponse< List > GetParrotsWithHttpInfo () { var localVarPath = "/parrot"; @@ -914,9 +1005,9 @@ public ApiResponse< List<> > GetParrotsWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List<>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<>))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -996,7 +1087,7 @@ public ApiResponse< Pet > GetPetByIdWithHttpInfo (long? petId) /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - public InlineResponse200 UpdateParrots (Body1 body = null) + public InlineResponse200 UpdateParrots (ParrotBody body = null) { ApiResponse localVarResponse = UpdateParrotsWithHttpInfo(body); return localVarResponse.Data; @@ -1008,7 +1099,7 @@ public InlineResponse200 UpdateParrots (Body1 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (Body1 body = null) + public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (ParrotBody body = null) { var localVarPath = "/parrot"; @@ -1220,10 +1311,10 @@ public ApiResponse UpdatePetWithFormWithHttpInfo (long? petId, string na /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - public ApiResponse UploadFile (long? petId, Object body = null) + /// ModelApiResponse + public ModelApiResponse UploadFile (long? petId, Object body = null) { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); + ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); return localVarResponse.Data; } @@ -1233,8 +1324,8 @@ public ApiResponse UploadFile (long? petId, Object body = null) /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -1291,9 +1382,9 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object bo if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs index 545ad1c3ee8..4ad4d8012be 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { @@ -205,6 +205,11 @@ public FileParameter ParameterToFile(string name, Stream stream) return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); } + public FileParameter ParameterToFile(string name, byte[] stream) + { + return FileParameter.Create(name, stream, "no_file_name_provided"); + } + /// /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. /// If parameter is a list, join the list with ",". diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs index 0ee7b296a50..1d26667dfe8 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs index 10a8a3e25a4..fc72e347e1f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs index 761ac7a065d..8ce26cc5869 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/Configuration.cs @@ -20,7 +20,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants @@ -119,7 +119,6 @@ public Configuration() ApiKey = new ConcurrentDictionary(); ApiKeyPrefix = new ConcurrentDictionary(); - // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; } @@ -242,14 +241,32 @@ public virtual string BasePath { /// public virtual IDictionary DefaultHeader { get; set; } + private int _timeout = 100000; /// /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. /// public virtual int Timeout { - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } + get + { + if (_apiClient == null) + { + return _timeout; + } + else + { + return ApiClient.RestClient.Timeout; + } + } + set + { + _timeout = value; + if (_apiClient != null) + { + ApiClient.RestClient.Timeout = _timeout; + } + } } /// diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs index 386c148dfdf..8151e9194f2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs index 2596d55b928..9ea748b6d92 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs new file mode 100644 index 00000000000..2293396eecd --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs @@ -0,0 +1,171 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryCategory + /// + [DataContract] + public partial class AllOfSubCategoryCategory : Category, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// foo. + /// bar. + /// beer. + /// drunk. + public AllOfSubCategoryCategory(bool? foo = default(bool?), int? bar = default(int?), string beer = default(string), User drunk = default(User), long? id = default(long?), string name = default(string), List subcategories = default(List)) : base(id, name, subcategories) + { + this.Foo = foo; + this.Bar = bar; + this.Beer = beer; + this.Drunk = drunk; + } + + /// + /// Gets or Sets Foo + /// + [DataMember(Name="foo", EmitDefaultValue=false)] + public bool? Foo { get; set; } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name="bar", EmitDefaultValue=false)] + public int? Bar { get; set; } + + /// + /// Gets or Sets Beer + /// + [DataMember(Name="beer", EmitDefaultValue=false)] + public string Beer { get; set; } + + /// + /// Gets or Sets Drunk + /// + [DataMember(Name="drunk", EmitDefaultValue=false)] + public User Drunk { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryCategory {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Beer: ").Append(Beer).Append("\n"); + sb.Append(" Drunk: ").Append(Drunk).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryCategory); + } + + /// + /// Returns true if AllOfSubCategoryCategory instances are equal + /// + /// Instance of AllOfSubCategoryCategory to be compared + /// Boolean + public bool Equals(AllOfSubCategoryCategory input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Foo == input.Foo || + (this.Foo != null && + this.Foo.Equals(input.Foo)) + ) && base.Equals(input) && + ( + this.Bar == input.Bar || + (this.Bar != null && + this.Bar.Equals(input.Bar)) + ) && base.Equals(input) && + ( + this.Beer == input.Beer || + (this.Beer != null && + this.Beer.Equals(input.Beer)) + ) && base.Equals(input) && + ( + this.Drunk == input.Drunk || + (this.Drunk != null && + this.Drunk.Equals(input.Drunk)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Foo != null) + hashCode = hashCode * 59 + this.Foo.GetHashCode(); + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.Beer != null) + hashCode = hashCode * 59 + this.Beer.GetHashCode(); + if (this.Drunk != null) + hashCode = hashCode * 59 + this.Drunk.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs new file mode 100644 index 00000000000..78cdb6e7e5c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs @@ -0,0 +1,107 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryPetsItems + /// + [DataContract] + public partial class AllOfSubCategoryPetsItems : Pet, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public AllOfSubCategoryPetsItems(long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryPetsItems {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryPetsItems); + } + + /// + /// Returns true if AllOfSubCategoryPetsItems instances are equal + /// + /// Instance of AllOfSubCategoryPetsItems to be compared + /// Boolean + public bool Equals(AllOfSubCategoryPetsItems input) + { + if (input == null) + return false; + + return base.Equals(input); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs new file mode 100644 index 00000000000..c3828a4638b --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnyOfparrotBodyParrotsItems + /// + [DataContract] + public partial class AnyOfparrotBodyParrotsItems : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public AnyOfparrotBodyParrotsItems() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnyOfparrotBodyParrotsItems {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnyOfparrotBodyParrotsItems); + } + + /// + /// Returns true if AnyOfparrotBodyParrotsItems instances are equal + /// + /// Instance of AnyOfparrotBodyParrotsItems to be compared + /// Boolean + public bool Equals(AnyOfparrotBodyParrotsItems input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Cat.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Cat.cs index 1a3345ea1ce..c54530ce0e8 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Cat.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Cat.cs @@ -34,7 +34,7 @@ public partial class Cat : Pet, IEquatable, IValidatableObject /// /// hunts. /// age. - public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Hunts = hunts; this.Age = age; @@ -133,7 +133,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - foreach(var x in BaseValidate(validationContext)) yield return x; yield break; } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Dog.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Dog.cs index 9656b784703..6fc57708871 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Dog.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/Dog.cs @@ -65,7 +65,7 @@ public enum BreedEnum /// /// bark. /// breed. - public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Bark = bark; this.Breed = breed; @@ -159,7 +159,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - foreach(var x in BaseValidate(validationContext)) yield return x; yield break; } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ModelApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ModelApiResponse.cs new file mode 100644 index 00000000000..07b7c061210 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ModelApiResponse.cs @@ -0,0 +1,154 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ModelApiResponse + /// + [DataContract] + public partial class ModelApiResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// type. + /// message. + public ModelApiResponse(int? code = default(int?), string type = default(string), string message = default(string)) + { + this.Code = code; + this.Type = type; + this.Message = message; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public int? Code { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ModelApiResponse {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ModelApiResponse); + } + + /// + /// Returns true if ModelApiResponse instances are equal + /// + /// Instance of ModelApiResponse to be compared + /// Boolean + public bool Equals(ModelApiResponse input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/NullableEnumModel.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/NullableEnumModel.cs new file mode 100644 index 00000000000..db0e0e97494 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/NullableEnumModel.cs @@ -0,0 +1,143 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// NullableEnumModel + /// + [DataContract] + public partial class NullableEnumModel : IEquatable, IValidatableObject + { + /// + /// Defines EnumProp + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumPropEnum + { + /// + /// Enum A for value: a + /// + [EnumMember(Value = "a")] + A = 1, + /// + /// Enum B for value: b + /// + [EnumMember(Value = "b")] + B = 2, + /// + /// Enum Null for value: null + /// + [EnumMember(Value = null)] + Null = 3 } + /// + /// Gets or Sets EnumProp + /// + [DataMember(Name="enumProp", EmitDefaultValue=false)] + public EnumPropEnum? EnumProp { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// enumProp. + public NullableEnumModel(EnumPropEnum? enumProp = default(EnumPropEnum?)) + { + this.EnumProp = enumProp; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NullableEnumModel {\n"); + sb.Append(" EnumProp: ").Append(EnumProp).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NullableEnumModel); + } + + /// + /// Returns true if NullableEnumModel instances are equal + /// + /// Instance of NullableEnumModel to be compared + /// Boolean + public bool Equals(NullableEnumModel input) + { + if (input == null) + return false; + + return + ( + this.EnumProp == input.EnumProp || + (this.EnumProp != null && + this.EnumProp.Equals(input.EnumProp)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumProp != null) + hashCode = hashCode * 59 + this.EnumProp.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ParrotBody.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ParrotBody.cs new file mode 100644 index 00000000000..1ba40dddb5f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ParrotBody.cs @@ -0,0 +1,123 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody + /// + [DataContract] + public partial class ParrotBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// parrots. + public ParrotBody(List parrots = default(List)) + { + this.Parrots = parrots; + } + + /// + /// Gets or Sets Parrots + /// + [DataMember(Name="parrots", EmitDefaultValue=false)] + public List Parrots { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody {\n"); + sb.Append(" Parrots: ").Append(Parrots).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody); + } + + /// + /// Returns true if ParrotBody instances are equal + /// + /// Instance of ParrotBody to be compared + /// Boolean + public bool Equals(ParrotBody input) + { + if (input == null) + return false; + + return + ( + this.Parrots == input.Parrots || + this.Parrots != null && + input.Parrots != null && + this.Parrots.SequenceEqual(input.Parrots) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Parrots != null) + hashCode = hashCode * 59 + this.Parrots.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ParrotBody1.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ParrotBody1.cs new file mode 100644 index 00000000000..28760731c14 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/ParrotBody1.cs @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody1 + /// + [DataContract] + public partial class ParrotBody1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public ParrotBody1() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody1 {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody1); + } + + /// + /// Returns true if ParrotBody1 instances are equal + /// + /// Instance of ParrotBody1 to be compared + /// Boolean + public bool Equals(ParrotBody1 input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..9b4213539da --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,140 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/SubCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/SubCategory.cs new file mode 100644 index 00000000000..bf8a7850711 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientNet40/src/IO.Swagger/Model/SubCategory.cs @@ -0,0 +1,155 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// SubCategory + /// + [DataContract] + public partial class SubCategory : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// category. + /// category2. + /// pets. + public SubCategory(AllOfSubCategoryCategory category = default(AllOfSubCategoryCategory), Category category2 = default(Category), List pets = default(List)) + { + this.Category = category; + this.Category2 = category2; + this.Pets = pets; + } + + /// + /// Gets or Sets Category + /// + [DataMember(Name="category", EmitDefaultValue=false)] + public AllOfSubCategoryCategory Category { get; set; } + + /// + /// Gets or Sets Category2 + /// + [DataMember(Name="category2", EmitDefaultValue=false)] + public Category Category2 { get; set; } + + /// + /// Gets or Sets Pets + /// + [DataMember(Name="pets", EmitDefaultValue=false)] + public List Pets { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SubCategory {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Category2: ").Append(Category2).Append("\n"); + sb.Append(" Pets: ").Append(Pets).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SubCategory); + } + + /// + /// Returns true if SubCategory instances are equal + /// + /// Instance of SubCategory to be compared + /// Boolean + public bool Equals(SubCategory input) + { + if (input == null) + return false; + + return + ( + this.Category == input.Category || + (this.Category != null && + this.Category.Equals(input.Category)) + ) && + ( + this.Category2 == input.Category2 || + (this.Category2 != null && + this.Category2.Equals(input.Category2)) + ) && + ( + this.Pets == input.Pets || + this.Pets != null && + input.Pets != null && + this.Pets.SequenceEqual(input.Pets) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Category != null) + hashCode = hashCode * 59 + this.Category.GetHashCode(); + if (this.Category2 != null) + hashCode = hashCode * 59 + this.Category2.GetHashCode(); + if (this.Pets != null) + hashCode = hashCode * 59 + this.Pets.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION index 5d9eef07d78..86820ab0dd0 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.17-SNAPSHOT \ No newline at end of file +3.0.36-SNAPSHOT \ No newline at end of file diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md index 3ebc4c5095a..70698e4c32d 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/README.md @@ -74,7 +74,7 @@ namespace Example try { - List result = apiInstance.TestMethod(); + List result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -97,6 +97,7 @@ Class | Method | HTTP request | Description *PetApi* | [**AddParrot**](docs/PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store *PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store *PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**DoCategoryStuff**](docs/PetApi.md#docategorystuff) | **POST** /pet/category | *PetApi* | [**FeedPet**](docs/PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID *PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status *PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -122,38 +123,39 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [Model.AllOfSubCategoryCategory](docs/AllOfSubCategoryCategory.md) + - [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md) - [Model.AllPetsResponse](docs/AllPetsResponse.md) - - [Model.AnyOfbody1ParrotsItems](docs/AnyOfbody1ParrotsItems.md) - - [Model.AnyOfbody2](docs/AnyOfbody2.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.Body](docs/Body.md) - - [Model.Body1](docs/Body1.md) - - [Model.Body2](docs/Body2.md) + - [Model.AnyOfparrotBodyParrotsItems](docs/AnyOfparrotBodyParrotsItems.md) - [Model.Cat](docs/Cat.md) - [Model.Category](docs/Category.md) - [Model.Dog](docs/Dog.md) - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.InlineResponse2001](docs/InlineResponse2001.md) - [Model.Macaw](docs/Macaw.md) + - [Model.ModelApiResponse](docs/ModelApiResponse.md) + - [Model.NullableEnumModel](docs/NullableEnumModel.md) - [Model.OneOfAllPetsResponseItems](docs/OneOfAllPetsResponseItems.md) - [Model.OneOfPartMasterDestination](docs/OneOfPartMasterDestination.md) - [Model.OneOfPartMasterOrigin](docs/OneOfPartMasterOrigin.md) - [Model.OneOfPetPartItems](docs/OneOfPetPartItems.md) - [Model.OneOfPup](docs/OneOfPup.md) - - [Model.OneOfinlineResponse2001](docs/OneOfinlineResponse2001.md) - [Model.OneOfinlineResponse200ParrotsItems](docs/OneOfinlineResponse200ParrotsItems.md) - [Model.OneOfvalMembersValMemberItems](docs/OneOfvalMembersValMemberItems.md) - [Model.Order](docs/Order.md) - [Model.Parakeet](docs/Parakeet.md) + - [Model.ParrotBody](docs/ParrotBody.md) + - [Model.ParrotBody1](docs/ParrotBody1.md) - [Model.PartFour](docs/PartFour.md) - [Model.PartMaster](docs/PartMaster.md) - [Model.PartOne](docs/PartOne.md) - [Model.PartThree](docs/PartThree.md) - [Model.PartTwo](docs/PartTwo.md) - [Model.Pet](docs/Pet.md) + - [Model.PetPetIdBody](docs/PetPetIdBody.md) - [Model.Pup](docs/Pup.md) + - [Model.SubCategory](docs/SubCategory.md) - [Model.Tag](docs/Tag.md) - - [Model.Test](docs/Test.md) - [Model.User](docs/User.md) - [Model.ValMemberChoice1](docs/ValMemberChoice1.md) - [Model.ValMemberChoice2](docs/ValMemberChoice2.md) @@ -180,5 +182,6 @@ Class | Method | HTTP request | Description - **Flow**: implicit - **Authorization URL**: http://petstore.swagger.io/oauth/dialog - **Scopes**: - - : + - write:pets: modify pets in your account + - read:pets: read your pets diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AllOfSubCategoryCategory.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AllOfSubCategoryCategory.md new file mode 100644 index 00000000000..f58e49769ef --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AllOfSubCategoryCategory.md @@ -0,0 +1,15 @@ +# IO.Swagger.Model.AllOfSubCategoryCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | [optional] +**Subcategories** | [**List<Category>**](Category.md) | | [optional] +**Foo** | **bool?** | | [optional] +**Bar** | **int?** | | [optional] +**Beer** | **string** | | [optional] +**Drunk** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AllOfSubCategoryPetsItems.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AllOfSubCategoryPetsItems.md new file mode 100644 index 00000000000..f21b362dc89 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AllOfSubCategoryPetsItems.md @@ -0,0 +1,12 @@ +# IO.Swagger.Model.AllOfSubCategoryPetsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**Name** | **string** | | +**Status** | **string** | pet status in the store | [optional] +**Part** | **List<Object>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AnyOfparrotBodyParrotsItems.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AnyOfparrotBodyParrotsItems.md new file mode 100644 index 00000000000..6a9e62ad98f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/AnyOfparrotBodyParrotsItems.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.AnyOfparrotBodyParrotsItems +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Cat.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Cat.md index a78e291b071..508f2203c66 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Cat.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Cat.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Hunts** | **bool?** | | [optional] **Age** | **int?** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DefaultApi.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DefaultApi.md index 7673e4e33ce..d1c5a072abb 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DefaultApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/DefaultApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **TestMethod** -> List TestMethod () +> List TestMethod () @@ -31,7 +31,7 @@ namespace Example try { - List<Test> result = apiInstance.TestMethod(); + List<string> result = apiInstance.TestMethod(); Debug.WriteLine(result); } catch (Exception e) @@ -48,7 +48,7 @@ This endpoint does not need any parameter. ### Return type -[**List**](Test.md) +**List** ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Dog.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Dog.md index b6f7d9bce79..d2b4d917f58 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Dog.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Dog.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<>**](.md) | | [optional] +**Part** | **List<Object>** | | [optional] **Bark** | **bool?** | | [optional] **Breed** | **string** | | [optional] diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/InlineResponse200.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/InlineResponse200.md index d333d594be6..567456756cf 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/InlineResponse200.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/InlineResponse200.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Parrots** | [**List<OneOfinlineResponse200ParrotsItems>**](.md) | | [optional] +**Parrots** | **List<OneOfinlineResponse200ParrotsItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ModelApiResponse.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ModelApiResponse.md new file mode 100644 index 00000000000..a9e743b78ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ModelApiResponse.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.ModelApiResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **int?** | | [optional] +**Type** | **string** | | [optional] +**Message** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/NullableEnumModel.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/NullableEnumModel.md new file mode 100644 index 00000000000..56e19f258f7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/NullableEnumModel.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.NullableEnumModel +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnumProp** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ParrotBody.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ParrotBody.md new file mode 100644 index 00000000000..c8079e929ff --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ParrotBody.md @@ -0,0 +1,9 @@ +# IO.Swagger.Model.ParrotBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Parrots** | **List<AnyOfparrotBodyParrotsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ParrotBody1.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ParrotBody1.md new file mode 100644 index 00000000000..97e4c785e6a --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ParrotBody1.md @@ -0,0 +1,8 @@ +# IO.Swagger.Model.ParrotBody1 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PartMaster.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PartMaster.md index af910ffa960..5129b771794 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PartMaster.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PartMaster.md @@ -3,8 +3,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Destination** | [**OneOfPartMasterDestination**](OneOfPartMasterDestination.md) | | [optional] -**Origin** | [**OneOfPartMasterOrigin**](OneOfPartMasterOrigin.md) | | [optional] +**Destination** | **OneOfPartMasterDestination** | | [optional] +**Origin** | **OneOfPartMasterOrigin** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Pet.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Pet.md index 6f41e38bf68..190033af45f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Pet.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/Pet.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | **Status** | **string** | pet status in the store | [optional] -**Part** | [**List<OneOfPetPartItems>**](.md) | | [optional] +**Part** | **List<OneOfPetPartItems>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md index e2de3a2e37c..a6bfc42370c 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**AddParrot**](PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**DoCategoryStuff**](PetApi.md#docategorystuff) | **POST** /pet/category | [**FeedPet**](PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags @@ -19,7 +20,7 @@ Method | HTTP request | Description # **AddParrot** -> InlineResponse2001 AddParrot (Body2 body = null) +> InlineResponse2001 AddParrot (ParrotBody1 body = null) Add a new parrow to the store @@ -38,7 +39,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body2(); // Body2 | (optional) + var body = new ParrotBody1(); // ParrotBody1 | (optional) try { @@ -59,7 +60,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body2**](Body2.md)| | [optional] + **body** | [**ParrotBody1**](ParrotBody1.md)| | [optional] ### Return type @@ -196,6 +197,63 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: Not defined +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DoCategoryStuff** +> ModelApiResponse DoCategoryStuff (SubCategory body = null) + + + +### Example +```csharp +using System; +using System.Diagnostics; +using IO.Swagger.Api; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace Example +{ + public class DoCategoryStuffExample + { + public void main() + { + var apiInstance = new PetApi(); + var body = new SubCategory(); // SubCategory | (optional) + + try + { + ModelApiResponse result = apiInstance.DoCategoryStuff(body); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling PetApi.DoCategoryStuff: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**SubCategory**](SubCategory.md)| | [optional] + +### Return type + +[**ModelApiResponse**](ModelApiResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **FeedPet** @@ -392,7 +450,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetParrots** -> List<> GetParrots () +> List GetParrots () get Parrots @@ -415,7 +473,7 @@ namespace Example try { // get Parrots - List<> result = apiInstance.GetParrots(); + List<Object> result = apiInstance.GetParrots(); Debug.WriteLine(result); } catch (Exception e) @@ -432,7 +490,7 @@ This endpoint does not need any parameter. ### Return type -[**List<>**](.md) +**List** ### Authorization @@ -511,7 +569,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateParrots** -> InlineResponse200 UpdateParrots (Body1 body = null) +> InlineResponse200 UpdateParrots (ParrotBody body = null) update parrots @@ -530,7 +588,7 @@ namespace Example public void main() { var apiInstance = new PetApi(); - var body = new Body1(); // Body1 | (optional) + var body = new ParrotBody(); // ParrotBody | (optional) try { @@ -551,7 +609,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Body1**](Body1.md)| | [optional] + **body** | [**ParrotBody**](ParrotBody.md)| | [optional] ### Return type @@ -693,7 +751,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UploadFile** -> ApiResponse UploadFile (long? petId, Object body = null) +> ModelApiResponse UploadFile (long? petId, Object body = null) uploads an image @@ -721,7 +779,7 @@ namespace Example try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, body); + ModelApiResponse result = apiInstance.UploadFile(petId, body); Debug.WriteLine(result); } catch (Exception e) @@ -742,7 +800,7 @@ Name | Type | Description | Notes ### Return type -[**ApiResponse**](ApiResponse.md) +[**ModelApiResponse**](ModelApiResponse.md) ### Authorization diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetPetIdBody.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetPetIdBody.md new file mode 100644 index 00000000000..32d90f6685c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/PetPetIdBody.md @@ -0,0 +1,10 @@ +# IO.Swagger.Model.PetPetIdBody +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Updated name of the pet | [optional] +**Status** | **string** | Updated status of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md new file mode 100644 index 00000000000..0353116e609 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/SubCategory.md @@ -0,0 +1,11 @@ +# IO.Swagger.Model.SubCategory +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | **AllOfSubCategoryCategory** | | [optional] +**Category2** | [**Category**](Category.md) | | [optional] +**Pets** | **List<AllOfSubCategoryPetsItems>** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ValMembers.md b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ValMembers.md index 2a71e4666c4..bcf897a1f7f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ValMembers.md +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/docs/ValMembers.md @@ -3,7 +3,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ValMember** | [**List<OneOfvalMembersValMemberItems>**](.md) | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | +**ValMember** | **List<OneOfvalMembersValMemberItems>** | Business Term: Scheme Member Definition: Information about a Member of the Scheme. Purpose: To have enough information to be able to produce a Statement of Account indicating premium due. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs new file mode 100644 index 00000000000..e59e87eedda --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AllOfSubCategoryCategoryTests.cs @@ -0,0 +1,103 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryCategoryTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryCategory + //private AllOfSubCategoryCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryCategory + //instance = new AllOfSubCategoryCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryCategory + /// + [Test] + public void AllOfSubCategoryCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryCategory"); + } + + + /// + /// Test the property 'Foo' + /// + [Test] + public void FooTest() + { + // TODO unit test for the property 'Foo' + } + /// + /// Test the property 'Bar' + /// + [Test] + public void BarTest() + { + // TODO unit test for the property 'Bar' + } + /// + /// Test the property 'Beer' + /// + [Test] + public void BeerTest() + { + // TODO unit test for the property 'Beer' + } + /// + /// Test the property 'Drunk' + /// + [Test] + public void DrunkTest() + { + // TODO unit test for the property 'Drunk' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs new file mode 100644 index 00000000000..04abff11413 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AllOfSubCategoryPetsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AllOfSubCategoryPetsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AllOfSubCategoryPetsItemsTests + { + // TODO uncomment below to declare an instance variable for AllOfSubCategoryPetsItems + //private AllOfSubCategoryPetsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AllOfSubCategoryPetsItems + //instance = new AllOfSubCategoryPetsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllOfSubCategoryPetsItems + /// + [Test] + public void AllOfSubCategoryPetsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AllOfSubCategoryPetsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AllOfSubCategoryPetsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs new file mode 100644 index 00000000000..0f4ed0178e7 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/AnyOfparrotBodyParrotsItemsTests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing AnyOfparrotBodyParrotsItems + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnyOfparrotBodyParrotsItemsTests + { + // TODO uncomment below to declare an instance variable for AnyOfparrotBodyParrotsItems + //private AnyOfparrotBodyParrotsItems instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of AnyOfparrotBodyParrotsItems + //instance = new AnyOfparrotBodyParrotsItems(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnyOfparrotBodyParrotsItems + /// + [Test] + public void AnyOfparrotBodyParrotsItemsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" AnyOfparrotBodyParrotsItems + //Assert.IsInstanceOfType (instance, "variable 'instance' is a AnyOfparrotBodyParrotsItems"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs new file mode 100644 index 00000000000..798a3bcda23 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ModelApiResponseTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ModelApiResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ModelApiResponseTests + { + // TODO uncomment below to declare an instance variable for ModelApiResponse + //private ModelApiResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ModelApiResponse + //instance = new ModelApiResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ModelApiResponse + /// + [Test] + public void ModelApiResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ModelApiResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ModelApiResponse"); + } + + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs new file mode 100644 index 00000000000..e2035b16000 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/NullableEnumModelTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing NullableEnumModel + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class NullableEnumModelTests + { + // TODO uncomment below to declare an instance variable for NullableEnumModel + //private NullableEnumModel instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of NullableEnumModel + //instance = new NullableEnumModel(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of NullableEnumModel + /// + [Test] + public void NullableEnumModelInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" NullableEnumModel + //Assert.IsInstanceOfType (instance, "variable 'instance' is a NullableEnumModel"); + } + + + /// + /// Test the property 'EnumProp' + /// + [Test] + public void EnumPropTest() + { + // TODO unit test for the property 'EnumProp' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs new file mode 100644 index 00000000000..720c49b6871 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ParrotBody1Tests.cs @@ -0,0 +1,71 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody1 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBody1Tests + { + // TODO uncomment below to declare an instance variable for ParrotBody1 + //private ParrotBody1 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody1 + //instance = new ParrotBody1(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody1 + /// + [Test] + public void ParrotBody1InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody1 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody1"); + } + + + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ParrotBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ParrotBodyTests.cs new file mode 100644 index 00000000000..e4e29538d4c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/ParrotBodyTests.cs @@ -0,0 +1,79 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing ParrotBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ParrotBodyTests + { + // TODO uncomment below to declare an instance variable for ParrotBody + //private ParrotBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ParrotBody + //instance = new ParrotBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ParrotBody + /// + [Test] + public void ParrotBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ParrotBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ParrotBody"); + } + + + /// + /// Test the property 'Parrots' + /// + [Test] + public void ParrotsTest() + { + // TODO unit test for the property 'Parrots' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs new file mode 100644 index 00000000000..548d15aaa0c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/PetPetIdBodyTests.cs @@ -0,0 +1,87 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing PetPetIdBody + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class PetPetIdBodyTests + { + // TODO uncomment below to declare an instance variable for PetPetIdBody + //private PetPetIdBody instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of PetPetIdBody + //instance = new PetPetIdBody(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of PetPetIdBody + /// + [Test] + public void PetPetIdBodyInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" PetPetIdBody + //Assert.IsInstanceOfType (instance, "variable 'instance' is a PetPetIdBody"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/SubCategoryTests.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/SubCategoryTests.cs new file mode 100644 index 00000000000..844d772cf1f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger.Test/Model/SubCategoryTests.cs @@ -0,0 +1,95 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +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; +using Newtonsoft.Json; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing SubCategory + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class SubCategoryTests + { + // TODO uncomment below to declare an instance variable for SubCategory + //private SubCategory instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of SubCategory + //instance = new SubCategory(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of SubCategory + /// + [Test] + public void SubCategoryInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" SubCategory + //Assert.IsInstanceOfType (instance, "variable 'instance' is a SubCategory"); + } + + + /// + /// Test the property 'Category' + /// + [Test] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Category2' + /// + [Test] + public void Category2Test() + { + // TODO unit test for the property 'Category2' + } + /// + /// Test the property 'Pets' + /// + [Test] + public void PetsTest() + { + // TODO unit test for the property 'Pets' + } + + } + +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/DefaultApi.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/DefaultApi.cs index 541adc5c6cb..bd8ae46d2c1 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/DefaultApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/DefaultApi.cs @@ -13,7 +13,6 @@ using System.Linq; using RestSharp; using IO.Swagger.Client; -using IO.Swagger.Model; namespace IO.Swagger.Api { @@ -30,8 +29,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<Test> - List TestMethod (); + /// List<string> + List TestMethod (); /// /// @@ -40,8 +39,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - ApiResponse> TestMethodWithHttpInfo (); + /// ApiResponse of List<string> + ApiResponse> TestMethodWithHttpInfo (); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -51,8 +50,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of List<Test> - System.Threading.Tasks.Task> TestMethodAsync (); + /// Task of List<string> + System.Threading.Tasks.Task> TestMethodAsync (); /// /// @@ -61,8 +60,8 @@ public interface IDefaultApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<Test>) - System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo (); + /// Task of ApiResponse (List<string>) + System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo (); #endregion Asynchronous Operations } @@ -178,10 +177,10 @@ public void AddDefaultHeader(string key, string value) /// /// /// Thrown when fails to make API call - /// List<Test> - public List TestMethod () + /// List<string> + public List TestMethod () { - ApiResponse> localVarResponse = TestMethodWithHttpInfo(); + ApiResponse> localVarResponse = TestMethodWithHttpInfo(); return localVarResponse.Data; } @@ -189,8 +188,8 @@ public List TestMethod () /// /// /// Thrown when fails to make API call - /// ApiResponse of List<Test> - public ApiResponse< List > TestMethodWithHttpInfo () + /// ApiResponse of List<string> + public ApiResponse< List > TestMethodWithHttpInfo () { var localVarPath = "/test"; @@ -234,19 +233,19 @@ public ApiResponse< List > TestMethodWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// /// /// /// Thrown when fails to make API call - /// Task of List<Test> - public async System.Threading.Tasks.Task> TestMethodAsync () + /// Task of List<string> + public async System.Threading.Tasks.Task> TestMethodAsync () { - ApiResponse> localVarResponse = await TestMethodAsyncWithHttpInfo(); + ApiResponse> localVarResponse = await TestMethodAsyncWithHttpInfo(); return localVarResponse.Data; } @@ -255,8 +254,8 @@ public async System.Threading.Tasks.Task> TestMethodAsync () /// /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<Test>) - public async System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo () + /// Task of ApiResponse (List<string>) + public async System.Threading.Tasks.Task>> TestMethodAsyncWithHttpInfo () { var localVarPath = "/test"; @@ -300,9 +299,9 @@ public async System.Threading.Tasks.Task>> TestMethodAsyn if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/PetApi.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/PetApi.cs index 9dccfea10ef..548d953cd2b 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/PetApi.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/PetApi.cs @@ -32,7 +32,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - InlineResponse2001 AddParrot (Body2 body = null); + InlineResponse2001 AddParrot (ParrotBody1 body = null); /// /// Add a new parrow to the store @@ -43,7 +43,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - ApiResponse AddParrotWithHttpInfo (Body2 body = null); + ApiResponse AddParrotWithHttpInfo (ParrotBody1 body = null); /// /// Add a new pet to the store /// @@ -89,6 +89,27 @@ public interface IPetApi : IApiAccessor /// ApiResponse of Object(void) ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null); /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + ModelApiResponse DoCategoryStuff (SubCategory body = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + ApiResponse DoCategoryStuffWithHttpInfo (SubCategory body = null); + /// /// Find pet by ID /// /// @@ -166,8 +187,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// List<> - List<> GetParrots (); + /// List<Object> + List GetParrots (); /// /// get Parrots @@ -176,8 +197,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// ApiResponse of List<> - ApiResponse> GetParrotsWithHttpInfo (); + /// ApiResponse of List<Object> + ApiResponse> GetParrotsWithHttpInfo (); /// /// Find pet by ID /// @@ -208,7 +229,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - InlineResponse200 UpdateParrots (Body1 body = null); + InlineResponse200 UpdateParrots (ParrotBody body = null); /// /// update parrots @@ -219,7 +240,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - ApiResponse UpdateParrotsWithHttpInfo (Body1 body = null); + ApiResponse UpdateParrotsWithHttpInfo (ParrotBody body = null); /// /// Update an existing pet /// @@ -275,8 +296,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - ApiResponse UploadFile (long? petId, Object body = null); + /// ModelApiResponse + ModelApiResponse UploadFile (long? petId, Object body = null); /// /// uploads an image @@ -287,8 +308,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); + /// ApiResponse of ModelApiResponse + ApiResponse UploadFileWithHttpInfo (long? petId, Object body = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -300,7 +321,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse2001 - System.Threading.Tasks.Task AddParrotAsync (Body2 body = null); + System.Threading.Tasks.Task AddParrotAsync (ParrotBody1 body = null); /// /// Add a new parrow to the store @@ -311,7 +332,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse2001) - System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (Body2 body = null); + System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (ParrotBody1 body = null); /// /// Add a new pet to the store /// @@ -357,6 +378,27 @@ public interface IPetApi : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null); /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ModelApiResponse + System.Threading.Tasks.Task DoCategoryStuffAsync (SubCategory body = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse (ModelApiResponse) + System.Threading.Tasks.Task> DoCategoryStuffAsyncWithHttpInfo (SubCategory body = null); + /// /// Find pet by ID /// /// @@ -434,8 +476,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of List<> - System.Threading.Tasks.Task> GetParrotsAsync (); + /// Task of List<Object> + System.Threading.Tasks.Task> GetParrotsAsync (); /// /// get Parrots @@ -444,8 +486,8 @@ public interface IPetApi : IApiAccessor /// /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<>) - System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo (); + /// Task of ApiResponse (List<Object>) + System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo (); /// /// Find pet by ID /// @@ -476,7 +518,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse200 - System.Threading.Tasks.Task UpdateParrotsAsync (Body1 body = null); + System.Threading.Tasks.Task UpdateParrotsAsync (ParrotBody body = null); /// /// update parrots @@ -487,7 +529,7 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse200) - System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (Body1 body = null); + System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (ParrotBody body = null); /// /// Update an existing pet /// @@ -543,8 +585,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null); + /// Task of ModelApiResponse + System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null); /// /// uploads an image @@ -555,8 +597,8 @@ public interface IPetApi : IApiAccessor /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null); + /// Task of ApiResponse (ModelApiResponse) + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null); #endregion Asynchronous Operations } @@ -674,7 +716,7 @@ public void AddDefaultHeader(string key, string value) /// Thrown when fails to make API call /// (optional) /// InlineResponse2001 - public InlineResponse2001 AddParrot (Body2 body = null) + public InlineResponse2001 AddParrot (ParrotBody1 body = null) { ApiResponse localVarResponse = AddParrotWithHttpInfo(body); return localVarResponse.Data; @@ -686,7 +728,7 @@ public InlineResponse2001 AddParrot (Body2 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse2001 - public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (Body2 body = null) + public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (ParrotBody1 body = null) { var localVarPath = "/parrot"; @@ -744,7 +786,7 @@ public ApiResponse< InlineResponse2001 > AddParrotWithHttpInfo (Body2 body = nul /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse2001 - public async System.Threading.Tasks.Task AddParrotAsync (Body2 body = null) + public async System.Threading.Tasks.Task AddParrotAsync (ParrotBody1 body = null) { ApiResponse localVarResponse = await AddParrotAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -757,7 +799,7 @@ public async System.Threading.Tasks.Task AddParrotAsync (Bod /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse2001) - public async System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (Body2 body = null) + public async System.Threading.Tasks.Task> AddParrotAsyncWithHttpInfo (ParrotBody1 body = null) { var localVarPath = "/parrot"; @@ -1111,6 +1153,147 @@ public async System.Threading.Tasks.Task> DeletePetAsyncWith null); } + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ModelApiResponse + public ModelApiResponse DoCategoryStuff (SubCategory body = null) + { + ApiResponse localVarResponse = DoCategoryStuffWithHttpInfo(body); + return localVarResponse.Data; + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > DoCategoryStuffWithHttpInfo (SubCategory body = null) + { + + var localVarPath = "/pet/category"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DoCategoryStuff", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ModelApiResponse + public async System.Threading.Tasks.Task DoCategoryStuffAsync (SubCategory body = null) + { + ApiResponse localVarResponse = await DoCategoryStuffAsyncWithHttpInfo(body); + return localVarResponse.Data; + + } + + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Task of ApiResponse (ModelApiResponse) + public async System.Threading.Tasks.Task> DoCategoryStuffAsyncWithHttpInfo (SubCategory body = null) + { + + var localVarPath = "/pet/category"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DoCategoryStuff", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); + } + /// /// Find pet by ID schedule pet feeding /// @@ -1598,10 +1781,10 @@ public async System.Threading.Tasks.Task>> FindPetsByTagsA /// get Parrots /// /// Thrown when fails to make API call - /// List<> - public List<> GetParrots () + /// List<Object> + public List GetParrots () { - ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); + ApiResponse> localVarResponse = GetParrotsWithHttpInfo(); return localVarResponse.Data; } @@ -1609,8 +1792,8 @@ public async System.Threading.Tasks.Task>> FindPetsByTagsA /// get Parrots /// /// Thrown when fails to make API call - /// ApiResponse of List<> - public ApiResponse< List<> > GetParrotsWithHttpInfo () + /// ApiResponse of List<Object> + public ApiResponse< List > GetParrotsWithHttpInfo () { var localVarPath = "/parrot"; @@ -1648,19 +1831,19 @@ public ApiResponse< List<> > GetParrotsWithHttpInfo () if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List<>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<>))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// /// get Parrots /// /// Thrown when fails to make API call - /// Task of List<> - public async System.Threading.Tasks.Task> GetParrotsAsync () + /// Task of List<Object> + public async System.Threading.Tasks.Task> GetParrotsAsync () { - ApiResponse> localVarResponse = await GetParrotsAsyncWithHttpInfo(); + ApiResponse> localVarResponse = await GetParrotsAsyncWithHttpInfo(); return localVarResponse.Data; } @@ -1669,8 +1852,8 @@ public async System.Threading.Tasks.Task> GetParrotsAsync () /// get Parrots /// /// Thrown when fails to make API call - /// Task of ApiResponse (List<>) - public async System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo () + /// Task of ApiResponse (List<Object>) + public async System.Threading.Tasks.Task>> GetParrotsAsyncWithHttpInfo () { var localVarPath = "/parrot"; @@ -1708,9 +1891,9 @@ public async System.Threading.Tasks.Task>> GetParrotsAsyncWit if (exception != null) throw exception; } - return new ApiResponse>(localVarStatusCode, + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List<>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<>))); + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// @@ -1862,7 +2045,7 @@ public async System.Threading.Tasks.Task> GetPetByIdAsyncWithHt /// Thrown when fails to make API call /// (optional) /// InlineResponse200 - public InlineResponse200 UpdateParrots (Body1 body = null) + public InlineResponse200 UpdateParrots (ParrotBody body = null) { ApiResponse localVarResponse = UpdateParrotsWithHttpInfo(body); return localVarResponse.Data; @@ -1874,7 +2057,7 @@ public InlineResponse200 UpdateParrots (Body1 body = null) /// Thrown when fails to make API call /// (optional) /// ApiResponse of InlineResponse200 - public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (Body1 body = null) + public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (ParrotBody body = null) { var localVarPath = "/parrot"; @@ -1932,7 +2115,7 @@ public ApiResponse< InlineResponse200 > UpdateParrotsWithHttpInfo (Body1 body = /// Thrown when fails to make API call /// (optional) /// Task of InlineResponse200 - public async System.Threading.Tasks.Task UpdateParrotsAsync (Body1 body = null) + public async System.Threading.Tasks.Task UpdateParrotsAsync (ParrotBody body = null) { ApiResponse localVarResponse = await UpdateParrotsAsyncWithHttpInfo(body); return localVarResponse.Data; @@ -1945,7 +2128,7 @@ public async System.Threading.Tasks.Task UpdateParrotsAsync ( /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InlineResponse200) - public async System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (Body1 body = null) + public async System.Threading.Tasks.Task> UpdateParrotsAsyncWithHttpInfo (ParrotBody body = null) { var localVarPath = "/parrot"; @@ -2313,10 +2496,10 @@ public async System.Threading.Tasks.Task> UpdatePetWithFormA /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse - public ApiResponse UploadFile (long? petId, Object body = null) + /// ModelApiResponse + public ModelApiResponse UploadFile (long? petId, Object body = null) { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); + ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, body); return localVarResponse.Data; } @@ -2326,8 +2509,8 @@ public ApiResponse UploadFile (long? petId, Object body = null) /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// ApiResponse of ApiResponse - public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) + /// ApiResponse of ModelApiResponse + public ApiResponse< ModelApiResponse > UploadFileWithHttpInfo (long? petId, Object body = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -2384,9 +2567,9 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object bo if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); } /// @@ -2395,10 +2578,10 @@ public ApiResponse< ApiResponse > UploadFileWithHttpInfo (long? petId, Object bo /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null) + /// Task of ModelApiResponse + public async System.Threading.Tasks.Task UploadFileAsync (long? petId, Object body = null) { - ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, body); + ApiResponse localVarResponse = await UploadFileAsyncWithHttpInfo(petId, body); return localVarResponse.Data; } @@ -2409,8 +2592,8 @@ public async System.Threading.Tasks.Task UploadFileAsync (long? pet /// Thrown when fails to make API call /// ID of pet to update /// (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null) + /// Task of ApiResponse (ModelApiResponse) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, Object body = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -2467,9 +2650,9 @@ public async System.Threading.Tasks.Task> UploadFileAsy if (exception != null) throw exception; } - return new ApiResponse(localVarStatusCode, + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); + (ModelApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelApiResponse))); } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs index 1b488e52fd3..b73124c8f88 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiClient.cs @@ -25,7 +25,7 @@ namespace IO.Swagger.Client /// /// API client is mainly responsible for making the HTTP call to the API backend. /// - public partial class ApiClient + public partial class ApiClient { private JsonSerializerSettings serializerSettings = new JsonSerializerSettings { @@ -231,6 +231,11 @@ public FileParameter ParameterToFile(string name, Stream stream) return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); } + public FileParameter ParameterToFile(string name, byte[] stream) + { + return FileParameter.Create(name, stream, "no_file_name_provided"); + } + /// /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. /// If parameter is a list, join the list with ",". diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs index 8383aa21a28..1081c5edae3 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiException.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Client /// /// API Exception /// - public class ApiException : Exception + public class ApiException : Exception { /// /// Gets or sets the error code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs index 10a8a3e25a4..fc72e347e1f 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ApiResponse.cs @@ -15,7 +15,7 @@ namespace IO.Swagger.Client /// /// API Response /// - public class ApiResponse + public class ApiResponse { /// /// Gets or sets the status code (HTTP status code) diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs index 761ac7a065d..8ce26cc5869 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/Configuration.cs @@ -20,7 +20,7 @@ namespace IO.Swagger.Client /// /// Represents a set of configuration settings /// - public class Configuration : IReadableConfiguration + public class Configuration : IReadableConfiguration { #region Constants @@ -119,7 +119,6 @@ public Configuration() ApiKey = new ConcurrentDictionary(); ApiKeyPrefix = new ConcurrentDictionary(); - // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; } @@ -242,14 +241,32 @@ public virtual string BasePath { /// public virtual IDictionary DefaultHeader { get; set; } + private int _timeout = 100000; /// /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. /// public virtual int Timeout { - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } + get + { + if (_apiClient == null) + { + return _timeout; + } + else + { + return ApiClient.RestClient.Timeout; + } + } + set + { + _timeout = value; + if (_apiClient != null) + { + ApiClient.RestClient.Timeout = _timeout; + } + } } /// diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs index 386c148dfdf..8151e9194f2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/ExceptionFactory.cs @@ -19,5 +19,5 @@ namespace IO.Swagger.Client /// Method name /// Response /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs index 2596d55b928..9ea748b6d92 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Client/IApiAccessor.cs @@ -19,7 +19,7 @@ namespace IO.Swagger.Client /// /// Represents configuration aspects required to interact with the API endpoints. /// - public interface IApiAccessor + public interface IApiAccessor { /// /// Gets or sets the configuration object diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec index 6e1d37c08b0..5dc0aea7fb2 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/IO.Swagger.nuspec @@ -26,7 +26,7 @@ - + diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs new file mode 100644 index 00000000000..2293396eecd --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AllOfSubCategoryCategory.cs @@ -0,0 +1,171 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryCategory + /// + [DataContract] + public partial class AllOfSubCategoryCategory : Category, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// foo. + /// bar. + /// beer. + /// drunk. + public AllOfSubCategoryCategory(bool? foo = default(bool?), int? bar = default(int?), string beer = default(string), User drunk = default(User), long? id = default(long?), string name = default(string), List subcategories = default(List)) : base(id, name, subcategories) + { + this.Foo = foo; + this.Bar = bar; + this.Beer = beer; + this.Drunk = drunk; + } + + /// + /// Gets or Sets Foo + /// + [DataMember(Name="foo", EmitDefaultValue=false)] + public bool? Foo { get; set; } + + /// + /// Gets or Sets Bar + /// + [DataMember(Name="bar", EmitDefaultValue=false)] + public int? Bar { get; set; } + + /// + /// Gets or Sets Beer + /// + [DataMember(Name="beer", EmitDefaultValue=false)] + public string Beer { get; set; } + + /// + /// Gets or Sets Drunk + /// + [DataMember(Name="drunk", EmitDefaultValue=false)] + public User Drunk { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryCategory {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Foo: ").Append(Foo).Append("\n"); + sb.Append(" Bar: ").Append(Bar).Append("\n"); + sb.Append(" Beer: ").Append(Beer).Append("\n"); + sb.Append(" Drunk: ").Append(Drunk).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryCategory); + } + + /// + /// Returns true if AllOfSubCategoryCategory instances are equal + /// + /// Instance of AllOfSubCategoryCategory to be compared + /// Boolean + public bool Equals(AllOfSubCategoryCategory input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Foo == input.Foo || + (this.Foo != null && + this.Foo.Equals(input.Foo)) + ) && base.Equals(input) && + ( + this.Bar == input.Bar || + (this.Bar != null && + this.Bar.Equals(input.Bar)) + ) && base.Equals(input) && + ( + this.Beer == input.Beer || + (this.Beer != null && + this.Beer.Equals(input.Beer)) + ) && base.Equals(input) && + ( + this.Drunk == input.Drunk || + (this.Drunk != null && + this.Drunk.Equals(input.Drunk)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Foo != null) + hashCode = hashCode * 59 + this.Foo.GetHashCode(); + if (this.Bar != null) + hashCode = hashCode * 59 + this.Bar.GetHashCode(); + if (this.Beer != null) + hashCode = hashCode * 59 + this.Beer.GetHashCode(); + if (this.Drunk != null) + hashCode = hashCode * 59 + this.Drunk.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs new file mode 100644 index 00000000000..78cdb6e7e5c --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AllOfSubCategoryPetsItems.cs @@ -0,0 +1,107 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AllOfSubCategoryPetsItems + /// + [DataContract] + public partial class AllOfSubCategoryPetsItems : Pet, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public AllOfSubCategoryPetsItems(long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AllOfSubCategoryPetsItems {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AllOfSubCategoryPetsItems); + } + + /// + /// Returns true if AllOfSubCategoryPetsItems instances are equal + /// + /// Instance of AllOfSubCategoryPetsItems to be compared + /// Boolean + public bool Equals(AllOfSubCategoryPetsItems input) + { + if (input == null) + return false; + + return base.Equals(input); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs new file mode 100644 index 00000000000..c3828a4638b --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/AnyOfparrotBodyParrotsItems.cs @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// AnyOfparrotBodyParrotsItems + /// + [DataContract] + public partial class AnyOfparrotBodyParrotsItems : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public AnyOfparrotBodyParrotsItems() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AnyOfparrotBodyParrotsItems {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as AnyOfparrotBodyParrotsItems); + } + + /// + /// Returns true if AnyOfparrotBodyParrotsItems instances are equal + /// + /// Instance of AnyOfparrotBodyParrotsItems to be compared + /// Boolean + public bool Equals(AnyOfparrotBodyParrotsItems input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs index 1a3345ea1ce..c54530ce0e8 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Cat.cs @@ -34,7 +34,7 @@ public partial class Cat : Pet, IEquatable, IValidatableObject /// /// hunts. /// age. - public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Cat(bool? hunts = default(bool?), int? age = default(int?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Hunts = hunts; this.Age = age; @@ -133,7 +133,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - foreach(var x in BaseValidate(validationContext)) yield return x; yield break; } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs index 9656b784703..6fc57708871 100644 --- a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/Dog.cs @@ -65,7 +65,7 @@ public enum BreedEnum /// /// bark. /// breed. - public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List<> part = default(List<>)) : base(id, name, status, part) + public Dog(bool? bark = default(bool?), BreedEnum? breed = default(BreedEnum?), long? id = default(long?), string name = default(string), StatusEnum? status = default(StatusEnum?), List part = default(List)) : base(id, name, status, part) { this.Bark = bark; this.Breed = breed; @@ -159,7 +159,6 @@ public override int GetHashCode() /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - foreach(var x in BaseValidate(validationContext)) yield return x; yield break; } } diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelApiResponse.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelApiResponse.cs new file mode 100644 index 00000000000..07b7c061210 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ModelApiResponse.cs @@ -0,0 +1,154 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ModelApiResponse + /// + [DataContract] + public partial class ModelApiResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// type. + /// message. + public ModelApiResponse(int? code = default(int?), string type = default(string), string message = default(string)) + { + this.Code = code; + this.Type = type; + this.Message = message; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public int? Code { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ModelApiResponse {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ModelApiResponse); + } + + /// + /// Returns true if ModelApiResponse instances are equal + /// + /// Instance of ModelApiResponse to be compared + /// Boolean + public bool Equals(ModelApiResponse input) + { + if (input == null) + return false; + + return + ( + this.Code == input.Code || + (this.Code != null && + this.Code.Equals(input.Code)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Code != null) + hashCode = hashCode * 59 + this.Code.GetHashCode(); + if (this.Type != null) + hashCode = hashCode * 59 + this.Type.GetHashCode(); + if (this.Message != null) + hashCode = hashCode * 59 + this.Message.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NullableEnumModel.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NullableEnumModel.cs new file mode 100644 index 00000000000..db0e0e97494 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/NullableEnumModel.cs @@ -0,0 +1,143 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// NullableEnumModel + /// + [DataContract] + public partial class NullableEnumModel : IEquatable, IValidatableObject + { + /// + /// Defines EnumProp + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnumPropEnum + { + /// + /// Enum A for value: a + /// + [EnumMember(Value = "a")] + A = 1, + /// + /// Enum B for value: b + /// + [EnumMember(Value = "b")] + B = 2, + /// + /// Enum Null for value: null + /// + [EnumMember(Value = null)] + Null = 3 } + /// + /// Gets or Sets EnumProp + /// + [DataMember(Name="enumProp", EmitDefaultValue=false)] + public EnumPropEnum? EnumProp { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// enumProp. + public NullableEnumModel(EnumPropEnum? enumProp = default(EnumPropEnum?)) + { + this.EnumProp = enumProp; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NullableEnumModel {\n"); + sb.Append(" EnumProp: ").Append(EnumProp).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NullableEnumModel); + } + + /// + /// Returns true if NullableEnumModel instances are equal + /// + /// Instance of NullableEnumModel to be compared + /// Boolean + public bool Equals(NullableEnumModel input) + { + if (input == null) + return false; + + return + ( + this.EnumProp == input.EnumProp || + (this.EnumProp != null && + this.EnumProp.Equals(input.EnumProp)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.EnumProp != null) + hashCode = hashCode * 59 + this.EnumProp.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ParrotBody.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ParrotBody.cs new file mode 100644 index 00000000000..1ba40dddb5f --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ParrotBody.cs @@ -0,0 +1,123 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody + /// + [DataContract] + public partial class ParrotBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// parrots. + public ParrotBody(List parrots = default(List)) + { + this.Parrots = parrots; + } + + /// + /// Gets or Sets Parrots + /// + [DataMember(Name="parrots", EmitDefaultValue=false)] + public List Parrots { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody {\n"); + sb.Append(" Parrots: ").Append(Parrots).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody); + } + + /// + /// Returns true if ParrotBody instances are equal + /// + /// Instance of ParrotBody to be compared + /// Boolean + public bool Equals(ParrotBody input) + { + if (input == null) + return false; + + return + ( + this.Parrots == input.Parrots || + this.Parrots != null && + input.Parrots != null && + this.Parrots.SequenceEqual(input.Parrots) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Parrots != null) + hashCode = hashCode * 59 + this.Parrots.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ParrotBody1.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ParrotBody1.cs new file mode 100644 index 00000000000..28760731c14 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/ParrotBody1.cs @@ -0,0 +1,106 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// ParrotBody1 + /// + [DataContract] + public partial class ParrotBody1 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public ParrotBody1() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ParrotBody1 {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ParrotBody1); + } + + /// + /// Returns true if ParrotBody1 instances are equal + /// + /// Instance of ParrotBody1 to be compared + /// Boolean + public bool Equals(ParrotBody1 input) + { + if (input == null) + return false; + + return false; + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetPetIdBody.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetPetIdBody.cs new file mode 100644 index 00000000000..9b4213539da --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/PetPetIdBody.cs @@ -0,0 +1,140 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// PetPetIdBody + /// + [DataContract] + public partial class PetPetIdBody : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Updated name of the pet. + /// Updated status of the pet. + public PetPetIdBody(string name = default(string), string status = default(string)) + { + this.Name = name; + this.Status = status; + } + + /// + /// Updated name of the pet + /// + /// Updated name of the pet + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Updated status of the pet + /// + /// Updated status of the pet + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class PetPetIdBody {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PetPetIdBody); + } + + /// + /// Returns true if PetPetIdBody instances are equal + /// + /// Instance of PetPetIdBody to be compared + /// Boolean + public bool Equals(PetPetIdBody input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Status != null) + hashCode = hashCode * 59 + this.Status.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SubCategory.cs b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SubCategory.cs new file mode 100644 index 00000000000..bf8a7850711 --- /dev/null +++ b/samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Model/SubCategory.cs @@ -0,0 +1,155 @@ +/* + * Swagger Petstore + * + * This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; + +namespace IO.Swagger.Model +{ + /// + /// SubCategory + /// + [DataContract] + public partial class SubCategory : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// category. + /// category2. + /// pets. + public SubCategory(AllOfSubCategoryCategory category = default(AllOfSubCategoryCategory), Category category2 = default(Category), List pets = default(List)) + { + this.Category = category; + this.Category2 = category2; + this.Pets = pets; + } + + /// + /// Gets or Sets Category + /// + [DataMember(Name="category", EmitDefaultValue=false)] + public AllOfSubCategoryCategory Category { get; set; } + + /// + /// Gets or Sets Category2 + /// + [DataMember(Name="category2", EmitDefaultValue=false)] + public Category Category2 { get; set; } + + /// + /// Gets or Sets Pets + /// + [DataMember(Name="pets", EmitDefaultValue=false)] + public List Pets { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class SubCategory {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Category2: ").Append(Category2).Append("\n"); + sb.Append(" Pets: ").Append(Pets).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as SubCategory); + } + + /// + /// Returns true if SubCategory instances are equal + /// + /// Instance of SubCategory to be compared + /// Boolean + public bool Equals(SubCategory input) + { + if (input == null) + return false; + + return + ( + this.Category == input.Category || + (this.Category != null && + this.Category.Equals(input.Category)) + ) && + ( + this.Category2 == input.Category2 || + (this.Category2 != null && + this.Category2.Equals(input.Category2)) + ) && + ( + this.Pets == input.Pets || + this.Pets != null && + input.Pets != null && + this.Pets.SequenceEqual(input.Pets) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Category != null) + hashCode = hashCode * 59 + this.Category.GetHashCode(); + if (this.Category2 != null) + hashCode = hashCode * 59 + this.Category2.GetHashCode(); + if (this.Pets != null) + hashCode = hashCode * 59 + this.Pets.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +}