Merge pull request #2541 from wing328/csharp_remove_trailing_whitespace

[C#] remove trailing spaces from C# API client
This commit is contained in:
wing328 2016-04-10 23:47:05 +08:00
commit f66046c932
48 changed files with 767 additions and 1311 deletions

View File

@ -63,7 +63,7 @@ namespace {{packageName}}.Client
/// <value>The default API client.</value>
[Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")]
public static ApiClient Default;
/// <summary>
/// Gets or sets the Configuration.
/// </summary>
@ -75,7 +75,7 @@ namespace {{packageName}}.Client
/// </summary>
/// <value>An instance of the RestClient</value>
public RestClient RestClient { get; set; }
// Creates and sets up a RestRequest prior to a call.
private RestRequest PrepareRequest(
String path, RestSharp.Method method, Dictionary<String, String> 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}}
/// <summary>
/// Escape string (url-encoded).
/// </summary>
@ -187,7 +187,7 @@ namespace {{packageName}}.Client
{
return UrlEncode(str);
}
/// <summary>
/// Create FileParameter based on Stream.
/// </summary>
@ -201,7 +201,7 @@ namespace {{packageName}}.Client
else
return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided");
}
/// <summary>
/// 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);
}
/// <summary>
/// Deserialize the JSON string into a proper object.
/// </summary>
@ -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);
}
}
/// <summary>
/// Serialize an input (model) into JSON string
/// </summary>
@ -312,7 +312,7 @@ namespace {{packageName}}.Client
throw new ApiException(500, e.Message);
}
}
/// <summary>
/// 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);
}
/// <summary>
/// Encode string in base64 format.
/// </summary>
@ -358,7 +358,7 @@ namespace {{packageName}}.Client
{
return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));
}
/// <summary>
/// Dynamically cast the object into target type.
/// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast

View File

@ -12,18 +12,18 @@ namespace {{packageName}}.Client
/// </summary>
/// <value>The error code (HTTP status code).</value>
public int ErrorCode { get; set; }
/// <summary>
/// Gets or sets the error content (body json object)
/// </summary>
/// <value>The error content (Http response body).</value>
public {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} ErrorContent { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
public ApiException() {}
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
@ -33,7 +33,7 @@ namespace {{packageName}}.Client
{
this.ErrorCode = errorCode;
}
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
@ -46,5 +46,5 @@ namespace {{packageName}}.Client
this.ErrorContent = errorContent;
}
}
}

View File

@ -13,19 +13,19 @@ namespace {{packageName}}.Client
/// </summary>
/// <value>The status code.</value>
public int StatusCode { get; private set; }
/// <summary>
/// Gets or sets the HTTP headers
/// </summary>
/// <value>HTTP headers</value>
public IDictionary<string, string> Headers { get; private set; }
/// <summary>
/// Gets or sets the data (parsed HTTP body)
/// </summary>
/// <value>The data.</value>
public T Data { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="ApiResponse&lt;T&gt;" /> class.
/// </summary>
@ -38,7 +38,7 @@ namespace {{packageName}}.Client
this.Headers = headers;
this.Data = data;
}
}
}

View File

@ -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

View File

@ -28,7 +28,7 @@ namespace {{packageName}}.Api
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns>
{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
/// <summary>
/// {{summary}}
/// </summary>
@ -69,7 +69,7 @@ namespace {{packageName}}.Api
#endregion Asynchronous Operations
{{/supportsAsync}}
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
@ -89,7 +89,7 @@ namespace {{packageName}}.Api
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="{{classname}}"/> 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
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
@ -156,13 +156,13 @@ namespace {{packageName}}.Api
{
this.Configuration.AddDefaultHeader(key, value);
}
{{#operation}}
/// <summary>
/// {{summary}} {{notes}}
/// </summary>
/// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{/allParams}}/// <returns>{{#returnType}}{{returnType}}{{/returnType}}</returns>
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}}
/// </summary>
/// <exception cref="{{packageName}}.Client.ApiException">Thrown when fails to make API call</exception>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{#allParams}}/// <param name="{{paramName}}">{{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}</param>
{{/allParams}}/// <returns>ApiResponse of {{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Object(void){{/returnType}}</returns>
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<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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)

