diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java index 76c0d1277b1..df23c1f2275 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java @@ -89,7 +89,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co "Int64", "Float", "Guid", - "Stream", // not really a primitive, we include it to avoid model import + "System.IO.Stream", // not really a primitive, we include it to avoid model import "Object") ); @@ -110,7 +110,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co typeMapping.put("number", "double?"); typeMapping.put("datetime", "DateTime?"); typeMapping.put("date", "DateTime?"); - typeMapping.put("file", "Stream"); + typeMapping.put("file", "System.IO.Stream"); typeMapping.put("array", "List"); typeMapping.put("list", "List"); typeMapping.put("map", "Dictionary"); diff --git a/modules/swagger-codegen/src/main/resources/csharp/api.mustache b/modules/swagger-codegen/src/main/resources/csharp/api.mustache index 18c675d6350..85af270c213 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api.mustache @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs new file mode 100644 index 00000000000..861ca5fe026 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs @@ -0,0 +1,64 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing Animal + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class AnimalTests + { + private Animal instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Animal(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Animal + /// + [Test] + public void AnimalInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Animal"); + } + + /// + /// Test the property 'ClassName' + /// + [Test] + public void ClassNameTest() + { + // TODO: unit test for the property 'ClassName' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs new file mode 100644 index 00000000000..15cc1ab22de --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs @@ -0,0 +1,72 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing Cat + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CatTests + { + private Cat instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Cat(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Cat + /// + [Test] + public void CatInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Cat"); + } + + /// + /// Test the property 'ClassName' + /// + [Test] + public void ClassNameTest() + { + // TODO: unit test for the property 'ClassName' + } + /// + /// Test the property 'Declawed' + /// + [Test] + public void DeclawedTest() + { + // TODO: unit test for the property 'Declawed' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs new file mode 100644 index 00000000000..33aa6cb51af --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs @@ -0,0 +1,72 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing Dog + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DogTests + { + private Dog instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new Dog(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Dog + /// + [Test] + public void DogInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a Dog"); + } + + /// + /// Test the property 'ClassName' + /// + [Test] + public void ClassNameTest() + { + // TODO: unit test for the property 'ClassName' + } + /// + /// Test the property 'Breed' + /// + [Test] + public void BreedTest() + { + // TODO: unit test for the property 'Breed' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs new file mode 100644 index 00000000000..a6eec919779 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs @@ -0,0 +1,152 @@ +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using IO.Swagger.Api; +using IO.Swagger.Model; +using IO.Swagger.Client; +using System.Reflection; + +namespace IO.Swagger.Test +{ + /// + /// Class for testing FormatTest + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class FormatTestTests + { + private FormatTest instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + instance = new FormatTest(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of FormatTest + /// + [Test] + public void FormatTestInstanceTest() + { + Assert.IsInstanceOf (instance, "instance is a FormatTest"); + } + + /// + /// 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 '_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' + } + + } + +} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs index 4e03a3ef4f9..a4930b02df3 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs @@ -51,12 +51,20 @@ namespace IO.Swagger.Test } /// - /// Test the property 'Tags' + /// Test the property 'PhotoUrls' /// [Test] - public void TagsTest() + public void PhotoUrlsTest() { - // TODO: unit test for the property 'Tags' + // TODO: unit test for the property 'PhotoUrls' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO: unit test for the property 'Name' } /// /// Test the property 'Id' @@ -75,6 +83,14 @@ namespace IO.Swagger.Test // TODO: unit test for the property 'Category' } /// + /// Test the property 'Tags' + /// + [Test] + public void TagsTest() + { + // TODO: unit test for the property 'Tags' + } + /// /// Test the property 'Status' /// [Test] @@ -82,22 +98,6 @@ namespace IO.Swagger.Test { // TODO: unit test for the property 'Status' } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO: unit test for the property 'Name' - } - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO: unit test for the property 'PhotoUrls' - } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs index 67d8241ee91..76a0dac0944 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs @@ -185,7 +185,7 @@ string status = null; // TODO: replace null with proper value // TODO: add unit test for the method 'UploadFile' long? petId = null; // TODO: replace null with proper value string additionalMetadata = null; // TODO: replace null with proper value -Stream file = null; // TODO: replace null with proper value +System.IO.Stream file = null; // TODO: replace null with proper value instance.UploadFile(petId, additionalMetadata, file); } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs index 0ae16d2122f..4b347121cb0 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -242,7 +241,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// - void UploadFile (long? petId, string additionalMetadata = null, Stream file = null); + void UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null); /// /// uploads an image @@ -255,7 +254,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of Object(void) - ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null); + ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); #endregion Synchronous Operations #region Asynchronous Operations /// @@ -485,7 +484,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of void - System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null); + System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null); /// /// uploads an image @@ -498,7 +497,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null); + System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null); #endregion Asynchronous Operations } @@ -1417,18 +1416,18 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); - } - // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } + // authentication (api_key) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) + { + localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); + } + // make the HTTP request IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, @@ -1500,17 +1499,17 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); - } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } + // authentication (api_key) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) + { + localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); + } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, @@ -1581,18 +1580,18 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); - } - // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } + // authentication (api_key) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) + { + localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); + } + // make the HTTP request IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, @@ -1664,17 +1663,17 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); - } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } + // authentication (api_key) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) + { + localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); + } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, @@ -1745,18 +1744,18 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); - } - // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } + // authentication (api_key) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) + { + localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); + } + // make the HTTP request IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, @@ -1828,17 +1827,17 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - // authentication (api_key) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); - } // authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } + // authentication (api_key) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("api_key"))) + { + localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); + } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, @@ -2194,7 +2193,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// - public void UploadFile (long? petId, string additionalMetadata = null, Stream file = null) + public void UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null) { UploadFileWithHttpInfo(petId, additionalMetadata, file); } @@ -2207,7 +2206,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// ApiResponse of Object(void) - public ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null) + public ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null) { // verify the required parameter 'petId' is set if (petId == null) @@ -2276,7 +2275,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of void - public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, Stream file = null) + public async System.Threading.Tasks.Task UploadFileAsync (long? petId, string additionalMetadata = null, System.IO.Stream file = null) { await UploadFileAsyncWithHttpInfo(petId, additionalMetadata, file); @@ -2290,7 +2289,7 @@ namespace IO.Swagger.Api /// Additional data to pass to server (optional) /// file to upload (optional) /// Task of ApiResponse - public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null) + public async System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null) { // verify the required parameter 'petId' is set if (petId == null) diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs index dfb33ebc0a6..224db89c53c 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -978,18 +977,18 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter - // authentication (test_api_key_header) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header"))) - { - localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header"); - } - // authentication (test_api_key_query) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query"))) { localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query"); } + // authentication (test_api_key_header) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header"))) + { + localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header"); + } + // make the HTTP request IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, @@ -1061,16 +1060,16 @@ namespace IO.Swagger.Api localVarPathParams.Add("format", "json"); if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter - // authentication (test_api_key_header) required - if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header"))) - { - localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header"); - } // authentication (test_api_key_query) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_query"))) { localVarQueryParams["test_api_key_query"] = Configuration.GetApiKeyWithPrefix("test_api_key_query"); } + // authentication (test_api_key_header) required + if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("test_api_key_header"))) + { + localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header"); + } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs index 1426f315ea2..d75732e4a4b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs index c2bdc8c48ab..e98ca7342cc 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/InlineResponse200.cs @@ -47,14 +47,14 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// Initializes a new instance of the class. /// - /// Tags. + /// PhotoUrls. + /// Name. /// Id (required). /// Category. + /// Tags. /// pet status in the store. - /// Name. - /// PhotoUrls. - public InlineResponse200(List Tags = null, long? Id = null, Object Category = null, StatusEnum? Status = null, string Name = null, List PhotoUrls = null) + public InlineResponse200(List PhotoUrls = null, string Name = null, long? Id = null, Object Category = null, List Tags = null, StatusEnum? Status = null) { // to ensure "Id" is required (not null) if (Id == null) @@ -65,20 +65,26 @@ namespace IO.Swagger.Model { this.Id = Id; } - this.Tags = Tags; - this.Category = Category; - this.Status = Status; - this.Name = Name; this.PhotoUrls = PhotoUrls; + this.Name = Name; + this.Category = Category; + this.Tags = Tags; + this.Status = Status; } /// - /// Gets or Sets Tags + /// Gets or Sets PhotoUrls /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } + [DataMember(Name="photoUrls", EmitDefaultValue=false)] + public List PhotoUrls { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } /// /// Gets or Sets Id @@ -93,16 +99,10 @@ namespace IO.Swagger.Model public Object Category { get; set; } /// - /// Gets or Sets Name + /// Gets or Sets Tags /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=false)] - public List PhotoUrls { get; set; } + [DataMember(Name="tags", EmitDefaultValue=false)] + public List Tags { get; set; } /// /// Returns the string presentation of the object @@ -112,12 +112,12 @@ namespace IO.Swagger.Model { var sb = new StringBuilder(); sb.Append("class InlineResponse200 {\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -155,9 +155,14 @@ namespace IO.Swagger.Model return ( - this.Tags == other.Tags || - this.Tags != null && - this.Tags.SequenceEqual(other.Tags) + this.PhotoUrls == other.PhotoUrls || + this.PhotoUrls != null && + this.PhotoUrls.SequenceEqual(other.PhotoUrls) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) ) && ( this.Id == other.Id || @@ -169,20 +174,15 @@ namespace IO.Swagger.Model this.Category != null && this.Category.Equals(other.Category) ) && + ( + this.Tags == other.Tags || + this.Tags != null && + this.Tags.SequenceEqual(other.Tags) + ) && ( this.Status == other.Status || this.Status != null && this.Status.Equals(other.Status) - ) && - ( - this.Name == other.Name || - this.Name != null && - this.Name.Equals(other.Name) - ) && - ( - this.PhotoUrls == other.PhotoUrls || - this.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(other.PhotoUrls) ); } @@ -197,18 +197,18 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Tags != null) - hash = hash * 59 + this.Tags.GetHashCode(); + if (this.PhotoUrls != null) + hash = hash * 59 + this.PhotoUrls.GetHashCode(); + if (this.Name != null) + hash = hash * 59 + this.Name.GetHashCode(); if (this.Id != null) hash = hash * 59 + this.Id.GetHashCode(); if (this.Category != null) hash = hash * 59 + this.Category.GetHashCode(); + if (this.Tags != null) + hash = hash * 59 + this.Tags.GetHashCode(); if (this.Status != null) hash = hash * 59 + this.Status.GetHashCode(); - if (this.Name != null) - hash = hash * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hash = hash * 59 + this.PhotoUrls.GetHashCode(); return hash; } }