mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-10 15:54:18 +00:00
Better tests for string (number) (#3953)
* beter test for string (number) * fix mapping * fix mapping in csharp generators
This commit is contained in:
@@ -88,6 +88,10 @@ public class FormatTest implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_PASSWORD)
|
||||
private String password;
|
||||
|
||||
public static final String SERIALIZED_NAME_BIG_DECIMAL = "BigDecimal";
|
||||
@SerializedName(SERIALIZED_NAME_BIG_DECIMAL)
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
public FormatTest() {
|
||||
}
|
||||
|
||||
@@ -409,6 +413,30 @@ public class FormatTest implements Parcelable {
|
||||
}
|
||||
|
||||
|
||||
public FormatTest bigDecimal(BigDecimal bigDecimal) {
|
||||
|
||||
this.bigDecimal = bigDecimal;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bigDecimal
|
||||
* @return bigDecimal
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public BigDecimal getBigDecimal() {
|
||||
return bigDecimal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setBigDecimal(BigDecimal bigDecimal) {
|
||||
this.bigDecimal = bigDecimal;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
@@ -430,12 +458,13 @@ public class FormatTest implements Parcelable {
|
||||
Objects.equals(this.date, formatTest.date) &&
|
||||
Objects.equals(this.dateTime, formatTest.dateTime) &&
|
||||
Objects.equals(this.uuid, formatTest.uuid) &&
|
||||
Objects.equals(this.password, formatTest.password);
|
||||
Objects.equals(this.password, formatTest.password) &&
|
||||
Objects.equals(this.bigDecimal, formatTest.bigDecimal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password);
|
||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,6 +485,7 @@ public class FormatTest implements Parcelable {
|
||||
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(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -486,6 +516,7 @@ public class FormatTest implements Parcelable {
|
||||
out.writeValue(dateTime);
|
||||
out.writeValue(uuid);
|
||||
out.writeValue(password);
|
||||
out.writeValue(bigDecimal);
|
||||
}
|
||||
|
||||
FormatTest(Parcel in) {
|
||||
@@ -502,6 +533,7 @@ public class FormatTest implements Parcelable {
|
||||
dateTime = (OffsetDateTime)in.readValue(OffsetDateTime.class.getClassLoader());
|
||||
uuid = (UUID)in.readValue(UUID.class.getClassLoader());
|
||||
password = (String)in.readValue(null);
|
||||
bigDecimal = (BigDecimal)in.readValue(BigDecimal.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
|
||||
Reference in New Issue
Block a user