View File

@ -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}}
}

View File

@ -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

View File

@ -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

View File

@ -146,7 +146,7 @@ UpgradeLog*.htm
*.txt~
*.swp
*.swo
# svn
.svn

View File

@ -19,7 +19,7 @@ namespace {{packageName}}.Model
[DataContract]
public partial class {{classname}} : {{#parent}}{{{parent}}}, {{/parent}} IEquatable<{{classname}}>
{ {{#vars}}{{#isEnum}}
/// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
/// </summary>{{#description}}
@ -64,7 +64,7 @@ namespace {{packageName}}.Model
{{/defaultValue}}{{^defaultValue}}this.{{name}} = {{name}};
{{/defaultValue}}{{/required}}{{/isReadOnly}}{{/vars}}
}
{{#vars}}{{^isEnum}}
/// <summary>
/// {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
@ -86,7 +86,7 @@ namespace {{packageName}}.Model
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>

View File

@ -33,7 +33,7 @@ namespace {{packageName}}.Test
{
instance = new {{classname}}();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -41,7 +41,7 @@ namespace {{packageName}}.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of {{classname}}
@ -54,12 +54,12 @@ namespace {{packageName}}.Test
{{#vars}}
/// <summary>
/// Test the property '{{name}}'
/// Test the property '{{name}}'
/// </summary>
[Test]
public void {{name}}Test()
{
// TODO: unit test for the property '{{name}}'
// TODO: unit test for the property '{{name}}'
}
{{/vars}}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Category();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of Category
@ -50,25 +50,22 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<Category> (instance, "instance is a Category");
}
/// <summary>
/// Test the property 'Id'
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
// TODO: unit test for the property 'Name'
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new InlineResponse200();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of InlineResponse200
@ -50,61 +50,54 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<InlineResponse200> (instance, "instance is a InlineResponse200");
}
/// <summary>
/// Test the property 'Tags'
/// Test the property 'Tags'
/// </summary>
[Test]
public void TagsTest()
{
// TODO: unit test for the property 'Tags'
// TODO: unit test for the property 'Tags'
}
/// <summary>
/// Test the property 'Id'
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Category'
/// Test the property 'Category'
/// </summary>
[Test]
public void CategoryTest()
{
// TODO: unit test for the property 'Category'
// TODO: unit test for the property 'Category'
}
/// <summary>
/// Test the property 'Status'
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO: unit test for the property 'Status'
// TODO: unit test for the property 'Status'
}
/// <summary>
/// Test the property 'Name'
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
// TODO: unit test for the property 'Name'
}
/// <summary>
/// Test the property 'PhotoUrls'
/// Test the property 'PhotoUrls'
/// </summary>
[Test]
public void PhotoUrlsTest()
{
// TODO: unit test for the property 'PhotoUrls'
// TODO: unit test for the property 'PhotoUrls'
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Model200Response();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of Model200Response
@ -50,16 +50,14 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<Model200Response> (instance, "instance is a Model200Response");
}
/// <summary>
/// Test the property 'Name'
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
// TODO: unit test for the property 'Name'
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new ModelReturn();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of ModelReturn
@ -50,16 +50,14 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<ModelReturn> (instance, "instance is a ModelReturn");
}
/// <summary>
/// Test the property '_Return'
/// Test the property '_Return'
/// </summary>
[Test]
public void _ReturnTest()
{
// TODO: unit test for the property '_Return'
// TODO: unit test for the property '_Return'
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Name();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of Name
@ -50,25 +50,22 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<Name> (instance, "instance is a Name");
}
/// <summary>
/// Test the property '_Name'
/// Test the property '_Name'
/// </summary>
[Test]
public void _NameTest()
{
// TODO: unit test for the property '_Name'
// TODO: unit test for the property '_Name'
}
/// <summary>
/// Test the property 'SnakeCase'
/// Test the property 'SnakeCase'
/// </summary>
[Test]
public void SnakeCaseTest()
{
// TODO: unit test for the property 'SnakeCase'
// TODO: unit test for the property 'SnakeCase'
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Order();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of Order
@ -50,61 +50,54 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<Order> (instance, "instance is a Order");
}
/// <summary>
/// Test the property 'Id'
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'PetId'
/// Test the property 'PetId'
/// </summary>
[Test]
public void PetIdTest()
{
// TODO: unit test for the property 'PetId'
// TODO: unit test for the property 'PetId'
}
/// <summary>
/// Test the property 'Quantity'
/// Test the property 'Quantity'
/// </summary>
[Test]
public void QuantityTest()
{
// TODO: unit test for the property 'Quantity'
// TODO: unit test for the property 'Quantity'
}
/// <summary>
/// Test the property 'ShipDate'
/// Test the property 'ShipDate'
/// </summary>
[Test]
public void ShipDateTest()
{
// TODO: unit test for the property 'ShipDate'
// TODO: unit test for the property 'ShipDate'
}
/// <summary>
/// Test the property 'Status'
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO: unit test for the property 'Status'
// TODO: unit test for the property 'Status'
}
/// <summary>
/// Test the property 'Complete'
/// Test the property 'Complete'
/// </summary>
[Test]
public void CompleteTest()
{
// TODO: unit test for the property 'Complete'
// TODO: unit test for the property 'Complete'
}
}

View File

@ -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);
}
/// <summary>
@ -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);
}
/// <summary>
@ -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);
}
/// <summary>
@ -101,9 +98,8 @@ namespace IO.Swagger.Test
{
// TODO: add unit test for the method 'FindPetsByStatus'
List<string> status = null; // TODO: replace null with proper value
var response = instance.FindPetsByStatus(status);
Assert.IsInstanceOf<List<Pet>> (response, "response is List<Pet>");
Assert.IsInstanceOf<List<Pet>> (response, "response is List<Pet>");
}
/// <summary>
@ -114,9 +110,8 @@ namespace IO.Swagger.Test
{
// TODO: add unit test for the method 'FindPetsByTags'
List<string> tags = null; // TODO: replace null with proper value
var response = instance.FindPetsByTags(tags);
Assert.IsInstanceOf<List<Pet>> (response, "response is List<Pet>");
Assert.IsInstanceOf<List<Pet>> (response, "response is List<Pet>");
}
/// <summary>
@ -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<Pet> (response, "response is Pet");
Assert.IsInstanceOf<Pet> (response, "response is Pet");
}
/// <summary>
@ -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<InlineResponse200> (response, "response is InlineResponse200");
Assert.IsInstanceOf<InlineResponse200> (response, "response is InlineResponse200");
}
/// <summary>
@ -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<byte[]> (response, "response is byte[]");
Assert.IsInstanceOf<byte[]> (response, "response is byte[]");
}
/// <summary>
@ -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);
}
/// <summary>
@ -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);
}
/// <summary>
@ -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);
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Pet();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of Pet
@ -50,61 +50,54 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<Pet> (instance, "instance is a Pet");
}
/// <summary>
/// Test the property 'Id'
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Category'
/// Test the property 'Category'
/// </summary>
[Test]
public void CategoryTest()
{
// TODO: unit test for the property 'Category'
// TODO: unit test for the property 'Category'
}
/// <summary>
/// Test the property 'Name'
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
// TODO: unit test for the property 'Name'
}
/// <summary>
/// Test the property 'PhotoUrls'
/// Test the property 'PhotoUrls'
/// </summary>
[Test]
public void PhotoUrlsTest()
{
// TODO: unit test for the property 'PhotoUrls'
// TODO: unit test for the property 'PhotoUrls'
}
/// <summary>
/// Test the property 'Tags'
/// Test the property 'Tags'
/// </summary>
[Test]
public void TagsTest()
{
// TODO: unit test for the property 'Tags'
// TODO: unit test for the property 'Tags'
}
/// <summary>
/// Test the property 'Status'
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO: unit test for the property 'Status'
// TODO: unit test for the property 'Status'
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new SpecialModelName();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of SpecialModelName
@ -50,16 +50,14 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<SpecialModelName> (instance, "instance is a SpecialModelName");
}
/// <summary>
/// Test the property 'SpecialPropertyName'
/// Test the property 'SpecialPropertyName'
/// </summary>
[Test]
public void SpecialPropertyNameTest()
{
// TODO: unit test for the property 'SpecialPropertyName'
// TODO: unit test for the property 'SpecialPropertyName'
}
}

