fix uuid for java, php, ruby and csharp

This commit is contained in:
wing328
2016-05-02 22:06:33 +08:00
parent 8f258b9a48
commit d6158c4c55
32 changed files with 522 additions and 85 deletions

View File

@@ -88,7 +88,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"Int32",
"Int64",
"Float",
"Guid",
"Guid?",
"System.IO.Stream", // not really a primitive, we include it to avoid model import
"Object")
);
@@ -115,7 +115,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
typeMapping.put("list", "List");
typeMapping.put("map", "Dictionary");
typeMapping.put("object", "Object");
typeMapping.put("uuid", "Guid");
typeMapping.put("uuid", "Guid?");
}
public void setReturnICollection(boolean returnICollection) {

View File

@@ -89,6 +89,7 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
instantiationTypes.put("map", "HashMap");
typeMapping.put("date", "Date");
typeMapping.put("file", "File");
typeMapping.put("UUID", "String");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));

View File

@@ -111,6 +111,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("object", "object");
typeMapping.put("binary", "string");
typeMapping.put("ByteArray", "string");
typeMapping.put("UUID", "string");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));

View File

@@ -117,6 +117,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("file", "File");
typeMapping.put("binary", "String");
typeMapping.put("ByteArray", "String");
typeMapping.put("UUID", "String");
// remove modelPackage and apiPackage added by default
Iterator<CliOption> itr = cliOptions.iterator();

View File

@@ -139,6 +139,14 @@ namespace IO.Swagger.Test
// TODO: unit test for the property 'DateTime'
}
/// <summary>
/// Test the property 'Uuid'
/// </summary>
[Test]
public void UuidTest()
{
// TODO: unit test for the property 'Uuid'
}
/// <summary>
/// Test the property 'Password'
/// </summary>
[Test]

View File

@@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
- API version: 1.0.0
- SDK version: 1.0.0
- Build date: 2016-04-21T17:22:44.115+08:00
- Build date: 2016-05-02T22:02:29.555+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
## Frameworks supported
@@ -53,20 +53,28 @@ namespace Example
public void main()
{
// Configure OAuth2 access token for authorization: petstore_auth
Configuration.Default.AccessToken = 'YOUR_ACCESS_TOKEN';
var apiInstance = new PetApi();
var body = new Pet(); // Pet | Pet object that needs to be added to the store
var apiInstance = new FakeApi();
var number = 3.4; // double? | None
var _double = 1.2; // double? | None
var _string = _string_example; // string | None
var _byte = B; // byte[] | None
var integer = 56; // int? | None (optional)
var int32 = 56; // int? | None (optional)
var int64 = 789; // long? | None (optional)
var _float = 3.4; // float? | None (optional)
var binary = B; // byte[] | None (optional)
var date = 2013-10-20; // DateTime? | None (optional)
var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional)
var password = password_example; // string | None (optional)
try
{
// Add a new pet to the store
apiInstance.AddPet(body);
// Fake endpoint for testing various parameters
apiInstance.TestEndpointParameters(number, _double, _string, _byte, integer, int32, int64, _float, binary, date, dateTime, password);
}
catch (Exception e)
{
Debug.Print("Exception when calling PetApi.AddPet: " + e.Message );
Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message );
}
}
}
@@ -79,6 +87,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status

View File

@@ -10,11 +10,12 @@ Name | Type | Description | Notes
**_Float** | **float?** | | [optional]
**_Double** | **double?** | | [optional]
**_String** | **string** | | [optional]
**_Byte** | **byte[]** | | [optional]
**_Byte** | **byte[]** | |
**Binary** | **byte[]** | | [optional]
**Date** | **DateTime?** | | [optional]
**Date** | **DateTime?** | |
**DateTime** | **DateTime?** | | [optional]
**Password** | **string** | | [optional]
**Uuid** | **Guid?** | | [optional]
**Password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID"
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID"
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi

View File

