mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 05:06:12 +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:
@@ -46,7 +46,8 @@ import javax.xml.bind.annotation.*;
|
||||
FormatTest.JSON_PROPERTY_DATE,
|
||||
FormatTest.JSON_PROPERTY_DATE_TIME,
|
||||
FormatTest.JSON_PROPERTY_UUID,
|
||||
FormatTest.JSON_PROPERTY_PASSWORD
|
||||
FormatTest.JSON_PROPERTY_PASSWORD,
|
||||
FormatTest.JSON_PROPERTY_BIG_DECIMAL
|
||||
})
|
||||
|
||||
@XmlRootElement(name = "FormatTest")
|
||||
@@ -105,6 +106,10 @@ public class FormatTest {
|
||||
public static final String JSON_PROPERTY_PASSWORD = "password";
|
||||
private String password;
|
||||
|
||||
@XmlElement(name = "BigDecimal")
|
||||
public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal";
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
|
||||
@@ -463,6 +468,33 @@ public class FormatTest {
|
||||
}
|
||||
|
||||
|
||||
public FormatTest bigDecimal(BigDecimal bigDecimal) {
|
||||
|
||||
this.bigDecimal = bigDecimal;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bigDecimal
|
||||
* @return bigDecimal
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
@JacksonXmlProperty(localName = "BigDecimal")
|
||||
|
||||
public BigDecimal getBigDecimal() {
|
||||
return bigDecimal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setBigDecimal(BigDecimal bigDecimal) {
|
||||
this.bigDecimal = bigDecimal;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
@@ -484,12 +516,13 @@ public class FormatTest {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -510,6 +543,7 @@ public class FormatTest {
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user