diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache index f359e07fcb1..75f43b8aa1c 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache @@ -63,7 +63,7 @@ namespace {{packageName}}.Client /// The default API client. [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] public static ApiClient Default; - + /// /// Gets or sets the Configuration. /// @@ -75,7 +75,7 @@ namespace {{packageName}}.Client /// /// An instance of the RestClient public RestClient RestClient { get; set; } - + // Creates and sets up a RestRequest prior to a call. private RestRequest PrepareRequest( String path, RestSharp.Method method, Dictionary queryParams, Object postBody, @@ -87,7 +87,7 @@ namespace {{packageName}}.Client // add path parameter, if any foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); // add header parameter, if any foreach(var param in headerParams) @@ -116,7 +116,7 @@ namespace {{packageName}}.Client request.AddParameter(contentType, postBody, ParameterType.RequestBody); } } - + return request; } @@ -177,7 +177,7 @@ namespace {{packageName}}.Client var response = await RestClient.ExecuteTaskAsync(request); return (Object)response; }{{/supportsAsync}} - + /// /// Escape string (url-encoded). /// @@ -187,7 +187,7 @@ namespace {{packageName}}.Client { return UrlEncode(str); } - + /// /// Create FileParameter based on Stream. /// @@ -201,7 +201,7 @@ namespace {{packageName}}.Client else return FileParameter.Create(name, ReadAsBytes(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 ",". @@ -222,7 +222,7 @@ namespace {{packageName}}.Client // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); else if (obj is IList) { var flattenedString = new StringBuilder(); @@ -237,7 +237,7 @@ namespace {{packageName}}.Client else return Convert.ToString (obj); } - + /// /// Deserialize the JSON string into a proper object. /// @@ -282,9 +282,9 @@ namespace {{packageName}}.Client if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type { - return ConvertType(response.Content, type); + return ConvertType(response.Content, type); } - + // at this point, it must be a model (json) try { @@ -295,7 +295,7 @@ namespace {{packageName}}.Client throw new ApiException(500, e.Message); } } - + /// /// Serialize an input (model) into JSON string /// @@ -312,7 +312,7 @@ namespace {{packageName}}.Client throw new ApiException(500, e.Message); } } - + /// /// Select the Content-Type header's value from the given content-type array: /// if JSON exists in the given array, use it; @@ -348,7 +348,7 @@ namespace {{packageName}}.Client return String.Join(",", accepts); } - + /// /// Encode string in base64 format. /// @@ -358,7 +358,7 @@ namespace {{packageName}}.Client { return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } - + /// /// Dynamically cast the object into target type. /// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache index 8e56fb31f43..e6185abc162 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiException.mustache @@ -12,18 +12,18 @@ namespace {{packageName}}.Client /// /// The error code (HTTP status code). public int ErrorCode { get; set; } - + /// /// Gets or sets the error content (body json object) /// /// The error content (Http response body). public {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} ErrorContent { get; private set; } - + /// /// Initializes a new instance of the class. /// public ApiException() {} - + /// /// Initializes a new instance of the class. /// @@ -33,7 +33,7 @@ namespace {{packageName}}.Client { this.ErrorCode = errorCode; } - + /// /// Initializes a new instance of the class. /// @@ -46,5 +46,5 @@ namespace {{packageName}}.Client this.ErrorContent = errorContent; } } - + } diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache index c4317c35b65..4b9f0a3a43c 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiResponse.mustache @@ -13,19 +13,19 @@ namespace {{packageName}}.Client /// /// The status code. public int StatusCode { get; private set; } - + /// /// Gets or sets the HTTP headers /// /// HTTP headers public IDictionary Headers { get; private set; } - + /// /// Gets or sets the data (parsed HTTP body) /// /// The data. public T Data { get; private set; } - + /// /// Initializes a new instance of the class. /// @@ -38,7 +38,7 @@ namespace {{packageName}}.Client this.Headers = headers; this.Data = data; } - + } - + } diff --git a/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache b/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache index f9c492a28ec..6cec586b453 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/Configuration.mustache @@ -87,7 +87,7 @@ namespace {{packageName}}.Client { get { return ApiClient.RestClient.Timeout; } - set + set { if (ApiClient != null) ApiClient.RestClient.Timeout = value; @@ -220,7 +220,7 @@ namespace {{packageName}}.Client } // create the directory if it does not exist - if (!Directory.Exists(value)) + if (!Directory.Exists(value)) Directory.CreateDirectory(value); // check if the path contains directory separator at the end diff --git a/modules/swagger-codegen/src/main/resources/csharp/api.mustache b/modules/swagger-codegen/src/main/resources/csharp/api.mustache index 02c6e0ad2b3..e5b497b31e2 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api.mustache @@ -28,7 +28,7 @@ namespace {{packageName}}.Api {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// {{#returnType}}{{returnType}}{{/returnType}} {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); - + /// /// {{summary}} /// @@ -69,7 +69,7 @@ namespace {{packageName}}.Api #endregion Asynchronous Operations {{/supportsAsync}} } - + /// /// Represents a collection of functions to interact with the API endpoints /// @@ -89,7 +89,7 @@ namespace {{packageName}}.Api this.Configuration.ApiClient.Configuration = this.Configuration; } } - + /// /// Initializes a new instance of the class /// using Configuration object @@ -99,7 +99,7 @@ namespace {{packageName}}.Api public {{classname}}(Configuration configuration = null) { if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; + this.Configuration = Configuration.Default; else this.Configuration = configuration; @@ -128,7 +128,7 @@ namespace {{packageName}}.Api { // do nothing } - + /// /// Gets or sets the configuration object /// @@ -156,13 +156,13 @@ namespace {{packageName}}.Api { this.Configuration.AddDefaultHeader(key, value); } - + {{#operation}} /// /// {{summary}} {{notes}} /// /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// {{#returnType}}{{returnType}}{{/returnType}} public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { @@ -174,7 +174,7 @@ namespace {{packageName}}.Api /// {{summary}} {{notes}} /// /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}}/// ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}} public ApiResponse<{{#returnType}} {{{returnType}}} {{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { @@ -183,9 +183,9 @@ namespace {{packageName}}.Api if ({{paramName}} == null) throw new ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); {{/required}}{{/allParams}} - + var localVarPath = "{{path}}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -248,19 +248,19 @@ namespace {{packageName}}.Api localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; }{{/isOAuth}} {{/authMethods}} - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling {{operationId}}: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling {{operationId}}: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + {{#returnType}}return new ApiResponse<{{{returnType}}}>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), ({{{returnType}}}) Configuration.ApiClient.Deserialize(localVarResponse, typeof({{#returnContainer}}{{{returnContainer}}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}})));{{/returnType}} @@ -294,9 +294,9 @@ namespace {{packageName}}.Api {{#allParams}}{{#required}}// verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) throw new ApiException(400, "Missing required parameter '{{paramName}}' when calling {{operationId}}"); {{/required}}{{/allParams}} - + var localVarPath = "{{path}}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -362,12 +362,12 @@ namespace {{packageName}}.Api {{/authMethods}} // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling {{operationId}}: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache index d44ebca31b5..5f5a03aa612 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_test.mustache @@ -64,7 +64,7 @@ namespace {{packageName}}.Test {{#allParams}}{{{dataType}}} {{paramName}} = null; // TODO: replace null with proper value {{/allParams}} {{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); - {{#returnType}}Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}} + {{#returnType}}Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}} } {{/operation}}{{/operations}} } diff --git a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache index 68199991671..76b94cad5a1 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/compile.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/compile.mustache @@ -1,14 +1,14 @@ -@echo off - -{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}} -{{^supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5{{/supportsAsync}} - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" -.\nuget.exe install vendor/packages.config -o vendor - -if not exist ".\bin" mkdir bin - -copy vendor\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy vendor\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll bin\RestSharp.dll - -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\{{packageName}}.dll /recurse:src\*.cs /doc:bin\{{packageName}}.xml +@echo off + +{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}} +{{^supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5{{/supportsAsync}} + +if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" +.\nuget.exe install vendor/packages.config -o vendor + +if not exist ".\bin" mkdir bin + +copy vendor\Newtonsoft.Json.8.0.2\lib\{{targetFrameworkNuget}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy vendor\RestSharp.105.1.0\lib\{{targetFrameworkNuget}}\RestSharp.dll bin\RestSharp.dll + +%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\{{packageName}}.dll /recurse:src\*.cs /doc:bin\{{packageName}}.xml diff --git a/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache b/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache index e153ce23ecf..a9b0f28edfb 100755 --- a/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/git_push.sh.mustache @@ -28,7 +28,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote diff --git a/modules/swagger-codegen/src/main/resources/csharp/gitignore.mustache b/modules/swagger-codegen/src/main/resources/csharp/gitignore.mustache index 754beb8bedc..56fef626922 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/gitignore.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/gitignore.mustache @@ -146,7 +146,7 @@ UpgradeLog*.htm *.txt~ *.swp *.swo - + # svn .svn diff --git a/modules/swagger-codegen/src/main/resources/csharp/model.mustache b/modules/swagger-codegen/src/main/resources/csharp/model.mustache index 4f33807f978..a3c289cdbb3 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model.mustache @@ -19,7 +19,7 @@ namespace {{packageName}}.Model [DataContract] public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}> { {{#vars}}{{#isEnum}} - + /// /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}} /// {{#description}} @@ -64,7 +64,7 @@ namespace {{packageName}}.Model {{/defaultValue}}{{^defaultValue}}this.{{name}} = {{name}}; {{/defaultValue}}{{/required}}{{/isReadOnly}}{{/vars}} } - + {{#vars}}{{^isEnum}} /// /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}} @@ -86,7 +86,7 @@ namespace {{packageName}}.Model sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// diff --git a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache index c2e8d948050..0d20b9f03a3 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model_test.mustache @@ -33,7 +33,7 @@ namespace {{packageName}}.Test { instance = new {{classname}}(); } - + /// /// Clean up after each test /// @@ -41,7 +41,7 @@ namespace {{packageName}}.Test public void Cleanup() { - } + } /// /// Test an instance of {{classname}} @@ -54,12 +54,12 @@ namespace {{packageName}}.Test {{#vars}} /// - /// Test the property '{{name}}' + /// Test the property '{{name}}' /// [Test] public void {{name}}Test() { - // TODO: unit test for the property '{{name}}' + // TODO: unit test for the property '{{name}}' } {{/vars}} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs index e0216f3fb0f..96e5d946c0b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CategoryTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new Category(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of Category @@ -50,25 +50,22 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a Category"); } - /// - /// Test the property 'Id' + /// Test the property 'Id' /// [Test] public void IdTest() { - // TODO: unit test for the property 'Id' + // TODO: unit test for the property 'Id' } - /// - /// Test the property 'Name' + /// Test the property 'Name' /// [Test] public void NameTest() { - // TODO: unit test for the property 'Name' + // TODO: unit test for the property 'Name' } - } 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 34cd5b1beb5..4e03a3ef4f9 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new InlineResponse200(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of InlineResponse200 @@ -50,61 +50,54 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a InlineResponse200"); } - /// - /// Test the property 'Tags' + /// Test the property 'Tags' /// [Test] public void TagsTest() { - // TODO: unit test for the property 'Tags' + // TODO: unit test for the property 'Tags' } - /// - /// Test the property 'Id' + /// Test the property 'Id' /// [Test] public void IdTest() { - // TODO: unit test for the property 'Id' + // TODO: unit test for the property 'Id' } - /// - /// Test the property 'Category' + /// Test the property 'Category' /// [Test] public void CategoryTest() { - // TODO: unit test for the property 'Category' + // TODO: unit test for the property 'Category' } - /// - /// Test the property 'Status' + /// Test the property 'Status' /// [Test] public void StatusTest() { - // TODO: unit test for the property 'Status' + // TODO: unit test for the property 'Status' } - /// - /// Test the property 'Name' + /// Test the property 'Name' /// [Test] public void NameTest() { - // TODO: unit test for the property 'Name' + // TODO: unit test for the property 'Name' } - /// - /// Test the property 'PhotoUrls' + /// Test the property 'PhotoUrls' /// [Test] public void PhotoUrlsTest() { - // TODO: unit test for the property 'PhotoUrls' + // TODO: unit test for the property 'PhotoUrls' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/Model200ResponseTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/Model200ResponseTests.cs index 00c583ec019..eb55902a998 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/Model200ResponseTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new Model200Response(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of Model200Response @@ -50,16 +50,14 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a Model200Response"); } - /// - /// Test the property 'Name' + /// Test the property 'Name' /// [Test] public void NameTest() { - // TODO: unit test for the property 'Name' + // TODO: unit test for the property 'Name' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ModelReturnTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ModelReturnTests.cs index ed64fa0d8c8..1c620b73241 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ModelReturnTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/ModelReturnTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new ModelReturn(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of ModelReturn @@ -50,16 +50,14 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a ModelReturn"); } - /// - /// Test the property '_Return' + /// Test the property '_Return' /// [Test] public void _ReturnTest() { - // TODO: unit test for the property '_Return' + // TODO: unit test for the property '_Return' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs index 561197ab9f1..896cb8f12bf 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new Name(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of Name @@ -50,25 +50,22 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a Name"); } - /// - /// Test the property '_Name' + /// Test the property '_Name' /// [Test] public void _NameTest() { - // TODO: unit test for the property '_Name' + // TODO: unit test for the property '_Name' } - /// - /// Test the property 'SnakeCase' + /// Test the property 'SnakeCase' /// [Test] public void SnakeCaseTest() { - // TODO: unit test for the property 'SnakeCase' + // TODO: unit test for the property 'SnakeCase' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs index b9540112766..9363c7409e4 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/OrderTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new Order(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of Order @@ -50,61 +50,54 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a Order"); } - /// - /// Test the property 'Id' + /// Test the property 'Id' /// [Test] public void IdTest() { - // TODO: unit test for the property 'Id' + // TODO: unit test for the property 'Id' } - /// - /// Test the property 'PetId' + /// Test the property 'PetId' /// [Test] public void PetIdTest() { - // TODO: unit test for the property 'PetId' + // TODO: unit test for the property 'PetId' } - /// - /// Test the property 'Quantity' + /// Test the property 'Quantity' /// [Test] public void QuantityTest() { - // TODO: unit test for the property 'Quantity' + // TODO: unit test for the property 'Quantity' } - /// - /// Test the property 'ShipDate' + /// Test the property 'ShipDate' /// [Test] public void ShipDateTest() { - // TODO: unit test for the property 'ShipDate' + // TODO: unit test for the property 'ShipDate' } - /// - /// Test the property 'Status' + /// Test the property 'Status' /// [Test] public void StatusTest() { - // TODO: unit test for the property 'Status' + // TODO: unit test for the property 'Status' } - /// - /// Test the property 'Complete' + /// Test the property 'Complete' /// [Test] public void CompleteTest() { - // TODO: unit test for the property 'Complete' + // TODO: unit test for the property 'Complete' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs index 081e046118f..67d8241ee91 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs @@ -61,9 +61,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'AddPet' Pet body = null; // TODO: replace null with proper value - instance.AddPet(body); - + } /// @@ -74,9 +73,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'AddPetUsingByteArray' byte[] body = null; // TODO: replace null with proper value - instance.AddPetUsingByteArray(body); - + } /// @@ -87,10 +85,9 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'DeletePet' long? petId = null; // TODO: replace null with proper value - string apiKey = null; // TODO: replace null with proper value - +string apiKey = null; // TODO: replace null with proper value instance.DeletePet(petId, apiKey); - + } /// @@ -101,9 +98,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'FindPetsByStatus' List status = null; // TODO: replace null with proper value - var response = instance.FindPetsByStatus(status); - Assert.IsInstanceOf> (response, "response is List"); + Assert.IsInstanceOf> (response, "response is List"); } /// @@ -114,9 +110,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'FindPetsByTags' List tags = null; // TODO: replace null with proper value - var response = instance.FindPetsByTags(tags); - Assert.IsInstanceOf> (response, "response is List"); + Assert.IsInstanceOf> (response, "response is List"); } /// @@ -127,9 +122,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'GetPetById' long? petId = null; // TODO: replace null with proper value - var response = instance.GetPetById(petId); - Assert.IsInstanceOf (response, "response is Pet"); + Assert.IsInstanceOf (response, "response is Pet"); } /// @@ -140,9 +134,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'GetPetByIdInObject' long? petId = null; // TODO: replace null with proper value - var response = instance.GetPetByIdInObject(petId); - Assert.IsInstanceOf (response, "response is InlineResponse200"); + Assert.IsInstanceOf (response, "response is InlineResponse200"); } /// @@ -153,9 +146,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'PetPetIdtestingByteArraytrueGet' long? petId = null; // TODO: replace null with proper value - var response = instance.PetPetIdtestingByteArraytrueGet(petId); - Assert.IsInstanceOf (response, "response is byte[]"); + Assert.IsInstanceOf (response, "response is byte[]"); } /// @@ -166,9 +158,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'UpdatePet' Pet body = null; // TODO: replace null with proper value - instance.UpdatePet(body); - + } /// @@ -179,11 +170,10 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'UpdatePetWithForm' string petId = null; // TODO: replace null with proper value - string name = null; // TODO: replace null with proper value - string status = null; // TODO: replace null with proper value - +string name = null; // TODO: replace null with proper value +string status = null; // TODO: replace null with proper value instance.UpdatePetWithForm(petId, name, status); - + } /// @@ -194,11 +184,10 @@ namespace IO.Swagger.Test { // 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 - +string additionalMetadata = null; // TODO: replace null with proper value +Stream file = null; // TODO: replace null with proper value instance.UploadFile(petId, additionalMetadata, file); - + } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs index ebbf7476264..d016d3500a4 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new Pet(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of Pet @@ -50,61 +50,54 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a Pet"); } - /// - /// Test the property 'Id' + /// Test the property 'Id' /// [Test] public void IdTest() { - // TODO: unit test for the property 'Id' + // TODO: unit test for the property 'Id' } - /// - /// Test the property 'Category' + /// Test the property 'Category' /// [Test] public void CategoryTest() { - // TODO: unit test for the property 'Category' + // TODO: unit test for the property 'Category' } - /// - /// Test the property 'Name' + /// Test the property 'Name' /// [Test] public void NameTest() { - // TODO: unit test for the property 'Name' + // TODO: unit test for the property 'Name' } - /// - /// Test the property 'PhotoUrls' + /// Test the property 'PhotoUrls' /// [Test] public void PhotoUrlsTest() { - // TODO: unit test for the property 'PhotoUrls' + // TODO: unit test for the property 'PhotoUrls' } - /// - /// Test the property 'Tags' + /// Test the property 'Tags' /// [Test] public void TagsTest() { - // TODO: unit test for the property 'Tags' + // TODO: unit test for the property 'Tags' } - /// - /// Test the property 'Status' + /// Test the property 'Status' /// [Test] public void StatusTest() { - // TODO: unit test for the property 'Status' + // TODO: unit test for the property 'Status' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/SpecialModelNameTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/SpecialModelNameTests.cs index 92acadc9404..21051e71f54 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/SpecialModelNameTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new SpecialModelName(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of SpecialModelName @@ -50,16 +50,14 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a SpecialModelName"); } - /// - /// Test the property 'SpecialPropertyName' + /// Test the property 'SpecialPropertyName' /// [Test] public void SpecialPropertyNameTest() { - // TODO: unit test for the property 'SpecialPropertyName' + // TODO: unit test for the property 'SpecialPropertyName' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs index 435da36ef02..1d3e1c53815 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/StoreApiTests.cs @@ -61,9 +61,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'DeleteOrder' string orderId = null; // TODO: replace null with proper value - instance.DeleteOrder(orderId); - + } /// @@ -74,9 +73,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'FindOrdersByStatus' string status = null; // TODO: replace null with proper value - var response = instance.FindOrdersByStatus(status); - Assert.IsInstanceOf> (response, "response is List"); + Assert.IsInstanceOf> (response, "response is List"); } /// @@ -86,9 +84,8 @@ namespace IO.Swagger.Test public void GetInventoryTest() { // TODO: add unit test for the method 'GetInventory' - - var response = instance.GetInventory(); - Assert.IsInstanceOf> (response, "response is Dictionary"); + var response = instance.GetInventory(); + Assert.IsInstanceOf> (response, "response is Dictionary"); } /// @@ -98,9 +95,8 @@ namespace IO.Swagger.Test public void GetInventoryInObjectTest() { // TODO: add unit test for the method 'GetInventoryInObject' - - var response = instance.GetInventoryInObject(); - Assert.IsInstanceOf (response, "response is Object"); + var response = instance.GetInventoryInObject(); + Assert.IsInstanceOf (response, "response is Object"); } /// @@ -111,9 +107,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'GetOrderById' string orderId = null; // TODO: replace null with proper value - var response = instance.GetOrderById(orderId); - Assert.IsInstanceOf (response, "response is Order"); + Assert.IsInstanceOf (response, "response is Order"); } /// @@ -124,9 +119,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'PlaceOrder' Order body = null; // TODO: replace null with proper value - var response = instance.PlaceOrder(body); - Assert.IsInstanceOf (response, "response is Order"); + Assert.IsInstanceOf (response, "response is Order"); } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs index 36ca5b5c0c9..4fff0e4c12d 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/TagTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new Tag(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of Tag @@ -50,25 +50,22 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a Tag"); } - /// - /// Test the property 'Id' + /// Test the property 'Id' /// [Test] public void IdTest() { - // TODO: unit test for the property 'Id' + // TODO: unit test for the property 'Id' } - /// - /// Test the property 'Name' + /// Test the property 'Name' /// [Test] public void NameTest() { - // TODO: unit test for the property 'Name' + // TODO: unit test for the property 'Name' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs index 46ff75386d7..10caebdfe4f 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserApiTests.cs @@ -61,9 +61,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'CreateUser' User body = null; // TODO: replace null with proper value - instance.CreateUser(body); - + } /// @@ -74,9 +73,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'CreateUsersWithArrayInput' List body = null; // TODO: replace null with proper value - instance.CreateUsersWithArrayInput(body); - + } /// @@ -87,9 +85,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'CreateUsersWithListInput' List body = null; // TODO: replace null with proper value - instance.CreateUsersWithListInput(body); - + } /// @@ -100,9 +97,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'DeleteUser' string username = null; // TODO: replace null with proper value - instance.DeleteUser(username); - + } /// @@ -113,9 +109,8 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'GetUserByName' string username = null; // TODO: replace null with proper value - var response = instance.GetUserByName(username); - Assert.IsInstanceOf (response, "response is User"); + Assert.IsInstanceOf (response, "response is User"); } /// @@ -126,10 +121,9 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'LoginUser' string username = null; // TODO: replace null with proper value - string password = null; // TODO: replace null with proper value - +string password = null; // TODO: replace null with proper value var response = instance.LoginUser(username, password); - Assert.IsInstanceOf (response, "response is string"); + Assert.IsInstanceOf (response, "response is string"); } /// @@ -139,9 +133,8 @@ namespace IO.Swagger.Test public void LogoutUserTest() { // TODO: add unit test for the method 'LogoutUser' + instance.LogoutUser(); - instance.LogoutUser(); - } /// @@ -152,10 +145,9 @@ namespace IO.Swagger.Test { // TODO: add unit test for the method 'UpdateUser' string username = null; // TODO: replace null with proper value - User body = null; // TODO: replace null with proper value - +User body = null; // TODO: replace null with proper value instance.UpdateUser(username, body); - + } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs index 645a4a9c69c..38f2667c403 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/UserTests.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Test { instance = new User(); } - + /// /// Clean up after each test /// @@ -39,7 +39,7 @@ namespace IO.Swagger.Test public void Cleanup() { - } + } /// /// Test an instance of User @@ -50,79 +50,70 @@ namespace IO.Swagger.Test Assert.IsInstanceOf (instance, "instance is a User"); } - /// - /// Test the property 'Id' + /// Test the property 'Id' /// [Test] public void IdTest() { - // TODO: unit test for the property 'Id' + // TODO: unit test for the property 'Id' } - /// - /// Test the property 'Username' + /// Test the property 'Username' /// [Test] public void UsernameTest() { - // TODO: unit test for the property 'Username' + // TODO: unit test for the property 'Username' } - /// - /// Test the property 'FirstName' + /// Test the property 'FirstName' /// [Test] public void FirstNameTest() { - // TODO: unit test for the property 'FirstName' + // TODO: unit test for the property 'FirstName' } - /// - /// Test the property 'LastName' + /// Test the property 'LastName' /// [Test] public void LastNameTest() { - // TODO: unit test for the property 'LastName' + // TODO: unit test for the property 'LastName' } - /// - /// Test the property 'Email' + /// Test the property 'Email' /// [Test] public void EmailTest() { - // TODO: unit test for the property 'Email' + // TODO: unit test for the property 'Email' } - /// - /// Test the property 'Password' + /// Test the property 'Password' /// [Test] public void PasswordTest() { - // TODO: unit test for the property 'Password' + // TODO: unit test for the property 'Password' } - /// - /// Test the property 'Phone' + /// Test the property 'Phone' /// [Test] public void PhoneTest() { - // TODO: unit test for the property 'Phone' + // TODO: unit test for the property 'Phone' } - /// - /// Test the property 'UserStatus' + /// Test the property 'UserStatus' /// [Test] public void UserStatusTest() { - // TODO: unit test for the property 'UserStatus' + // TODO: unit test for the property 'UserStatus' } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/.gitignore b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/.gitignore index 754beb8bedc..56fef626922 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/.gitignore +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/.gitignore @@ -146,7 +146,7 @@ UpgradeLog*.htm *.txt~ *.swp *.swo - + # svn .svn diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat index 7f52a604af8..8d07d021131 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/compile.bat @@ -1,14 +1,14 @@ -@echo off - -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 - - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" -.\nuget.exe install vendor/packages.config -o vendor - -if not exist ".\bin" mkdir bin - -copy vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll - -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\*.cs /doc:bin\IO.Swagger.xml +@echo off + +SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 + + +if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" +.\nuget.exe install vendor/packages.config -o vendor + +if not exist ".\bin" mkdir bin + +copy vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll + +%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\*.cs /doc:bin\IO.Swagger.xml diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/git_push.sh b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/git_push.sh index 1a36388db02..13d463698c5 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/git_push.sh +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/git_push.sh @@ -28,7 +28,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote 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 4c061a02d95..12aad1b198e 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 @@ -9,14 +9,12 @@ using IO.Swagger.Model; namespace IO.Swagger.Api { - /// /// Represents a collection of functions to interact with the API endpoints /// public interface IPetApi { #region Synchronous Operations - /// /// Add a new pet to the store /// @@ -27,7 +25,7 @@ namespace IO.Swagger.Api /// Pet object that needs to be added to the store (optional) /// void AddPet (Pet body = null); - + /// /// Add a new pet to the store /// @@ -38,7 +36,6 @@ namespace IO.Swagger.Api /// Pet object that needs to be added to the store (optional) /// ApiResponse of Object(void) ApiResponse AddPetWithHttpInfo (Pet body = null); - /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store /// @@ -49,7 +46,7 @@ namespace IO.Swagger.Api /// Pet object in the form of byte array (optional) /// void AddPetUsingByteArray (byte[] body = null); - + /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store /// @@ -60,7 +57,6 @@ namespace IO.Swagger.Api /// Pet object in the form of byte array (optional) /// ApiResponse of Object(void) ApiResponse AddPetUsingByteArrayWithHttpInfo (byte[] body = null); - /// /// Deletes a pet /// @@ -72,7 +68,7 @@ namespace IO.Swagger.Api /// (optional) /// void DeletePet (long? petId, string apiKey = null); - + /// /// Deletes a pet /// @@ -84,7 +80,6 @@ namespace IO.Swagger.Api /// (optional) /// ApiResponse of Object(void) ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null); - /// /// Finds Pets by status /// @@ -95,7 +90,7 @@ namespace IO.Swagger.Api /// Status values that need to be considered for query (optional, default to available) /// List<Pet> List FindPetsByStatus (List status = null); - + /// /// Finds Pets by status /// @@ -106,7 +101,6 @@ namespace IO.Swagger.Api /// Status values that need to be considered for query (optional, default to available) /// ApiResponse of List<Pet> ApiResponse> FindPetsByStatusWithHttpInfo (List status = null); - /// /// Finds Pets by tags /// @@ -117,7 +111,7 @@ namespace IO.Swagger.Api /// Tags to filter by (optional) /// List<Pet> List FindPetsByTags (List tags = null); - + /// /// Finds Pets by tags /// @@ -128,7 +122,6 @@ namespace IO.Swagger.Api /// Tags to filter by (optional) /// ApiResponse of List<Pet> ApiResponse> FindPetsByTagsWithHttpInfo (List tags = null); - /// /// Find pet by ID /// @@ -139,7 +132,7 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// Pet Pet GetPetById (long? petId); - + /// /// Find pet by ID /// @@ -150,7 +143,6 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// ApiResponse of Pet ApiResponse GetPetByIdWithHttpInfo (long? petId); - /// /// Fake endpoint to test inline arbitrary object return by 'Find pet by ID' /// @@ -161,7 +153,7 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// InlineResponse200 InlineResponse200 GetPetByIdInObject (long? petId); - + /// /// Fake endpoint to test inline arbitrary object return by 'Find pet by ID' /// @@ -172,7 +164,6 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// ApiResponse of InlineResponse200 ApiResponse GetPetByIdInObjectWithHttpInfo (long? petId); - /// /// Fake endpoint to test byte array return by 'Find pet by ID' /// @@ -183,7 +174,7 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// byte[] byte[] PetPetIdtestingByteArraytrueGet (long? petId); - + /// /// Fake endpoint to test byte array return by 'Find pet by ID' /// @@ -194,7 +185,6 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// ApiResponse of byte[] ApiResponse PetPetIdtestingByteArraytrueGetWithHttpInfo (long? petId); - /// /// Update an existing pet /// @@ -205,7 +195,7 @@ namespace IO.Swagger.Api /// Pet object that needs to be added to the store (optional) /// void UpdatePet (Pet body = null); - + /// /// Update an existing pet /// @@ -216,7 +206,6 @@ namespace IO.Swagger.Api /// Pet object that needs to be added to the store (optional) /// ApiResponse of Object(void) ApiResponse UpdatePetWithHttpInfo (Pet body = null); - /// /// Updates a pet in the store with form data /// @@ -229,7 +218,7 @@ namespace IO.Swagger.Api /// Updated status of the pet (optional) /// void UpdatePetWithForm (string petId, string name = null, string status = null); - + /// /// Updates a pet in the store with form data /// @@ -242,7 +231,6 @@ namespace IO.Swagger.Api /// Updated status of the pet (optional) /// ApiResponse of Object(void) ApiResponse UpdatePetWithFormWithHttpInfo (string petId, string name = null, string status = null); - /// /// uploads an image /// @@ -255,7 +243,7 @@ namespace IO.Swagger.Api /// file to upload (optional) /// void UploadFile (long? petId, string additionalMetadata = null, Stream file = null); - + /// /// uploads an image /// @@ -268,11 +256,8 @@ namespace IO.Swagger.Api /// file to upload (optional) /// ApiResponse of Object(void) ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null); - #endregion Synchronous Operations - #region Asynchronous Operations - /// /// Add a new pet to the store /// @@ -294,7 +279,6 @@ namespace IO.Swagger.Api /// Pet object that needs to be added to the store (optional) /// Task of ApiResponse System.Threading.Tasks.Task> AddPetAsyncWithHttpInfo (Pet body = null); - /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store /// @@ -316,7 +300,6 @@ namespace IO.Swagger.Api /// Pet object in the form of byte array (optional) /// Task of ApiResponse System.Threading.Tasks.Task> AddPetUsingByteArrayAsyncWithHttpInfo (byte[] body = null); - /// /// Deletes a pet /// @@ -340,7 +323,6 @@ namespace IO.Swagger.Api /// (optional) /// Task of ApiResponse System.Threading.Tasks.Task> DeletePetAsyncWithHttpInfo (long? petId, string apiKey = null); - /// /// Finds Pets by status /// @@ -362,7 +344,6 @@ namespace IO.Swagger.Api /// Status values that need to be considered for query (optional, default to available) /// Task of ApiResponse (List<Pet>) System.Threading.Tasks.Task>> FindPetsByStatusAsyncWithHttpInfo (List status = null); - /// /// Finds Pets by tags /// @@ -384,7 +365,6 @@ namespace IO.Swagger.Api /// Tags to filter by (optional) /// Task of ApiResponse (List<Pet>) System.Threading.Tasks.Task>> FindPetsByTagsAsyncWithHttpInfo (List tags = null); - /// /// Find pet by ID /// @@ -406,7 +386,6 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// Task of ApiResponse (Pet) System.Threading.Tasks.Task> GetPetByIdAsyncWithHttpInfo (long? petId); - /// /// Fake endpoint to test inline arbitrary object return by 'Find pet by ID' /// @@ -428,7 +407,6 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// Task of ApiResponse (InlineResponse200) System.Threading.Tasks.Task> GetPetByIdInObjectAsyncWithHttpInfo (long? petId); - /// /// Fake endpoint to test byte array return by 'Find pet by ID' /// @@ -450,7 +428,6 @@ namespace IO.Swagger.Api /// ID of pet that needs to be fetched /// Task of ApiResponse (byte[]) System.Threading.Tasks.Task> PetPetIdtestingByteArraytrueGetAsyncWithHttpInfo (long? petId); - /// /// Update an existing pet /// @@ -472,7 +449,6 @@ namespace IO.Swagger.Api /// Pet object that needs to be added to the store (optional) /// Task of ApiResponse System.Threading.Tasks.Task> UpdatePetAsyncWithHttpInfo (Pet body = null); - /// /// Updates a pet in the store with form data /// @@ -498,7 +474,6 @@ namespace IO.Swagger.Api /// Updated status of the pet (optional) /// Task of ApiResponse System.Threading.Tasks.Task> UpdatePetWithFormAsyncWithHttpInfo (string petId, string name = null, string status = null); - /// /// uploads an image /// @@ -524,11 +499,9 @@ namespace IO.Swagger.Api /// file to upload (optional) /// Task of ApiResponse System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, Stream file = null); - #endregion Asynchronous Operations - } - + /// /// Represents a collection of functions to interact with the API endpoints /// @@ -548,7 +521,7 @@ namespace IO.Swagger.Api this.Configuration.ApiClient.Configuration = this.Configuration; } } - + /// /// Initializes a new instance of the class /// using Configuration object @@ -558,7 +531,7 @@ namespace IO.Swagger.Api public PetApi(Configuration configuration = null) { if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; + this.Configuration = Configuration.Default; else this.Configuration = configuration; @@ -587,7 +560,7 @@ namespace IO.Swagger.Api { // do nothing } - + /// /// Gets or sets the configuration object /// @@ -615,13 +588,12 @@ namespace IO.Swagger.Api { this.Configuration.AddDefaultHeader(key, value); } - - + /// /// Add a new pet to the store /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store (optional) + /// Pet object that needs to be added to the store (optional) /// public void AddPet (Pet body = null) { @@ -632,14 +604,14 @@ namespace IO.Swagger.Api /// Add a new pet to the store /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store (optional) + /// Pet object that needs to be added to the store (optional) /// ApiResponse of Object(void) public ApiResponse AddPetWithHttpInfo (Pet body = null) { - + var localVarPath = "/pet"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -664,11 +636,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -684,27 +652,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling AddPet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling AddPet: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Add a new pet to the store /// @@ -726,9 +692,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> AddPetAsyncWithHttpInfo (Pet body = null) { - + var localVarPath = "/pet"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -753,11 +719,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -766,7 +728,6 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // authentication (petstore_auth) required // oauth required @@ -774,15 +735,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling AddPet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -793,12 +753,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store /// /// Thrown when fails to make API call - /// Pet object in the form of byte array (optional) + /// Pet object in the form of byte array (optional) /// public void AddPetUsingByteArray (byte[] body = null) { @@ -809,14 +768,14 @@ namespace IO.Swagger.Api /// Fake endpoint to test byte array in body parameter for adding a new pet to the store /// /// Thrown when fails to make API call - /// Pet object in the form of byte array (optional) + /// Pet object in the form of byte array (optional) /// ApiResponse of Object(void) public ApiResponse AddPetUsingByteArrayWithHttpInfo (byte[] body = null) { - - var localVarPath = "/pet?testing_byte_array=true"; - + + var localVarPath = "/pet?testing_byte_array=true"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -841,11 +800,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -861,27 +816,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling AddPetUsingByteArray: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling AddPetUsingByteArray: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Fake endpoint to test byte array in body parameter for adding a new pet to the store /// @@ -903,9 +856,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> AddPetUsingByteArrayAsyncWithHttpInfo (byte[] body = null) { - - var localVarPath = "/pet?testing_byte_array=true"; - + + var localVarPath = "/pet?testing_byte_array=true"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -930,11 +883,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -943,7 +892,6 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // authentication (petstore_auth) required // oauth required @@ -951,15 +899,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling AddPetUsingByteArray: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -970,13 +917,12 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Deletes a pet /// /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) + /// Pet id to delete + /// (optional) /// public void DeletePet (long? petId, string apiKey = null) { @@ -987,8 +933,8 @@ namespace IO.Swagger.Api /// Deletes a pet /// /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) + /// Pet id to delete + /// (optional) /// ApiResponse of Object(void) public ApiResponse DeletePetWithHttpInfo (long? petId, string apiKey = null) { @@ -997,9 +943,9 @@ namespace IO.Swagger.Api if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - + var localVarPath = "/pet/{petId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1025,12 +971,8 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - if (apiKey != null) localVarHeaderParams.Add("api_key", Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - - + if (apiKey != null) localVarHeaderParams.Add("api_key", Configuration.ApiClient.ParameterToString(apiKey)); // header parameter + // authentication (petstore_auth) required @@ -1039,27 +981,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling DeletePet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling DeletePet: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Deletes a pet /// @@ -1085,9 +1025,9 @@ namespace IO.Swagger.Api // verify the required parameter 'petId' is set if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling DeletePet"); - + var localVarPath = "/pet/{petId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1113,14 +1053,9 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - if (apiKey != null) localVarHeaderParams.Add("api_key", Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - - + if (apiKey != null) localVarHeaderParams.Add("api_key", Configuration.ApiClient.ParameterToString(apiKey)); // header parameter + - // authentication (petstore_auth) required // oauth required @@ -1128,15 +1063,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling DeletePet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1147,12 +1081,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// /// Thrown when fails to make API call - /// Status values that need to be considered for query (optional, default to available) + /// Status values that need to be considered for query (optional, default to available) /// List<Pet> public List FindPetsByStatus (List status = null) { @@ -1164,14 +1097,14 @@ namespace IO.Swagger.Api /// Finds Pets by status Multiple status values can be provided with comma separated strings /// /// Thrown when fails to make API call - /// Status values that need to be considered for query (optional, default to available) + /// Status values that need to be considered for query (optional, default to available) /// ApiResponse of List<Pet> public ApiResponse< List > FindPetsByStatusWithHttpInfo (List status = null) { - + var localVarPath = "/pet/findByStatus"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1196,12 +1129,8 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - - - + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + // authentication (petstore_auth) required @@ -1210,27 +1139,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling FindPetsByStatus: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling FindPetsByStatus: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } - /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// @@ -1253,9 +1180,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task>> FindPetsByStatusAsyncWithHttpInfo (List status = null) { - + var localVarPath = "/pet/findByStatus"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1280,14 +1207,9 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - - - + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + - // authentication (petstore_auth) required // oauth required @@ -1295,15 +1217,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling FindPetsByStatus: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1314,12 +1235,11 @@ namespace IO.Swagger.Api (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } - /// /// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. /// /// Thrown when fails to make API call - /// Tags to filter by (optional) + /// Tags to filter by (optional) /// List<Pet> public List FindPetsByTags (List tags = null) { @@ -1331,14 +1251,14 @@ namespace IO.Swagger.Api /// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. /// /// Thrown when fails to make API call - /// Tags to filter by (optional) + /// Tags to filter by (optional) /// ApiResponse of List<Pet> public ApiResponse< List > FindPetsByTagsWithHttpInfo (List tags = null) { - + var localVarPath = "/pet/findByTags"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1363,12 +1283,8 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (tags != null) localVarQueryParams.Add("tags", Configuration.ApiClient.ParameterToString(tags)); // query parameter - - - - + if (tags != null) localVarQueryParams.Add("tags", Configuration.ApiClient.ParameterToString(tags)); // query parameter + // authentication (petstore_auth) required @@ -1377,27 +1293,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling FindPetsByTags: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling FindPetsByTags: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } - /// /// Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing. /// @@ -1420,9 +1334,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task>> FindPetsByTagsAsyncWithHttpInfo (List tags = null) { - + var localVarPath = "/pet/findByTags"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1447,14 +1361,9 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (tags != null) localVarQueryParams.Add("tags", Configuration.ApiClient.ParameterToString(tags)); // query parameter - - - - + if (tags != null) localVarQueryParams.Add("tags", Configuration.ApiClient.ParameterToString(tags)); // query parameter + - // authentication (petstore_auth) required // oauth required @@ -1462,15 +1371,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling FindPetsByTags: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1481,12 +1389,11 @@ namespace IO.Swagger.Api (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } - /// /// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// Pet public Pet GetPetById (long? petId) { @@ -1498,7 +1405,7 @@ namespace IO.Swagger.Api /// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// ApiResponse of Pet public ApiResponse< Pet > GetPetByIdWithHttpInfo (long? petId) { @@ -1507,9 +1414,9 @@ namespace IO.Swagger.Api if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - + var localVarPath = "/pet/{petId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1535,11 +1442,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - - + // authentication (api_key) required @@ -1547,34 +1450,32 @@ namespace IO.Swagger.Api { localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); } - // authentication (petstore_auth) required +// authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetPetById: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling GetPetById: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); } - /// /// Find pet by ID Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// @@ -1599,9 +1500,9 @@ namespace IO.Swagger.Api // verify the required parameter 'petId' is set if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling GetPetById"); - + var localVarPath = "/pet/{petId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1627,20 +1528,14 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json 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 @@ -1648,15 +1543,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetPetById: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1667,12 +1561,11 @@ namespace IO.Swagger.Api (Pet) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); } - /// /// Fake endpoint to test inline arbitrary object return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// InlineResponse200 public InlineResponse200 GetPetByIdInObject (long? petId) { @@ -1684,7 +1577,7 @@ namespace IO.Swagger.Api /// Fake endpoint to test inline arbitrary object return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// ApiResponse of InlineResponse200 public ApiResponse< InlineResponse200 > GetPetByIdInObjectWithHttpInfo (long? petId) { @@ -1693,9 +1586,9 @@ namespace IO.Swagger.Api if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetByIdInObject"); - - var localVarPath = "/pet/{petId}?response=inline_arbitrary_object"; - + + var localVarPath = "/pet/{petId}?response=inline_arbitrary_object"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1721,11 +1614,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - - + // authentication (api_key) required @@ -1733,34 +1622,32 @@ namespace IO.Swagger.Api { localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); } - // authentication (petstore_auth) required +// authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetPetByIdInObject: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling GetPetByIdInObject: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); } - /// /// Fake endpoint to test inline arbitrary object return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// @@ -1785,9 +1672,9 @@ namespace IO.Swagger.Api // verify the required parameter 'petId' is set if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling GetPetByIdInObject"); - - var localVarPath = "/pet/{petId}?response=inline_arbitrary_object"; - + + var localVarPath = "/pet/{petId}?response=inline_arbitrary_object"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1813,20 +1700,14 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json 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 @@ -1834,15 +1715,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetPetByIdInObject: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1853,12 +1733,11 @@ namespace IO.Swagger.Api (InlineResponse200) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); } - /// /// Fake endpoint to test byte array return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// byte[] public byte[] PetPetIdtestingByteArraytrueGet (long? petId) { @@ -1870,7 +1749,7 @@ namespace IO.Swagger.Api /// Fake endpoint to test byte array return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// ApiResponse of byte[] public ApiResponse< byte[] > PetPetIdtestingByteArraytrueGetWithHttpInfo (long? petId) { @@ -1879,9 +1758,9 @@ namespace IO.Swagger.Api if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->PetPetIdtestingByteArraytrueGet"); - - var localVarPath = "/pet/{petId}?testing_byte_array=true"; - + + var localVarPath = "/pet/{petId}?testing_byte_array=true"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1907,11 +1786,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - - + // authentication (api_key) required @@ -1919,34 +1794,32 @@ namespace IO.Swagger.Api { localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); } - // authentication (petstore_auth) required +// authentication (petstore_auth) required // oauth required if (!String.IsNullOrEmpty(Configuration.AccessToken)) { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); } - /// /// Fake endpoint to test byte array return by 'Find pet by ID' Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions /// @@ -1971,9 +1844,9 @@ namespace IO.Swagger.Api // verify the required parameter 'petId' is set if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetPetIdtestingByteArraytrueGet"); - - var localVarPath = "/pet/{petId}?testing_byte_array=true"; - + + var localVarPath = "/pet/{petId}?testing_byte_array=true"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1999,20 +1872,14 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json 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 @@ -2020,15 +1887,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling PetPetIdtestingByteArraytrueGet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -2039,12 +1905,11 @@ namespace IO.Swagger.Api (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); } - /// /// Update an existing pet /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store (optional) + /// Pet object that needs to be added to the store (optional) /// public void UpdatePet (Pet body = null) { @@ -2055,14 +1920,14 @@ namespace IO.Swagger.Api /// Update an existing pet /// /// Thrown when fails to make API call - /// Pet object that needs to be added to the store (optional) + /// Pet object that needs to be added to the store (optional) /// ApiResponse of Object(void) public ApiResponse UpdatePetWithHttpInfo (Pet body = null) { - + var localVarPath = "/pet"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -2087,11 +1952,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -2107,27 +1968,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UpdatePet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling UpdatePet: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Update an existing pet /// @@ -2149,9 +2008,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> UpdatePetAsyncWithHttpInfo (Pet body = null) { - + var localVarPath = "/pet"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -2176,11 +2035,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -2189,7 +2044,6 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // authentication (petstore_auth) required // oauth required @@ -2197,15 +2051,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UpdatePet: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -2216,14 +2069,13 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Updates a pet in the store with form data /// /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) + /// ID of pet that needs to be updated + /// Updated name of the pet (optional) + /// Updated status of the pet (optional) /// public void UpdatePetWithForm (string petId, string name = null, string status = null) { @@ -2234,9 +2086,9 @@ namespace IO.Swagger.Api /// Updates a pet in the store with form data /// /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) + /// ID of pet that needs to be updated + /// Updated name of the pet (optional) + /// Updated status of the pet (optional) /// ApiResponse of Object(void) public ApiResponse UpdatePetWithFormWithHttpInfo (string petId, string name = null, string status = null) { @@ -2245,9 +2097,9 @@ namespace IO.Swagger.Api if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - + var localVarPath = "/pet/{petId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -2273,12 +2125,8 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - if (name != null) localVarFormParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // form parameter - + if (name != null) localVarFormParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // form parameter +if (status != null) localVarFormParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // form parameter // authentication (petstore_auth) required @@ -2288,27 +2136,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UpdatePetWithForm: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling UpdatePetWithForm: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Updates a pet in the store with form data /// @@ -2336,9 +2182,9 @@ namespace IO.Swagger.Api // verify the required parameter 'petId' is set if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling UpdatePetWithForm"); - + var localVarPath = "/pet/{petId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -2364,15 +2210,10 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - if (name != null) localVarFormParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // form parameter - + if (name != null) localVarFormParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // form parameter +if (status != null) localVarFormParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // form parameter - // authentication (petstore_auth) required // oauth required @@ -2380,15 +2221,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UpdatePetWithForm: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -2399,14 +2239,13 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// uploads an image /// /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) + /// ID of pet to update + /// Additional data to pass to server (optional) + /// file to upload (optional) /// public void UploadFile (long? petId, string additionalMetadata = null, Stream file = null) { @@ -2417,9 +2256,9 @@ namespace IO.Swagger.Api /// uploads an image /// /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) + /// ID of pet to update + /// 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) { @@ -2428,9 +2267,9 @@ namespace IO.Swagger.Api if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - + var localVarPath = "/pet/{petId}/uploadImage"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -2456,12 +2295,8 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", Configuration.ApiClient.ParameterToFile("file", file)); - + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter +if (file != null) localVarFileParams.Add("file", Configuration.ApiClient.ParameterToFile("file", file)); // authentication (petstore_auth) required @@ -2471,27 +2306,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UploadFile: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling UploadFile: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// uploads an image /// @@ -2519,9 +2352,9 @@ namespace IO.Swagger.Api // verify the required parameter 'petId' is set if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling UploadFile"); - + var localVarPath = "/pet/{petId}/uploadImage"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -2547,15 +2380,10 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (petId != null) localVarPathParams.Add("petId", Configuration.ApiClient.ParameterToString(petId)); // path parameter - - - - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", Configuration.ApiClient.ParameterToFile("file", file)); - + if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter +if (file != null) localVarFileParams.Add("file", Configuration.ApiClient.ParameterToFile("file", file)); - // authentication (petstore_auth) required // oauth required @@ -2563,15 +2391,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UploadFile: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -2582,7 +2409,5 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), 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 580adc1322c..bd611798c6c 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 @@ -9,14 +9,12 @@ using IO.Swagger.Model; namespace IO.Swagger.Api { - /// /// Represents a collection of functions to interact with the API endpoints /// public interface IStoreApi { #region Synchronous Operations - /// /// Delete purchase order by ID /// @@ -27,7 +25,7 @@ namespace IO.Swagger.Api /// ID of the order that needs to be deleted /// void DeleteOrder (string orderId); - + /// /// Delete purchase order by ID /// @@ -38,7 +36,6 @@ namespace IO.Swagger.Api /// ID of the order that needs to be deleted /// ApiResponse of Object(void) ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// /// Finds orders by status /// @@ -49,7 +46,7 @@ namespace IO.Swagger.Api /// Status value that needs to be considered for query (optional, default to placed) /// List<Order> List FindOrdersByStatus (string status = null); - + /// /// Finds orders by status /// @@ -60,7 +57,6 @@ namespace IO.Swagger.Api /// Status value that needs to be considered for query (optional, default to placed) /// ApiResponse of List<Order> ApiResponse> FindOrdersByStatusWithHttpInfo (string status = null); - /// /// Returns pet inventories by status /// @@ -70,7 +66,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// Dictionary<string, int?> Dictionary GetInventory (); - + /// /// Returns pet inventories by status /// @@ -80,7 +76,6 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ApiResponse of Dictionary<string, int?> ApiResponse> GetInventoryWithHttpInfo (); - /// /// Fake endpoint to test arbitrary object return by 'Get inventory' /// @@ -90,7 +85,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// Object Object GetInventoryInObject (); - + /// /// Fake endpoint to test arbitrary object return by 'Get inventory' /// @@ -100,29 +95,27 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ApiResponse of Object ApiResponse GetInventoryInObjectWithHttpInfo (); - /// /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Order Order GetOrderById (string orderId); - + /// /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// ApiResponse of Order ApiResponse GetOrderByIdWithHttpInfo (string orderId); - /// /// Place an order for a pet /// @@ -133,7 +126,7 @@ namespace IO.Swagger.Api /// order placed for purchasing the pet (optional) /// Order Order PlaceOrder (Order body = null); - + /// /// Place an order for a pet /// @@ -144,11 +137,8 @@ namespace IO.Swagger.Api /// order placed for purchasing the pet (optional) /// ApiResponse of Order ApiResponse PlaceOrderWithHttpInfo (Order body = null); - #endregion Synchronous Operations - #region Asynchronous Operations - /// /// Delete purchase order by ID /// @@ -170,7 +160,6 @@ namespace IO.Swagger.Api /// ID of the order that needs to be deleted /// Task of ApiResponse System.Threading.Tasks.Task> DeleteOrderAsyncWithHttpInfo (string orderId); - /// /// Finds orders by status /// @@ -192,7 +181,6 @@ namespace IO.Swagger.Api /// Status value that needs to be considered for query (optional, default to placed) /// Task of ApiResponse (List<Order>) System.Threading.Tasks.Task>> FindOrdersByStatusAsyncWithHttpInfo (string status = null); - /// /// Returns pet inventories by status /// @@ -212,7 +200,6 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// Task of ApiResponse (Dictionary<string, int?>) System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo (); - /// /// Fake endpoint to test arbitrary object return by 'Get inventory' /// @@ -232,12 +219,11 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// Task of ApiResponse (Object) System.Threading.Tasks.Task> GetInventoryInObjectAsyncWithHttpInfo (); - /// /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -248,13 +234,12 @@ namespace IO.Swagger.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched /// Task of ApiResponse (Order) System.Threading.Tasks.Task> GetOrderByIdAsyncWithHttpInfo (string orderId); - /// /// Place an order for a pet /// @@ -276,11 +261,9 @@ namespace IO.Swagger.Api /// order placed for purchasing the pet (optional) /// Task of ApiResponse (Order) System.Threading.Tasks.Task> PlaceOrderAsyncWithHttpInfo (Order body = null); - #endregion Asynchronous Operations - } - + /// /// Represents a collection of functions to interact with the API endpoints /// @@ -300,7 +283,7 @@ namespace IO.Swagger.Api this.Configuration.ApiClient.Configuration = this.Configuration; } } - + /// /// Initializes a new instance of the class /// using Configuration object @@ -310,7 +293,7 @@ namespace IO.Swagger.Api public StoreApi(Configuration configuration = null) { if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; + this.Configuration = Configuration.Default; else this.Configuration = configuration; @@ -339,7 +322,7 @@ namespace IO.Swagger.Api { // do nothing } - + /// /// Gets or sets the configuration object /// @@ -367,13 +350,12 @@ namespace IO.Swagger.Api { this.Configuration.AddDefaultHeader(key, value); } - - + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call - /// ID of the order that needs to be deleted + /// ID of the order that needs to be deleted /// public void DeleteOrder (string orderId) { @@ -384,7 +366,7 @@ namespace IO.Swagger.Api /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// /// Thrown when fails to make API call - /// ID of the order that needs to be deleted + /// ID of the order that needs to be deleted /// ApiResponse of Object(void) public ApiResponse DeleteOrderWithHttpInfo (string orderId) { @@ -393,9 +375,9 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - + var localVarPath = "/store/order/{orderId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -421,33 +403,27 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - - - + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling DeleteOrder: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling DeleteOrder: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -471,9 +447,9 @@ namespace IO.Swagger.Api // verify the required parameter 'orderId' is set if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling DeleteOrder"); - + var localVarPath = "/store/order/{orderId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -499,21 +475,16 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - - - + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling DeleteOrder: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -524,12 +495,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Finds orders by status A single status value can be provided as a string /// /// Thrown when fails to make API call - /// Status value that needs to be considered for query (optional, default to placed) + /// Status value that needs to be considered for query (optional, default to placed) /// List<Order> public List FindOrdersByStatus (string status = null) { @@ -541,14 +511,14 @@ namespace IO.Swagger.Api /// Finds orders by status A single status value can be provided as a string /// /// Thrown when fails to make API call - /// Status value that needs to be considered for query (optional, default to placed) + /// Status value that needs to be considered for query (optional, default to placed) /// ApiResponse of List<Order> public ApiResponse< List > FindOrdersByStatusWithHttpInfo (string status = null) { - + var localVarPath = "/store/findByStatus"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -573,12 +543,8 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - - - + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + // authentication (test_api_client_id) required @@ -586,33 +552,31 @@ namespace IO.Swagger.Api { localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id"); } - // authentication (test_api_client_secret) required +// authentication (test_api_client_secret) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"))) { localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"); } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } - /// /// Finds orders by status A single status value can be provided as a string /// @@ -635,9 +599,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task>> FindOrdersByStatusAsyncWithHttpInfo (string status = null) { - + var localVarPath = "/store/findByStatus"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -662,36 +626,29 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - - - + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + - // authentication (test_api_client_id) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id"))) { localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id"); } - // authentication (test_api_client_secret) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"))) { localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"); } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling FindOrdersByStatus: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -702,7 +659,6 @@ namespace IO.Swagger.Api (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } - /// /// Returns pet inventories by status Returns a map of status codes to quantities /// @@ -722,9 +678,9 @@ namespace IO.Swagger.Api public ApiResponse< Dictionary > GetInventoryWithHttpInfo () { - + var localVarPath = "/store/inventory"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -749,11 +705,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - + // authentication (api_key) required @@ -761,27 +713,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetInventory: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling GetInventory: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Dictionary) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } - /// /// Returns pet inventories by status Returns a map of status codes to quantities /// @@ -802,9 +752,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task>> GetInventoryAsyncWithHttpInfo () { - + var localVarPath = "/store/inventory"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -829,28 +779,22 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - + - // 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, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetInventory: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -861,7 +805,6 @@ namespace IO.Swagger.Api (Dictionary) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); } - /// /// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities /// @@ -881,9 +824,9 @@ namespace IO.Swagger.Api public ApiResponse< Object > GetInventoryInObjectWithHttpInfo () { - - var localVarPath = "/store/inventory?response=arbitrary_object"; - + + var localVarPath = "/store/inventory?response=arbitrary_object"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -908,11 +851,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - + // authentication (api_key) required @@ -920,27 +859,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["api_key"] = Configuration.GetApiKeyWithPrefix("api_key"); } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } - /// /// Fake endpoint to test arbitrary object return by 'Get inventory' Returns an arbitrary object which is actually a map of status codes to quantities /// @@ -961,9 +898,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> GetInventoryInObjectAsyncWithHttpInfo () { - - var localVarPath = "/store/inventory?response=arbitrary_object"; - + + var localVarPath = "/store/inventory?response=arbitrary_object"; + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -988,28 +925,22 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - + - // 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, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetInventoryInObject: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1020,12 +951,11 @@ namespace IO.Swagger.Api (Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))); } - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// Order public Order GetOrderById (string orderId) { @@ -1034,10 +964,10 @@ namespace IO.Swagger.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call - /// ID of pet that needs to be fetched + /// ID of pet that needs to be fetched /// ApiResponse of Order public ApiResponse< Order > GetOrderByIdWithHttpInfo (string orderId) { @@ -1046,9 +976,9 @@ namespace IO.Swagger.Api if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - + var localVarPath = "/store/order/{orderId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1074,11 +1004,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - - - + // authentication (test_api_key_header) required @@ -1086,35 +1012,33 @@ namespace IO.Swagger.Api { localVarHeaderParams["test_api_key_header"] = Configuration.GetApiKeyWithPrefix("test_api_key_header"); } - // authentication (test_api_key_query) required +// 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"); } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetOrderById: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling GetOrderById: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); } - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -1127,7 +1051,7 @@ namespace IO.Swagger.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -1137,9 +1061,9 @@ namespace IO.Swagger.Api // verify the required parameter 'orderId' is set if (orderId == null) throw new ApiException(400, "Missing required parameter 'orderId' when calling GetOrderById"); - + var localVarPath = "/store/order/{orderId}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1165,35 +1089,28 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json 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"); } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetOrderById: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1204,12 +1121,11 @@ namespace IO.Swagger.Api (Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); } - /// /// Place an order for a pet /// /// Thrown when fails to make API call - /// order placed for purchasing the pet (optional) + /// order placed for purchasing the pet (optional) /// Order public Order PlaceOrder (Order body = null) { @@ -1221,14 +1137,14 @@ namespace IO.Swagger.Api /// Place an order for a pet /// /// Thrown when fails to make API call - /// order placed for purchasing the pet (optional) + /// order placed for purchasing the pet (optional) /// ApiResponse of Order public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body = null) { - + var localVarPath = "/store/order"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1253,11 +1169,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -1272,33 +1184,31 @@ namespace IO.Swagger.Api { localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id"); } - // authentication (test_api_client_secret) required +// authentication (test_api_client_secret) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"))) { localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"); } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling PlaceOrder: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling PlaceOrder: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); } - /// /// Place an order for a pet /// @@ -1321,9 +1231,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> PlaceOrderAsyncWithHttpInfo (Order body = null) { - + var localVarPath = "/store/order"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1348,11 +1258,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -1361,29 +1267,26 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // authentication (test_api_client_id) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_id"))) { localVarHeaderParams["x-test_api_client_id"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_id"); } - // authentication (test_api_client_secret) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"))) { localVarHeaderParams["x-test_api_client_secret"] = Configuration.GetApiKeyWithPrefix("x-test_api_client_secret"); } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling PlaceOrder: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1394,7 +1297,5 @@ namespace IO.Swagger.Api (Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); } - } - } 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 71ad89f6397..80297f069db 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 @@ -9,14 +9,12 @@ using IO.Swagger.Model; namespace IO.Swagger.Api { - /// /// Represents a collection of functions to interact with the API endpoints /// public interface IUserApi { #region Synchronous Operations - /// /// Create user /// @@ -27,7 +25,7 @@ namespace IO.Swagger.Api /// Created user object (optional) /// void CreateUser (User body = null); - + /// /// Create user /// @@ -38,7 +36,6 @@ namespace IO.Swagger.Api /// Created user object (optional) /// ApiResponse of Object(void) ApiResponse CreateUserWithHttpInfo (User body = null); - /// /// Creates list of users with given input array /// @@ -49,7 +46,7 @@ namespace IO.Swagger.Api /// List of user object (optional) /// void CreateUsersWithArrayInput (List body = null); - + /// /// Creates list of users with given input array /// @@ -60,7 +57,6 @@ namespace IO.Swagger.Api /// List of user object (optional) /// ApiResponse of Object(void) ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body = null); - /// /// Creates list of users with given input array /// @@ -71,7 +67,7 @@ namespace IO.Swagger.Api /// List of user object (optional) /// void CreateUsersWithListInput (List body = null); - + /// /// Creates list of users with given input array /// @@ -82,7 +78,6 @@ namespace IO.Swagger.Api /// List of user object (optional) /// ApiResponse of Object(void) ApiResponse CreateUsersWithListInputWithHttpInfo (List body = null); - /// /// Delete user /// @@ -93,7 +88,7 @@ namespace IO.Swagger.Api /// The name that needs to be deleted /// void DeleteUser (string username); - + /// /// Delete user /// @@ -104,7 +99,6 @@ namespace IO.Swagger.Api /// The name that needs to be deleted /// ApiResponse of Object(void) ApiResponse DeleteUserWithHttpInfo (string username); - /// /// Get user by user name /// @@ -112,10 +106,10 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// User User GetUserByName (string username); - + /// /// Get user by user name /// @@ -123,10 +117,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// ApiResponse of User ApiResponse GetUserByNameWithHttpInfo (string username); - /// /// Logs user into the system /// @@ -138,7 +131,7 @@ namespace IO.Swagger.Api /// The password for login in clear text (optional) /// string string LoginUser (string username = null, string password = null); - + /// /// Logs user into the system /// @@ -150,7 +143,6 @@ namespace IO.Swagger.Api /// The password for login in clear text (optional) /// ApiResponse of string ApiResponse LoginUserWithHttpInfo (string username = null, string password = null); - /// /// Logs out current logged in user session /// @@ -160,7 +152,7 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// void LogoutUser (); - + /// /// Logs out current logged in user session /// @@ -170,7 +162,6 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse LogoutUserWithHttpInfo (); - /// /// Updated user /// @@ -182,7 +173,7 @@ namespace IO.Swagger.Api /// Updated user object (optional) /// void UpdateUser (string username, User body = null); - + /// /// Updated user /// @@ -194,11 +185,8 @@ namespace IO.Swagger.Api /// Updated user object (optional) /// ApiResponse of Object(void) ApiResponse UpdateUserWithHttpInfo (string username, User body = null); - #endregion Synchronous Operations - #region Asynchronous Operations - /// /// Create user /// @@ -220,7 +208,6 @@ namespace IO.Swagger.Api /// Created user object (optional) /// Task of ApiResponse System.Threading.Tasks.Task> CreateUserAsyncWithHttpInfo (User body = null); - /// /// Creates list of users with given input array /// @@ -242,7 +229,6 @@ namespace IO.Swagger.Api /// List of user object (optional) /// Task of ApiResponse System.Threading.Tasks.Task> CreateUsersWithArrayInputAsyncWithHttpInfo (List body = null); - /// /// Creates list of users with given input array /// @@ -264,7 +250,6 @@ namespace IO.Swagger.Api /// List of user object (optional) /// Task of ApiResponse System.Threading.Tasks.Task> CreateUsersWithListInputAsyncWithHttpInfo (List body = null); - /// /// Delete user /// @@ -286,7 +271,6 @@ namespace IO.Swagger.Api /// The name that needs to be deleted /// Task of ApiResponse System.Threading.Tasks.Task> DeleteUserAsyncWithHttpInfo (string username); - /// /// Get user by user name /// @@ -294,7 +278,7 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of User System.Threading.Tasks.Task GetUserByNameAsync (string username); @@ -305,10 +289,9 @@ namespace IO.Swagger.Api /// /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of ApiResponse (User) System.Threading.Tasks.Task> GetUserByNameAsyncWithHttpInfo (string username); - /// /// Logs user into the system /// @@ -332,7 +315,6 @@ namespace IO.Swagger.Api /// The password for login in clear text (optional) /// Task of ApiResponse (string) System.Threading.Tasks.Task> LoginUserAsyncWithHttpInfo (string username = null, string password = null); - /// /// Logs out current logged in user session /// @@ -352,7 +334,6 @@ namespace IO.Swagger.Api /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> LogoutUserAsyncWithHttpInfo (); - /// /// Updated user /// @@ -376,11 +357,9 @@ namespace IO.Swagger.Api /// Updated user object (optional) /// Task of ApiResponse System.Threading.Tasks.Task> UpdateUserAsyncWithHttpInfo (string username, User body = null); - #endregion Asynchronous Operations - } - + /// /// Represents a collection of functions to interact with the API endpoints /// @@ -400,7 +379,7 @@ namespace IO.Swagger.Api this.Configuration.ApiClient.Configuration = this.Configuration; } } - + /// /// Initializes a new instance of the class /// using Configuration object @@ -410,7 +389,7 @@ namespace IO.Swagger.Api public UserApi(Configuration configuration = null) { if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; + this.Configuration = Configuration.Default; else this.Configuration = configuration; @@ -439,7 +418,7 @@ namespace IO.Swagger.Api { // do nothing } - + /// /// Gets or sets the configuration object /// @@ -467,13 +446,12 @@ namespace IO.Swagger.Api { this.Configuration.AddDefaultHeader(key, value); } - - + /// /// Create user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object (optional) + /// Created user object (optional) /// public void CreateUser (User body = null) { @@ -484,14 +462,14 @@ namespace IO.Swagger.Api /// Create user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// Created user object (optional) + /// Created user object (optional) /// ApiResponse of Object(void) public ApiResponse CreateUserWithHttpInfo (User body = null) { - + var localVarPath = "/user"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -516,11 +494,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -530,26 +504,24 @@ namespace IO.Swagger.Api } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling CreateUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling CreateUser: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Create user This can only be done by the logged in user. /// @@ -571,9 +543,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> CreateUserAsyncWithHttpInfo (User body = null) { - + var localVarPath = "/user"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -598,11 +570,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -611,15 +579,14 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling CreateUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -630,12 +597,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object (optional) + /// List of user object (optional) /// public void CreateUsersWithArrayInput (List body = null) { @@ -646,14 +612,14 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object (optional) + /// List of user object (optional) /// ApiResponse of Object(void) public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body = null) { - + var localVarPath = "/user/createWithArray"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -678,11 +644,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -692,26 +654,24 @@ namespace IO.Swagger.Api } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling CreateUsersWithArrayInput: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling CreateUsersWithArrayInput: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Creates list of users with given input array /// @@ -733,9 +693,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> CreateUsersWithArrayInputAsyncWithHttpInfo (List body = null) { - + var localVarPath = "/user/createWithArray"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -760,11 +720,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -773,15 +729,14 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling CreateUsersWithArrayInput: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -792,12 +747,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object (optional) + /// List of user object (optional) /// public void CreateUsersWithListInput (List body = null) { @@ -808,14 +762,14 @@ namespace IO.Swagger.Api /// Creates list of users with given input array /// /// Thrown when fails to make API call - /// List of user object (optional) + /// List of user object (optional) /// ApiResponse of Object(void) public ApiResponse CreateUsersWithListInputWithHttpInfo (List body = null) { - + var localVarPath = "/user/createWithList"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -840,11 +794,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -854,26 +804,24 @@ namespace IO.Swagger.Api } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling CreateUsersWithListInput: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling CreateUsersWithListInput: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Creates list of users with given input array /// @@ -895,9 +843,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> CreateUsersWithListInputAsyncWithHttpInfo (List body = null) { - + var localVarPath = "/user/createWithList"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -922,11 +870,7 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -935,15 +879,14 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling CreateUsersWithListInput: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -954,12 +897,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Delete user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// The name that needs to be deleted + /// The name that needs to be deleted /// public void DeleteUser (string username) { @@ -970,7 +912,7 @@ namespace IO.Swagger.Api /// Delete user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// The name that needs to be deleted + /// The name that needs to be deleted /// ApiResponse of Object(void) public ApiResponse DeleteUserWithHttpInfo (string username) { @@ -979,9 +921,9 @@ namespace IO.Swagger.Api if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - + var localVarPath = "/user/{username}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1007,11 +949,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter - - - - - + // authentication (test_http_basic) required @@ -1020,27 +958,25 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password); } - - + // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling DeleteUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling DeleteUser: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Delete user This can only be done by the logged in user. /// @@ -1064,9 +1000,9 @@ namespace IO.Swagger.Api // verify the required parameter 'username' is set if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling DeleteUser"); - + var localVarPath = "/user/{username}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1092,13 +1028,8 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter - - - - - + - // authentication (test_http_basic) required // http basic authentication required @@ -1106,15 +1037,14 @@ namespace IO.Swagger.Api { localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password); } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling DeleteUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1125,12 +1055,11 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// User public User GetUserByName (string username) { @@ -1142,7 +1071,7 @@ namespace IO.Swagger.Api /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// ApiResponse of User public ApiResponse< User > GetUserByNameWithHttpInfo (string username) { @@ -1151,9 +1080,9 @@ namespace IO.Swagger.Api if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - + var localVarPath = "/user/{username}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1179,38 +1108,32 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter - - - - - + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetUserByName: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling GetUserByName: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); } - /// /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of User public async System.Threading.Tasks.Task GetUserByNameAsync (string username) { @@ -1223,16 +1146,16 @@ namespace IO.Swagger.Api /// Get user by user name /// /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. + /// The name that needs to be fetched. Use user1 for testing. /// Task of ApiResponse (User) public async System.Threading.Tasks.Task> GetUserByNameAsyncWithHttpInfo (string username) { // verify the required parameter 'username' is set if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling GetUserByName"); - + var localVarPath = "/user/{username}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1258,21 +1181,16 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter - - - - - + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling GetUserByName: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1283,13 +1201,12 @@ namespace IO.Swagger.Api (User) Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); } - /// /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login (optional) - /// The password for login in clear text (optional) + /// The user name for login (optional) + /// The password for login in clear text (optional) /// string public string LoginUser (string username = null, string password = null) { @@ -1301,15 +1218,15 @@ namespace IO.Swagger.Api /// Logs user into the system /// /// Thrown when fails to make API call - /// The user name for login (optional) - /// The password for login in clear text (optional) + /// The user name for login (optional) + /// The password for login in clear text (optional) /// ApiResponse of string public ApiResponse< string > LoginUserWithHttpInfo (string username = null, string password = null) { - + var localVarPath = "/user/login"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1334,35 +1251,29 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (username != null) localVarQueryParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // query parameter - if (password != null) localVarQueryParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // query parameter - - - - + if (username != null) localVarQueryParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // query parameter +if (password != null) localVarQueryParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // query parameter + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling LoginUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling LoginUser: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } - /// /// Logs user into the system /// @@ -1387,9 +1298,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> LoginUserAsyncWithHttpInfo (string username = null, string password = null) { - + var localVarPath = "/user/login"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1414,23 +1325,18 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - if (username != null) localVarQueryParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // query parameter - if (password != null) localVarQueryParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // query parameter - - - - + if (username != null) localVarQueryParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // query parameter +if (password != null) localVarQueryParams.Add("password", Configuration.ApiClient.ParameterToString(password)); // query parameter + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling LoginUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1441,7 +1347,6 @@ namespace IO.Swagger.Api (string) Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } - /// /// Logs out current logged in user session /// @@ -1460,9 +1365,9 @@ namespace IO.Swagger.Api public ApiResponse LogoutUserWithHttpInfo () { - + var localVarPath = "/user/logout"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1487,33 +1392,27 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling LogoutUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling LogoutUser: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Logs out current logged in user session /// @@ -1533,9 +1432,9 @@ namespace IO.Swagger.Api public async System.Threading.Tasks.Task> LogoutUserAsyncWithHttpInfo () { - + var localVarPath = "/user/logout"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1560,21 +1459,16 @@ namespace IO.Swagger.Api // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); - - - - - + - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling LogoutUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1585,13 +1479,12 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object (optional) + /// name that need to be deleted + /// Updated user object (optional) /// public void UpdateUser (string username, User body = null) { @@ -1602,8 +1495,8 @@ namespace IO.Swagger.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object (optional) + /// name that need to be deleted + /// Updated user object (optional) /// ApiResponse of Object(void) public ApiResponse UpdateUserWithHttpInfo (string username, User body = null) { @@ -1612,9 +1505,9 @@ namespace IO.Swagger.Api if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - + var localVarPath = "/user/{username}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1640,11 +1533,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -1654,26 +1543,24 @@ namespace IO.Swagger.Api } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UpdateUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) throw new ApiException (localVarStatusCode, "Error calling UpdateUser: " + localVarResponse.ErrorMessage, localVarResponse.ErrorMessage); - + return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - /// /// Updated user This can only be done by the logged in user. /// @@ -1699,9 +1586,9 @@ namespace IO.Swagger.Api // verify the required parameter 'username' is set if (username == null) throw new ApiException(400, "Missing required parameter 'username' when calling UpdateUser"); - + var localVarPath = "/user/{username}"; - + var localVarPathParams = new Dictionary(); var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); @@ -1727,11 +1614,7 @@ namespace IO.Swagger.Api // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json localVarPathParams.Add("format", "json"); if (username != null) localVarPathParams.Add("username", Configuration.ApiClient.ParameterToString(username)); // path parameter - - - - - if (body.GetType() != typeof(byte[])) + if (body.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter } @@ -1740,15 +1623,14 @@ namespace IO.Swagger.Api localVarPostBody = body; // byte array } - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; - + if (localVarStatusCode >= 400) throw new ApiException (localVarStatusCode, "Error calling UpdateUser: " + localVarResponse.Content, localVarResponse.Content); else if (localVarStatusCode == 0) @@ -1759,7 +1641,5 @@ namespace IO.Swagger.Api localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), null); } - } - } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs index e3de155b82f..ec9c793b7d3 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs @@ -63,7 +63,7 @@ namespace IO.Swagger.Client /// The default API client. [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] public static ApiClient Default; - + /// /// Gets or sets the Configuration. /// @@ -75,7 +75,7 @@ namespace IO.Swagger.Client /// /// An instance of the RestClient public RestClient RestClient { get; set; } - + // Creates and sets up a RestRequest prior to a call. private RestRequest PrepareRequest( String path, RestSharp.Method method, Dictionary queryParams, Object postBody, @@ -87,7 +87,7 @@ namespace IO.Swagger.Client // add path parameter, if any foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); // add header parameter, if any foreach(var param in headerParams) @@ -116,7 +116,7 @@ namespace IO.Swagger.Client request.AddParameter(contentType, postBody, ParameterType.RequestBody); } } - + return request; } @@ -151,7 +151,6 @@ namespace IO.Swagger.Client var response = RestClient.Execute(request); return (Object) response; } - /// /// Makes the asynchronous HTTP request. /// @@ -177,7 +176,7 @@ namespace IO.Swagger.Client var response = await RestClient.ExecuteTaskAsync(request); return (Object)response; } - + /// /// Escape string (url-encoded). /// @@ -187,7 +186,7 @@ namespace IO.Swagger.Client { return UrlEncode(str); } - + /// /// Create FileParameter based on Stream. /// @@ -201,7 +200,7 @@ namespace IO.Swagger.Client else return FileParameter.Create(name, ReadAsBytes(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 ",". @@ -222,7 +221,7 @@ namespace IO.Swagger.Client // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); else if (obj is IList) { var flattenedString = new StringBuilder(); @@ -237,7 +236,7 @@ namespace IO.Swagger.Client else return Convert.ToString (obj); } - + /// /// Deserialize the JSON string into a proper object. /// @@ -282,9 +281,9 @@ namespace IO.Swagger.Client if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type { - return ConvertType(response.Content, type); + return ConvertType(response.Content, type); } - + // at this point, it must be a model (json) try { @@ -295,7 +294,7 @@ namespace IO.Swagger.Client throw new ApiException(500, e.Message); } } - + /// /// Serialize an input (model) into JSON string /// @@ -312,7 +311,7 @@ namespace IO.Swagger.Client throw new ApiException(500, e.Message); } } - + /// /// Select the Content-Type header's value from the given content-type array: /// if JSON exists in the given array, use it; @@ -348,7 +347,7 @@ namespace IO.Swagger.Client return String.Join(",", accepts); } - + /// /// Encode string in base64 format. /// @@ -358,7 +357,7 @@ namespace IO.Swagger.Client { return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } - + /// /// Dynamically cast the object into target type. /// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiException.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiException.cs index 2410626602c..7b7a11721df 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiException.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiException.cs @@ -12,18 +12,18 @@ namespace IO.Swagger.Client /// /// The error code (HTTP status code). public int ErrorCode { get; set; } - + /// /// Gets or sets the error content (body json object) /// /// The error content (Http response body). public dynamic ErrorContent { get; private set; } - + /// /// Initializes a new instance of the class. /// public ApiException() {} - + /// /// Initializes a new instance of the class. /// @@ -33,7 +33,7 @@ namespace IO.Swagger.Client { this.ErrorCode = errorCode; } - + /// /// Initializes a new instance of the class. /// @@ -46,5 +46,5 @@ namespace IO.Swagger.Client this.ErrorContent = errorContent; } } - + } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiResponse.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiResponse.cs index 651d3609c22..808837b4aa1 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiResponse.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiResponse.cs @@ -13,19 +13,19 @@ namespace IO.Swagger.Client /// /// The status code. public int StatusCode { get; private set; } - + /// /// Gets or sets the HTTP headers /// /// HTTP headers public IDictionary Headers { get; private set; } - + /// /// Gets or sets the data (parsed HTTP body) /// /// The data. public T Data { get; private set; } - + /// /// Initializes a new instance of the class. /// @@ -38,7 +38,7 @@ namespace IO.Swagger.Client this.Headers = headers; this.Data = data; } - + } - + } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs index 4d04d5770ec..acbaee1e688 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/Configuration.cs @@ -87,7 +87,7 @@ namespace IO.Swagger.Client { get { return ApiClient.RestClient.Timeout; } - set + set { if (ApiClient != null) ApiClient.RestClient.Timeout = value; @@ -220,7 +220,7 @@ namespace IO.Swagger.Client } // create the directory if it does not exist - if (!Directory.Exists(value)) + if (!Directory.Exists(value)) Directory.CreateDirectory(value); // check if the path contains directory separator at the end diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Animal.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Animal.cs index 0d5bbd4aa60..b2db1964a52 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Animal.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Animal.cs @@ -37,7 +37,7 @@ namespace IO.Swagger.Model } } - + /// /// Gets or Sets ClassName @@ -54,11 +54,10 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Animal {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -109,10 +108,8 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.ClassName != null) hash = hash * 59 + this.ClassName.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs index 8d62273892c..7fe58ce7f38 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Cat.cs @@ -39,7 +39,7 @@ namespace IO.Swagger.Model this.Declawed = Declawed; } - + /// /// Gets or Sets ClassName @@ -62,12 +62,11 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Cat {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - +sb.Append(" Declawed: ").Append(Declawed).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -123,13 +122,10 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.ClassName != null) hash = hash * 59 + this.ClassName.GetHashCode(); - if (this.Declawed != null) hash = hash * 59 + this.Declawed.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs index 80683074e9f..ded3e525318 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Category.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Model this.Name = Name; } - + /// /// Gets or Sets Id @@ -54,12 +54,11 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Category {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - +sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -115,13 +114,10 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Id != null) hash = hash * 59 + this.Id.GetHashCode(); - if (this.Name != null) hash = hash * 59 + this.Name.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs index 2308b7488f1..5e40e848243 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Dog.cs @@ -39,7 +39,7 @@ namespace IO.Swagger.Model this.Breed = Breed; } - + /// /// Gets or Sets ClassName @@ -62,12 +62,11 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Dog {\n"); sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - +sb.Append(" Breed: ").Append(Breed).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -123,13 +122,10 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.ClassName != null) hash = hash * 59 + this.ClassName.GetHashCode(); - if (this.Breed != null) hash = hash * 59 + this.Breed.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs index bfcd371a1df..4985f365053 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs @@ -57,7 +57,7 @@ namespace IO.Swagger.Model this.DateTime = DateTime; } - + /// /// Gets or Sets Integer @@ -134,21 +134,20 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class FormatTest {\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(" _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(" 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(" _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("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -249,40 +248,28 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Integer != null) hash = hash * 59 + this.Integer.GetHashCode(); - if (this.Int32 != null) hash = hash * 59 + this.Int32.GetHashCode(); - if (this.Int64 != null) hash = hash * 59 + this.Int64.GetHashCode(); - if (this.Number != null) hash = hash * 59 + this.Number.GetHashCode(); - if (this._Float != null) hash = hash * 59 + this._Float.GetHashCode(); - if (this._Double != null) hash = hash * 59 + this._Double.GetHashCode(); - if (this._String != null) hash = hash * 59 + this._String.GetHashCode(); - if (this._Byte != null) hash = hash * 59 + this._Byte.GetHashCode(); - if (this.Binary != null) hash = hash * 59 + this.Binary.GetHashCode(); - if (this.Date != null) hash = hash * 59 + this.Date.GetHashCode(); - if (this.DateTime != null) hash = hash * 59 + this.DateTime.GetHashCode(); - return hash; } } 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 8889cdae0a7..e58dd38354d 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 @@ -17,7 +17,7 @@ namespace IO.Swagger.Model [DataContract] public partial class InlineResponse200 : IEquatable { - + /// /// pet status in the store /// @@ -72,7 +72,7 @@ namespace IO.Swagger.Model this.PhotoUrls = PhotoUrls; } - + /// /// Gets or Sets Tags @@ -113,16 +113,15 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class InlineResponse200 {\n"); sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).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(" Id: ").Append(Id).Append("\n"); +sb.Append(" Category: ").Append(Category).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(); } - + /// /// Returns the JSON string presentation of the object /// @@ -198,25 +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.Id != null) hash = hash * 59 + this.Id.GetHashCode(); - if (this.Category != null) hash = hash * 59 + this.Category.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; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Model200Response.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Model200Response.cs index 4c8cfb0cb13..9199732c8e7 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Model200Response.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Model200Response.cs @@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters; namespace IO.Swagger.Model { /// - /// + /// Model for testing model name starting with number /// [DataContract] public partial class Model200Response : IEquatable @@ -29,7 +29,7 @@ namespace IO.Swagger.Model this.Name = Name; } - + /// /// Gets or Sets Name @@ -46,11 +46,10 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Model200Response {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -101,10 +100,8 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Name != null) hash = hash * 59 + this.Name.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ModelReturn.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ModelReturn.cs index 4f900214c45..a65c1430953 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ModelReturn.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/ModelReturn.cs @@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters; namespace IO.Swagger.Model { /// - /// + /// Model for testing reserved words /// [DataContract] public partial class ModelReturn : IEquatable @@ -29,7 +29,7 @@ namespace IO.Swagger.Model this._Return = _Return; } - + /// /// Gets or Sets _Return @@ -46,11 +46,10 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class ModelReturn {\n"); sb.Append(" _Return: ").Append(_Return).Append("\n"); - sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -101,10 +100,8 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this._Return != null) hash = hash * 59 + this._Return.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs index 6e5661e1d44..663e9d88e4c 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs @@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters; namespace IO.Swagger.Model { /// - /// + /// Model for testing model name same as property name /// [DataContract] public partial class Name : IEquatable @@ -37,7 +37,7 @@ namespace IO.Swagger.Model } } - + /// /// Gets or Sets _Name @@ -60,12 +60,11 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" _Name: ").Append(_Name).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - +sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -121,13 +120,10 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this._Name != null) hash = hash * 59 + this._Name.GetHashCode(); - if (this.SnakeCase != null) hash = hash * 59 + this.SnakeCase.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs index db712c98181..7942042e0e0 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs @@ -17,7 +17,7 @@ namespace IO.Swagger.Model [DataContract] public partial class Order : IEquatable { - + /// /// Order Status /// @@ -62,7 +62,7 @@ namespace IO.Swagger.Model this.Complete = Complete; } - + /// /// Gets or Sets Id @@ -103,16 +103,15 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Order {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - +sb.Append(" PetId: ").Append(PetId).Append("\n"); +sb.Append(" Quantity: ").Append(Quantity).Append("\n"); +sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); +sb.Append(" Status: ").Append(Status).Append("\n"); +sb.Append(" Complete: ").Append(Complete).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -188,25 +187,18 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Id != null) hash = hash * 59 + this.Id.GetHashCode(); - if (this.PetId != null) hash = hash * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) hash = hash * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) hash = hash * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) hash = hash * 59 + this.Status.GetHashCode(); - if (this.Complete != null) hash = hash * 59 + this.Complete.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs index 5d30c24af78..534dd6fd42d 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Pet.cs @@ -17,7 +17,7 @@ namespace IO.Swagger.Model [DataContract] public partial class Pet : IEquatable { - + /// /// pet status in the store /// @@ -80,7 +80,7 @@ namespace IO.Swagger.Model this.Status = Status; } - + /// /// Gets or Sets Id @@ -121,16 +121,15 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Pet {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - +sb.Append(" Category: ").Append(Category).Append("\n"); +sb.Append(" Name: ").Append(Name).Append("\n"); +sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); +sb.Append(" Tags: ").Append(Tags).Append("\n"); +sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -206,25 +205,18 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Id != null) hash = hash * 59 + this.Id.GetHashCode(); - if (this.Category != null) hash = hash * 59 + this.Category.GetHashCode(); - if (this.Name != null) hash = hash * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) hash = hash * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) hash = hash * 59 + this.Tags.GetHashCode(); - if (this.Status != null) hash = hash * 59 + this.Status.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/SpecialModelName.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/SpecialModelName.cs index 4424503f008..7912fffa1fc 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/SpecialModelName.cs @@ -29,7 +29,7 @@ namespace IO.Swagger.Model this.SpecialPropertyName = SpecialPropertyName; } - + /// /// Gets or Sets SpecialPropertyName @@ -46,11 +46,10 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -101,10 +100,8 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.SpecialPropertyName != null) hash = hash * 59 + this.SpecialPropertyName.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs index 8b511075d56..84b6091bf7a 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Tag.cs @@ -31,7 +31,7 @@ namespace IO.Swagger.Model this.Name = Name; } - + /// /// Gets or Sets Id @@ -54,12 +54,11 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class Tag {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - +sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -115,13 +114,10 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Id != null) hash = hash * 59 + this.Id.GetHashCode(); - if (this.Name != null) hash = hash * 59 + this.Name.GetHashCode(); - return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs index 2216619c0bf..3563543b81c 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/User.cs @@ -43,7 +43,7 @@ namespace IO.Swagger.Model this.UserStatus = UserStatus; } - + /// /// Gets or Sets Id @@ -103,18 +103,17 @@ namespace IO.Swagger.Model var sb = new StringBuilder(); sb.Append("class User {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - +sb.Append(" Username: ").Append(Username).Append("\n"); +sb.Append(" FirstName: ").Append(FirstName).Append("\n"); +sb.Append(" LastName: ").Append(LastName).Append("\n"); +sb.Append(" Email: ").Append(Email).Append("\n"); +sb.Append(" Password: ").Append(Password).Append("\n"); +sb.Append(" Phone: ").Append(Phone).Append("\n"); +sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// /// Returns the JSON string presentation of the object /// @@ -200,31 +199,22 @@ namespace IO.Swagger.Model { int hash = 41; // Suitable nullity checks etc, of course :) - if (this.Id != null) hash = hash * 59 + this.Id.GetHashCode(); - if (this.Username != null) hash = hash * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) hash = hash * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) hash = hash * 59 + this.LastName.GetHashCode(); - if (this.Email != null) hash = hash * 59 + this.Email.GetHashCode(); - if (this.Password != null) hash = hash * 59 + this.Password.GetHashCode(); - if (this.Phone != null) hash = hash * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) hash = hash * 59 + this.UserStatus.GetHashCode(); - return hash; } }