@@ -0,0 +1,175 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model
{
/// <summary>
///
/// </summary>
[DataContract]
public class CatDogTest : Cat, IEquatable<CatDogTest>
{
/// <summary>
/// Initializes a new instance of the <see cref="CatDogTest" /> class.
/// </summary>
public CatDogTest()
{
this.CatDogInteger = 0;
}
/// <summary>
/// Gets or Sets CatId
/// </summary>
[DataMember(Name="cat_id", EmitDefaultValue=false)]
public long? CatId { get; set; }
/// <summary>
/// Gets or Sets DogId
/// </summary>
[DataMember(Name="dog_id", EmitDefaultValue=false)]
public long? DogId { get; set; }
/// <summary>
/// integer property for testing allOf
/// </summary>
/// <value>integer property for testing allOf</value>
[DataMember(Name="CatDogInteger", EmitDefaultValue=false)]
public int? CatDogInteger { get; set; }
/// <summary>
/// Gets or Sets DogName
/// </summary>
[DataMember(Name="dog_name", EmitDefaultValue=false)]
public string DogName { get; set; }
/// <summary>
/// Gets or Sets CatName
/// </summary>
[DataMember(Name="cat_name", EmitDefaultValue=false)]
public string CatName { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class CatDogTest {\n");
sb.Append(" CatId: ").Append(CatId).Append("\n");
sb.Append(" DogId: ").Append(DogId).Append("\n");
sb.Append(" CatDogInteger: ").Append(CatDogInteger).Append("\n");
sb.Append(" DogName: ").Append(DogName).Append("\n");
sb.Append(" CatName: ").Append(CatName).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public new string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as CatDogTest);
}
/// <summary>
/// Returns true if CatDogTest instances are equal
/// </summary>
/// <param name="other">Instance of CatDogTest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(CatDogTest other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.CatId == other.CatId ||
this.CatId != null &&
this.CatId.Equals(other.CatId)
) &&
(
this.DogId == other.DogId ||
this.DogId != null &&
this.DogId.Equals(other.DogId)
) &&
(
this.CatDogInteger == other.CatDogInteger ||
this.CatDogInteger != null &&
this.CatDogInteger.Equals(other.CatDogInteger)
) &&
(
this.DogName == other.DogName ||
this.DogName != null &&
this.DogName.Equals(other.DogName)
) &&
(
this.CatName == other.CatName ||
this.CatName != null &&
this.CatName.Equals(other.CatName)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.CatId != null)
hash = hash * 57 + this.CatId.GetHashCode();
if (this.DogId != null)
hash = hash * 57 + this.DogId.GetHashCode();
if (this.CatDogInteger != null)
hash = hash * 57 + this.CatDogInteger.GetHashCode();
if (this.DogName != null)
hash = hash * 57 + this.DogName.GetHashCode();
if (this.CatName != null)
hash = hash * 57 + this.CatName.GetHashCode();
return hash;
}
}
}
}

View File