View File

@ -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);
}
/// <summary>
@ -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<List<Order>> (response, "response is List<Order>");
Assert.IsInstanceOf<List<Order>> (response, "response is List<Order>");
}
/// <summary>
@ -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<Dictionary<string, int?>> (response, "response is Dictionary<string, int?>");
var response = instance.GetInventory();
Assert.IsInstanceOf<Dictionary<string, int?>> (response, "response is Dictionary<string, int?>");
}
/// <summary>
@ -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<Object> (response, "response is Object");
var response = instance.GetInventoryInObject();
Assert.IsInstanceOf<Object> (response, "response is Object");
}
/// <summary>
@ -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<Order> (response, "response is Order");
Assert.IsInstanceOf<Order> (response, "response is Order");
}
/// <summary>
@ -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<Order> (response, "response is Order");
Assert.IsInstanceOf<Order> (response, "response is Order");
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new Tag();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of Tag
@ -50,25 +50,22 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<Tag> (instance, "instance is a Tag");
}
/// <summary>
/// Test the property 'Id'
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
// TODO: unit test for the property 'Name'
}
}

View File

@ -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);
}
/// <summary>
@ -74,9 +73,8 @@ namespace IO.Swagger.Test
{
// TODO: add unit test for the method 'CreateUsersWithArrayInput'
List<User> body = null; // TODO: replace null with proper value
instance.CreateUsersWithArrayInput(body);
}
/// <summary>
@ -87,9 +85,8 @@ namespace IO.Swagger.Test
{
// TODO: add unit test for the method 'CreateUsersWithListInput'
List<User> body = null; // TODO: replace null with proper value
instance.CreateUsersWithListInput(body);
}
/// <summary>
@ -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);
}
/// <summary>
@ -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<User> (response, "response is User");
Assert.IsInstanceOf<User> (response, "response is User");
}
/// <summary>
@ -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<string> (response, "response is string");
Assert.IsInstanceOf<string> (response, "response is string");
}
/// <summary>
@ -139,9 +133,8 @@ namespace IO.Swagger.Test
public void LogoutUserTest()
{
// TODO: add unit test for the method 'LogoutUser'
instance.LogoutUser();
instance.LogoutUser();
}
/// <summary>
@ -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);
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Test
{
instance = new User();
}
/// <summary>
/// Clean up after each test
/// </summary>
@ -39,7 +39,7 @@ namespace IO.Swagger.Test
public void Cleanup()
{
}
}
/// <summary>
/// Test an instance of User
@ -50,79 +50,70 @@ namespace IO.Swagger.Test
Assert.IsInstanceOf<User> (instance, "instance is a User");
}
/// <summary>
/// Test the property 'Id'
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Username'
/// Test the property 'Username'
/// </summary>
[Test]
public void UsernameTest()
{
// TODO: unit test for the property 'Username'
// TODO: unit test for the property 'Username'
}
/// <summary>
/// Test the property 'FirstName'
/// Test the property 'FirstName'
/// </summary>
[Test]
public void FirstNameTest()
{
// TODO: unit test for the property 'FirstName'
// TODO: unit test for the property 'FirstName'
}
/// <summary>
/// Test the property 'LastName'
/// Test the property 'LastName'
/// </summary>
[Test]
public void LastNameTest()
{
// TODO: unit test for the property 'LastName'
// TODO: unit test for the property 'LastName'
}
/// <summary>
/// Test the property 'Email'
/// Test the property 'Email'
/// </summary>
[Test]
public void EmailTest()
{
// TODO: unit test for the property 'Email'
// TODO: unit test for the property 'Email'
}
/// <summary>
/// Test the property 'Password'
/// Test the property 'Password'
/// </summary>
[Test]
public void PasswordTest()
{
// TODO: unit test for the property 'Password'
// TODO: unit test for the property 'Password'
}
/// <summary>
/// Test the property 'Phone'
/// Test the property 'Phone'
/// </summary>
[Test]
public void PhoneTest()
{
// TODO: unit test for the property 'Phone'
// TODO: unit test for the property 'Phone'
}
/// <summary>
/// Test the property 'UserStatus'
/// Test the property 'UserStatus'
/// </summary>
[Test]
public void UserStatusTest()
{
// TODO: unit test for the property 'UserStatus'
// TODO: unit test for the property 'UserStatus'
}
}

