Merge remote-tracking branch 'origin/4.2.x' into 5.0.x

This commit is contained in:
William Cheng
2019-09-22 21:00:38 +08:00
2432 changed files with 40079 additions and 14159 deletions

View File

@@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StringItem** | **string** | |
**NumberItem** | **decimal** | |
**FloatItem** | **float** | |
**IntegerItem** | **int** | |
**BoolItem** | **bool** | |
**ArrayItem** | **List<int>** | |

View File

@@ -1,11 +1,17 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update"
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
@@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
@@ -47,6 +53,6 @@ fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

@@ -279,11 +279,11 @@ namespace Org.OpenAPITools.Test
Stream _imageStream = _assembly.GetManifestResourceStream("Org.OpenAPITools.Test.linux-logo.png");
PetApi petApi = new PetApi();
// test file upload with form parameters
//petApi.UploadFile(petId, "new form name", _imageStream);
petApi.UploadFile(petId, "new form name", _imageStream);
// test file upload without any form parameters
// using optional parameter syntax introduced at .net 4.0
//petApi.UploadFile(petId: petId, file: _imageStream);
petApi.UploadFile(petId: petId, file: _imageStream);
}
/// <summary>

View File

@@ -320,7 +320,7 @@ namespace Org.OpenAPITools.Client
request.RequestFormat = DataFormat.Json;
}
request.AddBody(options.Data);
request.AddJsonBody(options.Data);
}
if (options.FileParameters != null)
@@ -330,9 +330,9 @@ namespace Org.OpenAPITools.Client
var bytes = ClientUtils.ReadAsBytes(fileParam.Value);
var fileStream = fileParam.Value as FileStream;
if (fileStream != null)
FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name));
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)));
else
FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided");
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided"));
}
}

View File

@@ -395,7 +395,7 @@ namespace Org.OpenAPITools.Client
{
ApiKey = apiKey,
ApiKeyPrefix = apiKeyPrefix,
DefaultHeader = defaultHeaders,
DefaultHeaders = defaultHeaders,
BasePath = second.BasePath ?? first.BasePath,
Timeout = second.Timeout,
UserAgent = second.UserAgent ?? first.UserAgent,

View File

@@ -42,10 +42,11 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="stringItem">stringItem (required).</param>
/// <param name="numberItem">numberItem (required).</param>
/// <param name="floatItem">floatItem (required).</param>
/// <param name="integerItem">integerItem (required).</param>
/// <param name="boolItem">boolItem (required).</param>
/// <param name="arrayItem">arrayItem (required).</param>
public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List<int> arrayItem = default(List<int>))
public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List<int> arrayItem = default(List<int>))
{
// to ensure "stringItem" is required (not null)
if (stringItem == null)
@@ -67,6 +68,16 @@ namespace Org.OpenAPITools.Model
this.NumberItem = numberItem;
}
// to ensure "floatItem" is required (not null)
if (floatItem == null)
{
throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null");
}
else
{
this.FloatItem = floatItem;
}
// to ensure "integerItem" is required (not null)
if (integerItem == null)
{
@@ -111,6 +122,12 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="number_item", EmitDefaultValue=false)]
public decimal NumberItem { get; set; }
/// <summary>
/// Gets or Sets FloatItem
/// </summary>
[DataMember(Name="float_item", EmitDefaultValue=false)]
public float FloatItem { get; set; }
/// <summary>
/// Gets or Sets IntegerItem
/// </summary>
@@ -139,6 +156,7 @@ namespace Org.OpenAPITools.Model
sb.Append("class TypeHolderExample {\n");
sb.Append(" StringItem: ").Append(StringItem).Append("\n");
sb.Append(" NumberItem: ").Append(NumberItem).Append("\n");
sb.Append(" FloatItem: ").Append(FloatItem).Append("\n");
sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n");
sb.Append(" BoolItem: ").Append(BoolItem).Append("\n");
sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n");
@@ -187,6 +205,7 @@ namespace Org.OpenAPITools.Model
if (this.StringItem != null)
hashCode = hashCode * 59 + this.StringItem.GetHashCode();
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
hashCode = hashCode * 59 + this.FloatItem.GetHashCode();
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
if (this.ArrayItem != null)