@@ -29,13 +29,14 @@ namespace IO.Swagger.Model
/// <param name="_Float">_Float.</param>
/// <param name="_Double">_Double.</param>
/// <param name="_String">_String.</param>
/// <param name="_Byte">_Byte.</param>
/// <param name="_Byte">_Byte (required).</param>
/// <param name="Binary">Binary.</param>
/// <param name="Date">Date.</param>
/// <param name="Date">Date (required).</param>
/// <param name="DateTime">DateTime.</param>
/// <param name="Password">Password.</param>
/// <param name="Uuid">Uuid.</param>
/// <param name="Password">Password (required).</param>
public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, string Password = null)
public FormatTest(int? Integer = null, int? Int32 = null, long? Int64 = null, double? Number = null, float? _Float = null, double? _Double = null, string _String = null, byte[] _Byte = null, byte[] Binary = null, DateTime? Date = null, DateTime? DateTime = null, Guid? Uuid = null, string Password = null)
{
// to ensure "Number" is required (not null)
if (Number == null)
@@ -46,17 +47,42 @@ namespace IO.Swagger.Model
{
this.Number = Number;
}
// to ensure "_Byte" is required (not null)
if (_Byte == null)
{
throw new InvalidDataException("_Byte is a required property for FormatTest and cannot be null");
}
else
{
this._Byte = _Byte;
}
// to ensure "Date" is required (not null)
if (Date == null)
{
throw new InvalidDataException("Date is a required property for FormatTest and cannot be null");
}
else
{
this.Date = Date;
}
// to ensure "Password" is required (not null)
if (Password == null)
{
throw new InvalidDataException("Password is a required property for FormatTest and cannot be null");
}
else
{
this.Password = Password;
}
this.Integer = Integer;
this.Int32 = Int32;
this.Int64 = Int64;
this._Float = _Float;
this._Double = _Double;
this._String = _String;
this._Byte = _Byte;
this.Binary = Binary;
this.Date = Date;
this.DateTime = DateTime;
this.Password = Password;
this.Uuid = Uuid;
}
@@ -127,6 +153,12 @@ namespace IO.Swagger.Model
[DataMember(Name="dateTime", EmitDefaultValue=false)]
public DateTime? DateTime { get; set; }
/// <summary>
/// Gets or Sets Uuid
/// </summary>
[DataMember(Name="uuid", EmitDefaultValue=false)]
public Guid? Uuid { get; set; }
/// <summary>
/// Gets or Sets Password
/// </summary>
@@ -152,6 +184,7 @@ namespace IO.Swagger.Model
sb.Append(" Binary: ").Append(Binary).Append("\n");
sb.Append(" Date: ").Append(Date).Append("\n");
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
sb.Append(" Password: ").Append(Password).Append("\n");
sb.Append("}\n");
return sb.ToString();
@@ -244,6 +277,11 @@ namespace IO.Swagger.Model
this.DateTime != null &&
this.DateTime.Equals(other.DateTime)
) &&
(
this.Uuid == other.Uuid ||
this.Uuid != null &&
this.Uuid.Equals(other.Uuid)
) &&
(
this.Password == other.Password ||
this.Password != null &&
@@ -284,6 +322,8 @@ namespace IO.Swagger.Model
hash = hash * 59 + this.Date.GetHashCode();
if (this.DateTime != null)
hash = hash * 59 + this.DateTime.GetHashCode();
if (this.Uuid != null)
hash = hash * 59 + this.Uuid.GetHashCode();
if (this.Password != null)
hash = hash * 59 + this.Password.GetHashCode();
return hash;

View File

@@ -0,0 +1,143 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model
{
/// <summary>
///
/// </summary>
[DataContract]
public class TagCategoryTest : Category, IEquatable<TagCategoryTest>
{
/// <summary>
/// Initializes a new instance of the <see cref="TagCategoryTest" /> class.
/// </summary>
public TagCategoryTest()
{
this.TagCategoryInteger = 0;
}
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
/// <summary>
/// integer property for testing allOf
/// </summary>
/// <value>integer property for testing allOf</value>
[DataMember(Name="TagCategoryInteger", EmitDefaultValue=false)]
public int? TagCategoryInteger { get; set; }
/// <summary>
/// Gets or Sets Name
/// </summary>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class TagCategoryTest {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" TagCategoryInteger: ").Append(TagCategoryInteger).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>
/// <returns>JSON string presentation of the object</returns>
public new string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as TagCategoryTest);
}
/// <summary>
/// Returns true if TagCategoryTest instances are equal
/// </summary>
/// <param name="other">Instance of TagCategoryTest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TagCategoryTest other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.Id == other.Id ||
this.Id != null &&
this.Id.Equals(other.Id)
) &&
(
this.TagCategoryInteger == other.TagCategoryInteger ||
this.TagCategoryInteger != null &&
this.TagCategoryInteger.Equals(other.TagCategoryInteger)
) &&
(
this.Name == other.Name ||
this.Name != null &&
this.Name.Equals(other.Name)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.Id != null)
hash = hash * 57 + this.Id.GetHashCode();
if (this.TagCategoryInteger != null)
hash = hash * 57 + this.TagCategoryInteger.GetHashCode();
if (this.Name != null)
hash = hash * 57 + this.Name.GetHashCode();
return hash;
}
}
}
}

View File

@@ -69,8 +69,10 @@
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Animal.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Cat.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\Dog.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\ApiResponse.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\CatDogTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\TagCategoryTest.cs" />
<Compile Include="Lib\SwaggerClient\src\main\csharp\IO\Swagger\Model\FormatTest.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>

View File

@@ -1,28 +1,12 @@
<Properties StartupItem="SwaggerClientTest.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs">
<Files>
<File FileName="TestPet.cs" Line="29" Column="39" />
<File FileName="TestOrder.cs" Line="99" Column="6" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="711" Column="1" />
<File FileName="TestPet.cs" Line="47" Column="17" />
<File FileName="TestOrder.cs" Line="1" Column="1" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs" Line="1" Column="1" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/FormatTest.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="MonoDevelop.NUnit.TestPad">
<State name="__root__">
<Node name="SwaggerClientTest" expanded="True">
<Node name="SwaggerClientTest" expanded="True">
<Node name="SwaggerClientTest" expanded="True">
<Node name="TestPet" expanded="True">
<Node name="TestPet" expanded="True">
<Node name="TestGetPetByIdAsyncWithHttpInfo" selected="True" />
</Node>
</Node>
</Node>
</Node>
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />

View File

@@ -1,9 +1,9 @@
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll
/Users/williamcheng/Code/wing328/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb

View File

@@ -11,11 +11,12 @@ Name | Type | Description | Notes
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | | [optional]
**_byte** | **byte[]** | |
**binary** | **byte[]** | | [optional]
**date** | [**Date**](Date.md) | | [optional]
**date** | [**Date**](Date.md) | |
**dateTime** | [**Date**](Date.md) | | [optional]
**password** | **String** | | [optional]
**uuid** | **String** | | [optional]
**password** | **String** | |

View File

@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID"
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID"
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi

View File

@@ -25,10 +25,13 @@ public class FormatTest {
private byte[] binary = null;
private Date date = null;
private Date dateTime = null;
private String uuid = null;
private String password = null;
/**
* minimum: 10.0
* maximum: 100.0
**/
public FormatTest integer(Integer integer) {
this.integer = integer;
@@ -46,6 +49,8 @@ public class FormatTest {
/**
* minimum: 20.0
* maximum: 200.0
**/
public FormatTest int32(Integer int32) {
this.int32 = int32;
@@ -80,6 +85,8 @@ public class FormatTest {
/**
* minimum: 32.1
* maximum: 543.2
**/
public FormatTest number(BigDecimal number) {
this.number = number;
@@ -97,6 +104,8 @@ public class FormatTest {
/**
* minimum: 54.3
* maximum: 987.6
**/
public FormatTest _float(Float _float) {
this._float = _float;
@@ -114,6 +123,8 @@ public class FormatTest {
/**
* minimum: 67.8
* maximum: 123.4
**/
public FormatTest _double(Double _double) {
this._double = _double;
@@ -154,7 +165,7 @@ public class FormatTest {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("byte")
public byte[] getByte() {
return _byte;
@@ -188,7 +199,7 @@ public class FormatTest {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("date")
public Date getDate() {
return date;
@@ -215,6 +226,23 @@ public class FormatTest {
}
/**
**/
public FormatTest uuid(String uuid) {
this.uuid = uuid;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
**/
public FormatTest password(String password) {
@@ -222,7 +250,7 @@ public class FormatTest {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("password")
public String getPassword() {
return password;
@@ -252,12 +280,13 @@ public class FormatTest {
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
}
@Override
@@ -276,6 +305,7 @@ public class FormatTest {
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();

View File

@@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-04-29T03:01:58.276Z
- Build date: 2016-05-02T21:49:03.153+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
@@ -22,11 +22,11 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
"repositories": [
{
"type": "git",
"url": "https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git"
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID": "*@dev"
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
```
@@ -59,7 +59,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi();
$number = "number_example"; // string | None
$number = 3.4; // float | None
$double = 1.2; // double | None
$string = "string_example"; // string | None
$byte = "B"; // string | None

View File

@@ -1,5 +1,5 @@
{
"name": "YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID",
"name": "GIT_USER_ID/GIT_REPO_ID",
"version": "1.0.0",
"description": "",
"keywords": [

View File

@@ -20,7 +20,7 @@ Fake endpoint for testing various parameters
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\FakeApi();
$number = "number_example"; // string | None
$number = 3.4; // float | None
$double = 1.2; // double | None
$string = "string_example"; // string | None
$byte = "B"; // string | None
@@ -45,7 +45,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **string**| None |
**number** | **float**| None |
**double** | **double**| None |
**string** | **string**| None |
**byte** | **string**| None |

View File

@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**binary** | **string** | | [optional]
**date** | [**\DateTime**](Date.md) | |
**date_time** | [**\DateTime**](\DateTime.md) | | [optional]
**uuid** | **string** | | [optional]
**password** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID"
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID"
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi

View File

@@ -95,7 +95,7 @@ class FakeApi
*
* Fake endpoint for testing various parameters
*
* @param string $number None (required)
* @param float $number None (required)
* @param double $double None (required)
* @param string $string None (required)
* @param string $byte None (required)
@@ -122,7 +122,7 @@ class FakeApi
*
* Fake endpoint for testing various parameters
*
* @param string $number None (required)
* @param float $number None (required)
* @param double $double None (required)
* @param string $string None (required)
* @param string $byte None (required)

View File

@@ -68,6 +68,7 @@ class FormatTest implements ArrayAccess
'binary' => 'string',
'date' => '\DateTime',
'date_time' => '\DateTime',
'uuid' => 'string',
'password' => 'string'
);
@@ -91,6 +92,7 @@ class FormatTest implements ArrayAccess
'binary' => 'binary',
'date' => 'date',
'date_time' => 'dateTime',
'uuid' => 'uuid',
'password' => 'password'
);
@@ -114,6 +116,7 @@ class FormatTest implements ArrayAccess
'binary' => 'setBinary',
'date' => 'setDate',
'date_time' => 'setDateTime',
'uuid' => 'setUuid',
'password' => 'setPassword'
);
@@ -137,6 +140,7 @@ class FormatTest implements ArrayAccess
'binary' => 'getBinary',
'date' => 'getDate',
'date_time' => 'getDateTime',
'uuid' => 'getUuid',
'password' => 'getPassword'
);
@@ -199,6 +203,11 @@ class FormatTest implements ArrayAccess
* @var \DateTime
*/
protected $date_time;
/**
* $uuid
* @var string
*/
protected $uuid;
/**
* $password
* @var string
@@ -225,6 +234,7 @@ class FormatTest implements ArrayAccess
$this->binary = $data["binary"];
$this->date = $data["date"];
$this->date_time = $data["date_time"];
$this->uuid = $data["uuid"];
$this->password = $data["password"];
}
}
@@ -448,6 +458,26 @@ class FormatTest implements ArrayAccess
$this->date_time = $date_time;
return $this;
}
/**
* Gets uuid
* @return string
*/
public function getUuid()
{
return $this->uuid;
}
/**
* Sets uuid
* @param string $uuid
* @return $this
*/
public function setUuid($uuid)
{
$this->uuid = $uuid;
return $this;
}
/**
* Gets password
* @return string

View File

@@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-04-29T11:03:36.514+08:00
- Build date: 2016-05-02T21:47:16.723+08:00
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
## Installation
@@ -36,9 +36,9 @@ Finally add this to the Gemfile:
### Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID, then add the following in the Gemfile:
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'petstore', :git => 'https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git'
gem 'petstore', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
### Include the Ruby code directly

View File

@@ -14,7 +14,7 @@ Name | Type | Description | Notes
**binary** | **String** | | [optional]
**date** | **Date** | |
**date_time** | **DateTime** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**uuid** | **String** | | [optional]
**password** | **String** | |

View File

@@ -8,12 +8,12 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="YOUR_GIT_USR_ID"
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="YOUR_GIT_REPO_ID"
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi

View File

@@ -77,7 +77,7 @@ module Petstore
:'binary' => :'String',
:'date' => :'Date',
:'date_time' => :'DateTime',
:'uuid' => :'UUID',
:'uuid' => :'String',
:'password' => :'String'
}
end

View File

@@ -69,7 +69,7 @@ describe 'StoreApi' do
# unit tests for get_order_by_id
# Find purchase order by ID
# For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
# For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
# @param order_id ID of pet that needs to be fetched
# @param [Hash] opts the optional parameters
# @return [Order]

View File

@@ -103,7 +103,7 @@ describe 'UserApi' do
# unit tests for get_user_by_name
# Get user by user name
#
# @param username The name that needs to be fetched. Use user1 for testing.
# @param username The name that needs to be fetched. Use user1 for testing.
# @param [Hash] opts the optional parameters
# @return [User]
describe 'get_user_by_name test' do

View File

@@ -36,7 +36,7 @@ describe 'Dog' do
@instance.should be_a(Petstore::Dog)
end
end
describe 'test attribute "class_name"' do
describe 'test attribute "breed"' do
it 'should work' do
# assertion here
# should be_a()
@@ -46,7 +46,7 @@ describe 'Dog' do
end
end
describe 'test attribute "breed"' do
describe 'test attribute "class_name"' do
it 'should work' do
# assertion here
# should be_a()

View File

@@ -146,6 +146,16 @@ describe 'FormatTest' do
end
end
describe 'test attribute "uuid"' do
it 'should work' do
# assertion here
# should be_a()
# should be_nil
# should ==
# should_not ==
end
end
describe 'test attribute "password"' do
it 'should work' do
# assertion here