View File

@ -146,7 +146,7 @@ UpgradeLog*.htm
*.txt~
*.swp
*.swo
# svn
.svn

View File

@ -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

View File

@ -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

View File

@ -9,14 +9,12 @@ using IO.Swagger.Model;
namespace IO.Swagger.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IStoreApi
{
#region Synchronous Operations
/// <summary>
/// Delete purchase order by ID
/// </summary>
@ -27,7 +25,7 @@ namespace IO.Swagger.Api
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns></returns>
void DeleteOrder (string orderId);
/// <summary>
/// Delete purchase order by ID
/// </summary>
@ -38,7 +36,6 @@ namespace IO.Swagger.Api
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeleteOrderWithHttpInfo (string orderId);
/// <summary>
/// Finds orders by status
/// </summary>
@ -49,7 +46,7 @@ namespace IO.Swagger.Api
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <returns>List&lt;Order&gt;</returns>
List<Order> FindOrdersByStatus (string status = null);
/// <summary>
/// Finds orders by status
/// </summary>
@ -60,7 +57,6 @@ namespace IO.Swagger.Api
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <returns>ApiResponse of List&lt;Order&gt;</returns>
ApiResponse<List<Order>> FindOrdersByStatusWithHttpInfo (string status = null);
/// <summary>
/// Returns pet inventories by status
/// </summary>
@ -70,7 +66,7 @@ namespace IO.Swagger.Api
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Dictionary&lt;string, int?&gt;</returns>
Dictionary<string, int?> GetInventory ();
/// <summary>
/// Returns pet inventories by status
/// </summary>
@ -80,7 +76,6 @@ namespace IO.Swagger.Api
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Dictionary&lt;string, int?&gt;</returns>
ApiResponse<Dictionary<string, int?>> GetInventoryWithHttpInfo ();
/// <summary>
/// Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
/// </summary>
@ -90,7 +85,7 @@ namespace IO.Swagger.Api
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Object</returns>
Object GetInventoryInObject ();
/// <summary>
/// Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
/// </summary>
@ -100,29 +95,27 @@ namespace IO.Swagger.Api
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Object</returns>
ApiResponse<Object> GetInventoryInObjectWithHttpInfo ();
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Order</returns>
Order GetOrderById (string orderId);
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Order</returns>
ApiResponse<Order> GetOrderByIdWithHttpInfo (string orderId);
/// <summary>
/// Place an order for a pet
/// </summary>
@ -133,7 +126,7 @@ namespace IO.Swagger.Api
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <returns>Order</returns>
Order PlaceOrder (Order body = null);
/// <summary>
/// Place an order for a pet
/// </summary>
@ -144,11 +137,8 @@ namespace IO.Swagger.Api
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <returns>ApiResponse of Order</returns>
ApiResponse<Order> PlaceOrderWithHttpInfo (Order body = null);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// Delete purchase order by ID
/// </summary>
@ -170,7 +160,6 @@ namespace IO.Swagger.Api
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeleteOrderAsyncWithHttpInfo (string orderId);
/// <summary>
/// Finds orders by status
/// </summary>
@ -192,7 +181,6 @@ namespace IO.Swagger.Api
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <returns>Task of ApiResponse (List&lt;Order&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<Order>>> FindOrdersByStatusAsyncWithHttpInfo (string status = null);
/// <summary>
/// Returns pet inventories by status
/// </summary>
@ -212,7 +200,6 @@ namespace IO.Swagger.Api
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Dictionary&lt;string, int?&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ();
/// <summary>
/// Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
/// </summary>
@ -232,12 +219,11 @@ namespace IO.Swagger.Api
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Object)</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> GetInventoryInObjectAsyncWithHttpInfo ();
/// <summary>
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
@ -248,13 +234,12 @@ namespace IO.Swagger.Api
/// Find purchase order by ID
/// </summary>
/// <remarks>
/// For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> GetOrderByIdAsyncWithHttpInfo (string orderId);
/// <summary>
/// Place an order for a pet
/// </summary>
@ -276,11 +261,9 @@ namespace IO.Swagger.Api
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <returns>Task of ApiResponse (Order)</returns>
System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
@ -300,7 +283,7 @@ namespace IO.Swagger.Api
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="StoreApi"/> 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
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
@ -367,13 +350,12 @@ namespace IO.Swagger.Api
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns></returns>
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 &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> 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<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
/// </summary>
@ -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<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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);
}
/// <summary>
/// Finds orders by status A single status value can be provided as a string
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <returns>List&lt;Order&gt;</returns>
public List<Order> 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
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <param name="status">Status value that needs to be considered for query (optional, default to placed)</param>
/// <returns>ApiResponse of List&lt;Order&gt;</returns>
public ApiResponse< List<Order> > FindOrdersByStatusWithHttpInfo (string status = null)
{
var localVarPath = "/store/findByStatus";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<List<Order>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(List<Order>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Order>)));
}
/// <summary>
/// Finds orders by status A single status value can be provided as a string
/// </summary>
@ -635,9 +599,9 @@ namespace IO.Swagger.Api
public async System.Threading.Tasks.Task<ApiResponse<List<Order>>> FindOrdersByStatusAsyncWithHttpInfo (string status = null)
{
var localVarPath = "/store/findByStatus";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<Order>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<Order>)));
}
/// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
@ -722,9 +678,9 @@ namespace IO.Swagger.Api
public ApiResponse< Dictionary<string, int?> > GetInventoryWithHttpInfo ()
{
var localVarPath = "/store/inventory";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<Dictionary<string, int?>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Dictionary<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
}
/// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
@ -802,9 +752,9 @@ namespace IO.Swagger.Api
public async System.Threading.Tasks.Task<ApiResponse<Dictionary<string, int?>>> GetInventoryAsyncWithHttpInfo ()
{
var localVarPath = "/store/inventory";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<string, int?>) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
}
/// <summary>
/// Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; Returns an arbitrary object which is actually a map of status codes to quantities
/// </summary>
@ -881,9 +824,9 @@ namespace IO.Swagger.Api
public ApiResponse< Object > GetInventoryInObjectWithHttpInfo ()
{
var localVarPath = "/store/inventory?response=arbitrary_object";
var localVarPath = "/store/inventory?response&#x3D;arbitrary_object";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Object) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object)));
}
/// <summary>
/// Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; Returns an arbitrary object which is actually a map of status codes to quantities
/// </summary>
@ -961,9 +898,9 @@ namespace IO.Swagger.Api
public async System.Threading.Tasks.Task<ApiResponse<Object>> GetInventoryInObjectAsyncWithHttpInfo ()
{
var localVarPath = "/store/inventory?response=arbitrary_object";
var localVarPath = "/store/inventory?response&#x3D;arbitrary_object";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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)));
}
/// <summary>
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>Order</returns>
public Order GetOrderById (string orderId)
{
@ -1034,10 +964,10 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <param name="orderId">ID of pet that needs to be fetched</param>
/// <returns>ApiResponse of Order</returns>
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<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<Order>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
}
/// <summary>
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
@ -1127,7 +1051,7 @@ namespace IO.Swagger.Api
}
/// <summary>
/// Find purchase order by ID For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
/// Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of pet that needs to be fetched</param>
@ -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<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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)));
}
/// <summary>
/// Place an order for a pet
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <returns>Order</returns>
public Order PlaceOrder (Order body = null)
{
@ -1221,14 +1137,14 @@ namespace IO.Swagger.Api
/// Place an order for a pet
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <param name="body">order placed for purchasing the pet (optional)</param>
/// <returns>ApiResponse of Order</returns>
public ApiResponse< Order > PlaceOrderWithHttpInfo (Order body = null)
{
var localVarPath = "/store/order";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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<Order>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Order) Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order)));
}
/// <summary>
/// Place an order for a pet
/// </summary>
@ -1321,9 +1231,9 @@ namespace IO.Swagger.Api
public async System.Threading.Tasks.Task<ApiResponse<Order>> PlaceOrderAsyncWithHttpInfo (Order body = null)
{
var localVarPath = "/store/order";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new Dictionary<String, String>();
var localVarHeaderParams = new Dictionary<String, String>(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)));
}
}
}