View File

@@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StringItem** | **string** | |
**NumberItem** | **decimal** | |
**FloatItem** | **float** | |
**IntegerItem** | **int** | |
**BoolItem** | **bool** | |
**ArrayItem** | **List&lt;int&gt;** | |

View File

@@ -1,11 +1,17 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update"
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
@@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
@@ -47,6 +53,6 @@ fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

@@ -321,7 +321,7 @@ namespace Org.OpenAPITools.Client
request.RequestFormat = DataFormat.Json;
}
request.AddBody(options.Data);
request.AddJsonBody(options.Data);
}
if (options.FileParameters != null)
@@ -331,9 +331,9 @@ namespace Org.OpenAPITools.Client
var bytes = ClientUtils.ReadAsBytes(fileParam.Value);
var fileStream = fileParam.Value as FileStream;
if (fileStream != null)
FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name));
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name)));
else
FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided");
request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided"));
}
}

View File

@@ -400,7 +400,7 @@ namespace Org.OpenAPITools.Client
{
ApiKey = apiKey,
ApiKeyPrefix = apiKeyPrefix,
DefaultHeader = defaultHeaders,
DefaultHeaders = defaultHeaders,
BasePath = second.BasePath ?? first.BasePath,
Timeout = second.Timeout,
UserAgent = second.UserAgent ?? first.UserAgent,

View File

@@ -42,10 +42,11 @@ namespace Org.OpenAPITools.Model
/// </summary>
/// <param name="stringItem">stringItem (required).</param>
/// <param name="numberItem">numberItem (required).</param>
/// <param name="floatItem">floatItem (required).</param>
/// <param name="integerItem">integerItem (required).</param>
/// <param name="boolItem">boolItem (required).</param>
/// <param name="arrayItem">arrayItem (required).</param>
public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = default(bool), List<int> arrayItem = default(List<int>))
public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List<int> arrayItem = default(List<int>))
{
// to ensure "stringItem" is required (not null)
if (stringItem == null)
@@ -67,6 +68,16 @@ namespace Org.OpenAPITools.Model
this.NumberItem = numberItem;
}
// to ensure "floatItem" is required (not null)
if (floatItem == null)
{
throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null");
}
else
{
this.FloatItem = floatItem;
}
// to ensure "integerItem" is required (not null)
if (integerItem == null)
{
@@ -111,6 +122,12 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="number_item", EmitDefaultValue=false)]
public decimal NumberItem { get; set; }
/// <summary>
/// Gets or Sets FloatItem
/// </summary>
[DataMember(Name="float_item", EmitDefaultValue=false)]
public float FloatItem { get; set; }
/// <summary>
/// Gets or Sets IntegerItem
/// </summary>
@@ -139,6 +156,7 @@ namespace Org.OpenAPITools.Model
sb.Append("class TypeHolderExample {\n");
sb.Append(" StringItem: ").Append(StringItem).Append("\n");
sb.Append(" NumberItem: ").Append(NumberItem).Append("\n");
sb.Append(" FloatItem: ").Append(FloatItem).Append("\n");
sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n");
sb.Append(" BoolItem: ").Append(BoolItem).Append("\n");
sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n");
@@ -187,6 +205,7 @@ namespace Org.OpenAPITools.Model
if (this.StringItem != null)
hashCode = hashCode * 59 + this.StringItem.GetHashCode();
hashCode = hashCode * 59 + this.NumberItem.GetHashCode();
hashCode = hashCode * 59 + this.FloatItem.GetHashCode();
hashCode = hashCode * 59 + this.IntegerItem.GetHashCode();
hashCode = hashCode * 59 + this.BoolItem.GetHashCode();
if (this.ArrayItem != null)