View File

@ -63,7 +63,7 @@ namespace IO.Swagger.Client
/// <value>The default API client.</value>
[Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")]
public static ApiClient Default;
/// <summary>
/// Gets or sets the Configuration.
/// </summary>
@ -75,7 +75,7 @@ namespace IO.Swagger.Client
/// </summary>
/// <value>An instance of the RestClient</value>
public RestClient RestClient { get; set; }
// Creates and sets up a RestRequest prior to a call.
private RestRequest PrepareRequest(
String path, RestSharp.Method method, Dictionary<String, String> 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;
}
/// <summary>
/// Makes the asynchronous HTTP request.
/// </summary>
@ -177,7 +176,7 @@ namespace IO.Swagger.Client
var response = await RestClient.ExecuteTaskAsync(request);
return (Object)response;
}
/// <summary>
/// Escape string (url-encoded).
/// </summary>
@ -187,7 +186,7 @@ namespace IO.Swagger.Client
{
return UrlEncode(str);
}
/// <summary>
/// Create FileParameter based on Stream.
/// </summary>
@ -201,7 +200,7 @@ namespace IO.Swagger.Client
else
return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided");
}
/// <summary>
/// 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);
}
/// <summary>
/// Deserialize the JSON string into a proper object.
/// </summary>
@ -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);
}
}
/// <summary>
/// Serialize an input (model) into JSON string
/// </summary>
@ -312,7 +311,7 @@ namespace IO.Swagger.Client
throw new ApiException(500, e.Message);
}
}
/// <summary>
/// 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);
}
/// <summary>
/// Encode string in base64 format.
/// </summary>
@ -358,7 +357,7 @@ namespace IO.Swagger.Client
{
return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));
}
/// <summary>
/// Dynamically cast the object into target type.
/// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast

View File

@ -12,18 +12,18 @@ namespace IO.Swagger.Client
/// </summary>
/// <value>The error code (HTTP status code).</value>
public int ErrorCode { get; set; }
/// <summary>
/// Gets or sets the error content (body json object)
/// </summary>
/// <value>The error content (Http response body).</value>
public dynamic ErrorContent { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
public ApiException() {}
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
@ -33,7 +33,7 @@ namespace IO.Swagger.Client
{
this.ErrorCode = errorCode;
}
/// <summary>
/// Initializes a new instance of the <see cref="ApiException"/> class.
/// </summary>
@ -46,5 +46,5 @@ namespace IO.Swagger.Client
this.ErrorContent = errorContent;
}
}
}

View File

@ -13,19 +13,19 @@ namespace IO.Swagger.Client
/// </summary>
/// <value>The status code.</value>
public int StatusCode { get; private set; }
/// <summary>
/// Gets or sets the HTTP headers
/// </summary>
/// <value>HTTP headers</value>
public IDictionary<string, string> Headers { get; private set; }
/// <summary>
/// Gets or sets the data (parsed HTTP body)
/// </summary>
/// <value>The data.</value>
public T Data { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="ApiResponse&lt;T&gt;" /> class.
/// </summary>
@ -38,7 +38,7 @@ namespace IO.Swagger.Client
this.Headers = headers;
this.Data = data;
}
}
}

View File

@ -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

View File

@ -37,7 +37,7 @@ namespace IO.Swagger.Model
}
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -39,7 +39,7 @@ namespace IO.Swagger.Model
this.Declawed = Declawed;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Model
this.Name = Name;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -39,7 +39,7 @@ namespace IO.Swagger.Model
this.Breed = Breed;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -57,7 +57,7 @@ namespace IO.Swagger.Model
this.DateTime = DateTime;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -17,7 +17,7 @@ namespace IO.Swagger.Model
[DataContract]
public partial class InlineResponse200 : IEquatable<InlineResponse200>
{
/// <summary>
/// pet status in the store
/// </summary>
@ -72,7 +72,7 @@ namespace IO.Swagger.Model
this.PhotoUrls = PhotoUrls;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model
{
/// <summary>
///
/// Model for testing model name starting with number
/// </summary>
[DataContract]
public partial class Model200Response : IEquatable<Model200Response>
@ -29,7 +29,7 @@ namespace IO.Swagger.Model
this.Name = Name;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model
{
/// <summary>
///
/// Model for testing reserved words
/// </summary>
[DataContract]
public partial class ModelReturn : IEquatable<ModelReturn>
@ -29,7 +29,7 @@ namespace IO.Swagger.Model
this._Return = _Return;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -12,7 +12,7 @@ using Newtonsoft.Json.Converters;
namespace IO.Swagger.Model
{
/// <summary>
///
/// Model for testing model name same as property name
/// </summary>
[DataContract]
public partial class Name : IEquatable<Name>
@ -37,7 +37,7 @@ namespace IO.Swagger.Model
}
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -17,7 +17,7 @@ namespace IO.Swagger.Model
[DataContract]
public partial class Order : IEquatable<Order>
{
/// <summary>
/// Order Status
/// </summary>
@ -62,7 +62,7 @@ namespace IO.Swagger.Model
this.Complete = Complete;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -17,7 +17,7 @@ namespace IO.Swagger.Model
[DataContract]
public partial class Pet : IEquatable<Pet>
{
/// <summary>
/// pet status in the store
/// </summary>
@ -80,7 +80,7 @@ namespace IO.Swagger.Model
this.Status = Status;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -29,7 +29,7 @@ namespace IO.Swagger.Model
this.SpecialPropertyName = SpecialPropertyName;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -31,7 +31,7 @@ namespace IO.Swagger.Model
this.Name = Name;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}

View File

@ -43,7 +43,7 @@ namespace IO.Swagger.Model
this.UserStatus = UserStatus;
}
/// <summary>
/// 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();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
@ -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;
}
}