mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-08 02:46:23 +00:00
Add "decimal" support (#7808)
* rename BigDecimal to decimal * add isDecimal * fix tests * minor fixes * fix mapping, update doc * update test spec * update c# samples
This commit is contained in:
@@ -63,6 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>DateTime?</li>
|
<li>DateTime?</li>
|
||||||
<li>DateTimeOffset</li>
|
<li>DateTimeOffset</li>
|
||||||
<li>DateTimeOffset?</li>
|
<li>DateTimeOffset?</li>
|
||||||
|
<li>Decimal</li>
|
||||||
<li>Dictionary</li>
|
<li>Dictionary</li>
|
||||||
<li>Double</li>
|
<li>Double</li>
|
||||||
<li>Float</li>
|
<li>Float</li>
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>DateTime?</li>
|
<li>DateTime?</li>
|
||||||
<li>DateTimeOffset</li>
|
<li>DateTimeOffset</li>
|
||||||
<li>DateTimeOffset?</li>
|
<li>DateTimeOffset?</li>
|
||||||
|
<li>Decimal</li>
|
||||||
<li>Dictionary</li>
|
<li>Dictionary</li>
|
||||||
<li>Double</li>
|
<li>Double</li>
|
||||||
<li>Float</li>
|
<li>Float</li>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>DateTime?</li>
|
<li>DateTime?</li>
|
||||||
<li>DateTimeOffset</li>
|
<li>DateTimeOffset</li>
|
||||||
<li>DateTimeOffset?</li>
|
<li>DateTimeOffset?</li>
|
||||||
|
<li>Decimal</li>
|
||||||
<li>Dictionary</li>
|
<li>Dictionary</li>
|
||||||
<li>Double</li>
|
<li>Double</li>
|
||||||
<li>Float</li>
|
<li>Float</li>
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>DateTime?</li>
|
<li>DateTime?</li>
|
||||||
<li>DateTimeOffset</li>
|
<li>DateTimeOffset</li>
|
||||||
<li>DateTimeOffset?</li>
|
<li>DateTimeOffset?</li>
|
||||||
|
<li>Decimal</li>
|
||||||
<li>Dictionary</li>
|
<li>Dictionary</li>
|
||||||
<li>Double</li>
|
<li>Double</li>
|
||||||
<li>Float</li>
|
<li>Float</li>
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
|||||||
<li>DateTime?</li>
|
<li>DateTime?</li>
|
||||||
<li>DateTimeOffset</li>
|
<li>DateTimeOffset</li>
|
||||||
<li>DateTimeOffset?</li>
|
<li>DateTimeOffset?</li>
|
||||||
|
<li>Decimal</li>
|
||||||
<li>Dictionary</li>
|
<li>Dictionary</li>
|
||||||
<li>Double</li>
|
<li>Double</li>
|
||||||
<li>Float</li>
|
<li>Float</li>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
public String nameInLowerCase; // property name in lower case
|
public String nameInLowerCase; // property name in lower case
|
||||||
public String example; // example value (x-example)
|
public String example; // example value (x-example)
|
||||||
public String jsonSchema;
|
public String jsonSchema;
|
||||||
public boolean isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isByteArray, isBinary,
|
public boolean isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary,
|
||||||
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType;
|
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType;
|
||||||
public boolean isArray, isMap;
|
public boolean isArray, isMap;
|
||||||
public boolean isFile;
|
public boolean isFile;
|
||||||
@@ -172,6 +172,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
output.isInteger = this.isInteger;
|
output.isInteger = this.isInteger;
|
||||||
output.isLong = this.isLong;
|
output.isLong = this.isLong;
|
||||||
output.isDouble = this.isDouble;
|
output.isDouble = this.isDouble;
|
||||||
|
output.isDecimal = this.isDecimal;
|
||||||
output.isFloat = this.isFloat;
|
output.isFloat = this.isFloat;
|
||||||
output.isNumber = this.isNumber;
|
output.isNumber = this.isNumber;
|
||||||
output.isBoolean = this.isBoolean;
|
output.isBoolean = this.isBoolean;
|
||||||
@@ -193,7 +194,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, hasMore, isContainer, secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf);
|
return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, hasMore, isContainer, secondaryParam, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -221,6 +222,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
isNumber == that.isNumber &&
|
isNumber == that.isNumber &&
|
||||||
isFloat == that.isFloat &&
|
isFloat == that.isFloat &&
|
||||||
isDouble == that.isDouble &&
|
isDouble == that.isDouble &&
|
||||||
|
isDecimal == that.isDecimal &&
|
||||||
isByteArray == that.isByteArray &&
|
isByteArray == that.isByteArray &&
|
||||||
isBinary == that.isBinary &&
|
isBinary == that.isBinary &&
|
||||||
isBoolean == that.isBoolean &&
|
isBoolean == that.isBoolean &&
|
||||||
@@ -311,6 +313,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
sb.append(", isNumber=").append(isNumber);
|
sb.append(", isNumber=").append(isNumber);
|
||||||
sb.append(", isFloat=").append(isFloat);
|
sb.append(", isFloat=").append(isFloat);
|
||||||
sb.append(", isDouble=").append(isDouble);
|
sb.append(", isDouble=").append(isDouble);
|
||||||
|
sb.append(", isDecimal=").append(isDecimal);
|
||||||
sb.append(", isByteArray=").append(isByteArray);
|
sb.append(", isByteArray=").append(isByteArray);
|
||||||
sb.append(", isBinary=").append(isBinary);
|
sb.append(", isBinary=").append(isBinary);
|
||||||
sb.append(", isBoolean=").append(isBoolean);
|
sb.append(", isBoolean=").append(isBoolean);
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
|||||||
public boolean isNumber;
|
public boolean isNumber;
|
||||||
public boolean isFloat;
|
public boolean isFloat;
|
||||||
public boolean isDouble;
|
public boolean isDouble;
|
||||||
|
public boolean isDecimal;
|
||||||
public boolean isByteArray;
|
public boolean isByteArray;
|
||||||
public boolean isBinary;
|
public boolean isBinary;
|
||||||
public boolean isFile;
|
public boolean isFile;
|
||||||
@@ -702,6 +703,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
|||||||
sb.append(", isNumber=").append(isNumber);
|
sb.append(", isNumber=").append(isNumber);
|
||||||
sb.append(", isFloat=").append(isFloat);
|
sb.append(", isFloat=").append(isFloat);
|
||||||
sb.append(", isDouble=").append(isDouble);
|
sb.append(", isDouble=").append(isDouble);
|
||||||
|
sb.append(", isDecimal=").append(isDecimal);
|
||||||
sb.append(", isByteArray=").append(isByteArray);
|
sb.append(", isByteArray=").append(isByteArray);
|
||||||
sb.append(", isBinary=").append(isBinary);
|
sb.append(", isBinary=").append(isBinary);
|
||||||
sb.append(", isFile=").append(isFile);
|
sb.append(", isFile=").append(isFile);
|
||||||
@@ -770,6 +772,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
|||||||
isNumber == that.isNumber &&
|
isNumber == that.isNumber &&
|
||||||
isFloat == that.isFloat &&
|
isFloat == that.isFloat &&
|
||||||
isDouble == that.isDouble &&
|
isDouble == that.isDouble &&
|
||||||
|
isDecimal == that.isDecimal &&
|
||||||
isByteArray == that.isByteArray &&
|
isByteArray == that.isByteArray &&
|
||||||
isBinary == that.isBinary &&
|
isBinary == that.isBinary &&
|
||||||
isFile == that.isFile &&
|
isFile == that.isFile &&
|
||||||
@@ -845,7 +848,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
|
|||||||
maxLength, minLength, pattern, example, jsonSchema, minimum, maximum,
|
maxLength, minLength, pattern, example, jsonSchema, minimum, maximum,
|
||||||
exclusiveMinimum, exclusiveMaximum, hasMore, required, deprecated, secondaryParam,
|
exclusiveMinimum, exclusiveMaximum, hasMore, required, deprecated, secondaryParam,
|
||||||
hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric,
|
hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric,
|
||||||
isInteger, isLong, isNumber, isFloat, isDouble, isByteArray, isBinary, isFile,
|
isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile,
|
||||||
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject,
|
isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject,
|
||||||
isArray, isMap, isEnum, isReadOnly, isWriteOnly, isNullable,
|
isArray, isMap, isEnum, isReadOnly, isWriteOnly, isNullable,
|
||||||
isSelfReference, isCircularReference, isDiscriminator, _enum, allowableValues,
|
isSelfReference, isCircularReference, isDiscriminator, _enum, allowableValues,
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
|||||||
public boolean isNumber;
|
public boolean isNumber;
|
||||||
public boolean isFloat;
|
public boolean isFloat;
|
||||||
public boolean isDouble;
|
public boolean isDouble;
|
||||||
|
public boolean isDecimal;
|
||||||
public boolean isByteArray;
|
public boolean isByteArray;
|
||||||
public boolean isBoolean;
|
public boolean isBoolean;
|
||||||
public boolean isDate;
|
public boolean isDate;
|
||||||
@@ -79,7 +80,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
|||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(headers, code, message, hasMore, examples, dataType, baseType, containerType, hasHeaders,
|
return Objects.hash(headers, code, message, hasMore, examples, dataType, baseType, containerType, hasHeaders,
|
||||||
isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isByteArray, isBoolean, isDate,
|
isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBoolean, isDate,
|
||||||
isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
|
isDateTime, isUuid, isEmail, isModel, isFreeFormObject, isAnyType, isDefault, simpleType, primitiveType,
|
||||||
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
|
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
|
||||||
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
|
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
|
||||||
@@ -100,6 +101,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
|||||||
isNumber == that.isNumber &&
|
isNumber == that.isNumber &&
|
||||||
isFloat == that.isFloat &&
|
isFloat == that.isFloat &&
|
||||||
isDouble == that.isDouble &&
|
isDouble == that.isDouble &&
|
||||||
|
isDecimal == that.isDecimal &&
|
||||||
isByteArray == that.isByteArray &&
|
isByteArray == that.isByteArray &&
|
||||||
isBoolean == that.isBoolean &&
|
isBoolean == that.isBoolean &&
|
||||||
isDate == that.isDate &&
|
isDate == that.isDate &&
|
||||||
@@ -351,6 +353,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
|
|||||||
sb.append(", isNumber=").append(isNumber);
|
sb.append(", isNumber=").append(isNumber);
|
||||||
sb.append(", isFloat=").append(isFloat);
|
sb.append(", isFloat=").append(isFloat);
|
||||||
sb.append(", isDouble=").append(isDouble);
|
sb.append(", isDouble=").append(isDouble);
|
||||||
|
sb.append(", isDecimal=").append(isDecimal);
|
||||||
sb.append(", isByteArray=").append(isByteArray);
|
sb.append(", isByteArray=").append(isByteArray);
|
||||||
sb.append(", isBoolean=").append(isBoolean);
|
sb.append(", isBoolean=").append(isBoolean);
|
||||||
sb.append(", isDate=").append(isDate);
|
sb.append(", isDate=").append(isDate);
|
||||||
|
|||||||
@@ -1451,12 +1451,13 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
typeMapping.put("string", "String");
|
typeMapping.put("string", "String");
|
||||||
typeMapping.put("int", "Integer");
|
typeMapping.put("int", "Integer");
|
||||||
typeMapping.put("float", "Float");
|
typeMapping.put("float", "Float");
|
||||||
|
typeMapping.put("double", "Double");
|
||||||
typeMapping.put("number", "BigDecimal");
|
typeMapping.put("number", "BigDecimal");
|
||||||
|
typeMapping.put("decimal", "BigDecimal");
|
||||||
typeMapping.put("DateTime", "Date");
|
typeMapping.put("DateTime", "Date");
|
||||||
typeMapping.put("long", "Long");
|
typeMapping.put("long", "Long");
|
||||||
typeMapping.put("short", "Short");
|
typeMapping.put("short", "Short");
|
||||||
typeMapping.put("char", "String");
|
typeMapping.put("char", "String");
|
||||||
typeMapping.put("double", "Double");
|
|
||||||
typeMapping.put("object", "Object");
|
typeMapping.put("object", "Object");
|
||||||
typeMapping.put("integer", "Integer");
|
typeMapping.put("integer", "Integer");
|
||||||
typeMapping.put("ByteArray", "byte[]");
|
typeMapping.put("ByteArray", "byte[]");
|
||||||
@@ -1464,7 +1465,6 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
typeMapping.put("file", "File");
|
typeMapping.put("file", "File");
|
||||||
typeMapping.put("UUID", "UUID");
|
typeMapping.put("UUID", "UUID");
|
||||||
typeMapping.put("URI", "URI");
|
typeMapping.put("URI", "URI");
|
||||||
typeMapping.put("BigDecimal", "BigDecimal");
|
|
||||||
typeMapping.put("AnyType", "oas_any_type_not_mapped");
|
typeMapping.put("AnyType", "oas_any_type_not_mapped");
|
||||||
|
|
||||||
instantiationTypes = new HashMap<String, String>();
|
instantiationTypes = new HashMap<String, String>();
|
||||||
@@ -2016,9 +2016,9 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
|
// The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x,
|
||||||
// though this tooling supports it.
|
// though this tooling supports it.
|
||||||
return "null";
|
return "null";
|
||||||
} else if (ModelUtils.isStringSchema(schema) && "number".equals(schema.getFormat())) {
|
} else if (ModelUtils.isDecimalSchema(schema)) {
|
||||||
// special handle of type: string, format: number
|
// special handle of type: string, format: number
|
||||||
return "BigDecimal";
|
return "decimal";
|
||||||
} else if (ModelUtils.isByteArraySchema(schema)) {
|
} else if (ModelUtils.isByteArraySchema(schema)) {
|
||||||
return "ByteArray";
|
return "ByteArray";
|
||||||
} else if (ModelUtils.isFileSchema(schema)) {
|
} else if (ModelUtils.isFileSchema(schema)) {
|
||||||
@@ -3156,7 +3156,29 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
} else if (ModelUtils.isDateTimeSchema(p)) { // date-time format
|
} else if (ModelUtils.isDateTimeSchema(p)) { // date-time format
|
||||||
property.isString = false; // for backward compatibility with 2.x
|
property.isString = false; // for backward compatibility with 2.x
|
||||||
property.isDateTime = true;
|
property.isDateTime = true;
|
||||||
|
} else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number
|
||||||
|
property.isDecimal = true;
|
||||||
|
if (p.getMinimum() != null) {
|
||||||
|
property.minimum = String.valueOf(p.getMinimum());
|
||||||
|
}
|
||||||
|
if (p.getMaximum() != null) {
|
||||||
|
property.maximum = String.valueOf(p.getMaximum());
|
||||||
|
}
|
||||||
|
if (p.getExclusiveMinimum() != null) {
|
||||||
|
property.exclusiveMinimum = p.getExclusiveMinimum();
|
||||||
|
}
|
||||||
|
if (p.getExclusiveMaximum() != null) {
|
||||||
|
property.exclusiveMaximum = p.getExclusiveMaximum();
|
||||||
|
}
|
||||||
|
if (p.getMultipleOf() != null) {
|
||||||
|
property.multipleOf = p.getMultipleOf();
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if any validation rule defined
|
||||||
|
// exclusive* are noop without corresponding min/max
|
||||||
|
if (property.minimum != null || property.maximum != null || p.getMultipleOf() != null) {
|
||||||
|
property.hasValidation = true;
|
||||||
|
}
|
||||||
} else if (ModelUtils.isStringSchema(p)) {
|
} else if (ModelUtils.isStringSchema(p)) {
|
||||||
if (ModelUtils.isByteArraySchema(p)) {
|
if (ModelUtils.isByteArraySchema(p)) {
|
||||||
property.isByteArray = true;
|
property.isByteArray = true;
|
||||||
@@ -4065,6 +4087,9 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
} else if (Boolean.TRUE.equals(cp.isFloat)) {
|
} else if (Boolean.TRUE.equals(cp.isFloat)) {
|
||||||
r.isFloat = true;
|
r.isFloat = true;
|
||||||
r.isNumeric = true;
|
r.isNumeric = true;
|
||||||
|
} else if (Boolean.TRUE.equals(cp.isDecimal)) {
|
||||||
|
r.isDecimal = true;
|
||||||
|
r.isNumeric = true;
|
||||||
} else if (Boolean.TRUE.equals(cp.isBinary)) {
|
} else if (Boolean.TRUE.equals(cp.isBinary)) {
|
||||||
r.isFile = true; // file = binary in OAS3
|
r.isFile = true; // file = binary in OAS3
|
||||||
r.isBinary = true;
|
r.isBinary = true;
|
||||||
@@ -5406,6 +5431,9 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
} else if (Boolean.TRUE.equals(property.isFloat)) {
|
} else if (Boolean.TRUE.equals(property.isFloat)) {
|
||||||
parameter.isFloat = true;
|
parameter.isFloat = true;
|
||||||
parameter.isPrimitiveType = true;
|
parameter.isPrimitiveType = true;
|
||||||
|
} else if (Boolean.TRUE.equals(property.isDecimal)) {
|
||||||
|
parameter.isDecimal = true;
|
||||||
|
parameter.isPrimitiveType = true;
|
||||||
} else if (Boolean.TRUE.equals(property.isNumber)) {
|
} else if (Boolean.TRUE.equals(property.isNumber)) {
|
||||||
parameter.isNumber = true;
|
parameter.isNumber = true;
|
||||||
parameter.isPrimitiveType = true;
|
parameter.isPrimitiveType = true;
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
|
|||||||
"DateTimeOffset",
|
"DateTimeOffset",
|
||||||
"Boolean",
|
"Boolean",
|
||||||
"Double",
|
"Double",
|
||||||
|
"Decimal",
|
||||||
"Int32",
|
"Int32",
|
||||||
"Int64",
|
"Int64",
|
||||||
"Float",
|
"Float",
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
|||||||
typeMapping.put("number", "float32");
|
typeMapping.put("number", "float32");
|
||||||
typeMapping.put("float", "float32");
|
typeMapping.put("float", "float32");
|
||||||
typeMapping.put("double", "float64");
|
typeMapping.put("double", "float64");
|
||||||
typeMapping.put("BigDecimal", "float64");
|
typeMapping.put("decimal", "float64");
|
||||||
typeMapping.put("boolean", "bool");
|
typeMapping.put("boolean", "bool");
|
||||||
typeMapping.put("string", "string");
|
typeMapping.put("string", "string");
|
||||||
typeMapping.put("UUID", "string");
|
typeMapping.put("UUID", "string");
|
||||||
|
|||||||
@@ -1078,7 +1078,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
@Override
|
@Override
|
||||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
||||||
if (serializeBigDecimalAsString) {
|
if (serializeBigDecimalAsString) {
|
||||||
if (property.baseType.equals("BigDecimal")) {
|
if ("decimal".equals(property.baseType)) {
|
||||||
// we serialize BigDecimal as `string` to avoid precision loss
|
// we serialize BigDecimal as `string` to avoid precision loss
|
||||||
property.vendorExtensions.put("x-extra-annotation", "@JsonSerialize(using = ToStringSerializer.class)");
|
property.vendorExtensions.put("x-extra-annotation", "@JsonSerialize(using = ToStringSerializer.class)");
|
||||||
|
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
|
|||||||
typeMapping.put("double", "kotlin.Double");
|
typeMapping.put("double", "kotlin.Double");
|
||||||
typeMapping.put("ByteArray", "kotlin.ByteArray");
|
typeMapping.put("ByteArray", "kotlin.ByteArray");
|
||||||
typeMapping.put("number", "java.math.BigDecimal");
|
typeMapping.put("number", "java.math.BigDecimal");
|
||||||
|
typeMapping.put("decimal", "java.math.BigDecimal");
|
||||||
typeMapping.put("date-time", "java.time.LocalDateTime");
|
typeMapping.put("date-time", "java.time.LocalDateTime");
|
||||||
typeMapping.put("date", "java.time.LocalDate");
|
typeMapping.put("date", "java.time.LocalDate");
|
||||||
typeMapping.put("file", "java.io.File");
|
typeMapping.put("file", "java.io.File");
|
||||||
|
|||||||
@@ -344,7 +344,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (schema.getEnum() != null && !schema.getEnum().isEmpty()) {
|
if (schema.getEnum() != null && !schema.getEnum().isEmpty()) {
|
||||||
// Enum case:
|
// Enum case:
|
||||||
example = schema.getEnum().get(0).toString();
|
example = schema.getEnum().get(0).toString();
|
||||||
/* if (ModelUtils.isStringSchema(schema)) {
|
/* if (ModelUtils.isStringSchema(schema)) {
|
||||||
example = "'" + escapeText(example) + "'";
|
example = "'" + escapeText(example) + "'";
|
||||||
@@ -354,7 +354,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
|
|
||||||
return example;
|
return example;
|
||||||
} else if (null != schema.get$ref()) {
|
} else if (null != schema.get$ref()) {
|
||||||
// $ref case:
|
// $ref case:
|
||||||
Map<String, Schema> allDefinitions = ModelUtils.getSchemas(this.openAPI);
|
Map<String, Schema> allDefinitions = ModelUtils.getSchemas(this.openAPI);
|
||||||
String ref = ModelUtils.getSimpleRef(schema.get$ref());
|
String ref = ModelUtils.getSimpleRef(schema.get$ref());
|
||||||
if (allDefinitions != null) {
|
if (allDefinitions != null) {
|
||||||
@@ -384,14 +384,20 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
} else if (ModelUtils.isByteArraySchema(schema)) {
|
} else if (ModelUtils.isByteArraySchema(schema)) {
|
||||||
example = "YQ==";
|
example = "YQ==";
|
||||||
} else if (ModelUtils.isStringSchema(schema)) {
|
} else if (ModelUtils.isStringSchema(schema)) {
|
||||||
// a BigDecimal:
|
// decimal (type: string, format: decimal)
|
||||||
if ("Number".equalsIgnoreCase(schema.getFormat())) {return "1";}
|
if ("number".equalsIgnoreCase(schema.getFormat())) {
|
||||||
if (StringUtils.isNotBlank(schema.getPattern())) return "\"a\""; // I cheat here, since it would be too complicated to generate a string from a regexp
|
return "1";
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(schema.getPattern()))
|
||||||
|
return "\"a\""; // I cheat here, since it would be too complicated to generate a string from a regexp
|
||||||
int len = 0;
|
int len = 0;
|
||||||
if (null != schema.getMinLength()) len = schema.getMinLength().intValue();
|
if (null != schema.getMinLength())
|
||||||
if (len < 1) len = 1;
|
len = schema.getMinLength().intValue();
|
||||||
|
if (len < 1)
|
||||||
|
len = 1;
|
||||||
example = "";
|
example = "";
|
||||||
for (int i=0;i<len;i++) example += i;
|
for (int i = 0; i < len; i++)
|
||||||
|
example += i;
|
||||||
} else if (ModelUtils.isIntegerSchema(schema)) {
|
} else if (ModelUtils.isIntegerSchema(schema)) {
|
||||||
if (schema.getMinimum() != null)
|
if (schema.getMinimum() != null)
|
||||||
example = schema.getMinimum().toString();
|
example = schema.getMinimum().toString();
|
||||||
@@ -466,7 +472,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
if (isReservedWord(name) || name.matches("^\\d.*")) {
|
if (isReservedWord(name) || name.matches("^\\d.*")) {
|
||||||
name = escapeReservedWord(name);
|
name = escapeReservedWord(name);
|
||||||
}
|
}
|
||||||
name = name.replaceAll("-","_");
|
name = name.replaceAll("-", "_");
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,7 +551,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toEnumValue(String value, String datatype) {
|
public String toEnumValue(String value, String datatype) {
|
||||||
value = value.replaceAll("-","_");
|
value = value.replaceAll("-", "_");
|
||||||
if (isReservedWord(value)) {
|
if (isReservedWord(value)) {
|
||||||
value = escapeReservedWord(value);
|
value = escapeReservedWord(value);
|
||||||
}
|
}
|
||||||
@@ -640,9 +646,9 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
@Override
|
@Override
|
||||||
public String toModelImport(String name) {
|
public String toModelImport(String name) {
|
||||||
if (importMapping.containsKey(name)) {
|
if (importMapping.containsKey(name)) {
|
||||||
return "#include \"" +"../model/" + importMapping.get(name) + ".h\"";
|
return "#include \"" + "../model/" + importMapping.get(name) + ".h\"";
|
||||||
} else
|
} else
|
||||||
return "#include \"" +"../model/" + name + ".h\"";
|
return "#include \"" + "../model/" + name + ".h\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -737,12 +743,12 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CodegenProperty fromProperty(String name, Schema p) {
|
public CodegenProperty fromProperty(String name, Schema p) {
|
||||||
CodegenProperty cm = super.fromProperty(name,p);
|
CodegenProperty cm = super.fromProperty(name, p);
|
||||||
Schema ref = ModelUtils.getReferencedSchema(openAPI, p);
|
Schema ref = ModelUtils.getReferencedSchema(openAPI, p);
|
||||||
if (ref != null) {
|
if (ref != null) {
|
||||||
if (ref.getEnum() != null) {
|
if (ref.getEnum() != null) {
|
||||||
cm.isEnum = true;
|
cm.isEnum = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cm;
|
return cm;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
|||||||
typeMapping.put("long", "long");
|
typeMapping.put("long", "long");
|
||||||
typeMapping.put("double", "double");
|
typeMapping.put("double", "double");
|
||||||
typeMapping.put("number", "decimal");
|
typeMapping.put("number", "decimal");
|
||||||
typeMapping.put("BigDecimal", "decimal");
|
typeMapping.put("decimal", "decimal");
|
||||||
typeMapping.put("DateTime", "DateTime");
|
typeMapping.put("DateTime", "DateTime");
|
||||||
typeMapping.put("date", "DateTime");
|
typeMapping.put("date", "DateTime");
|
||||||
typeMapping.put("UUID", "Guid");
|
typeMapping.put("UUID", "Guid");
|
||||||
@@ -1015,4 +1015,4 @@ class LibraryDependency {
|
|||||||
this.version = version;
|
this.version = version;
|
||||||
this.targetFramework = targetFramework;
|
this.targetFramework = targetFramework;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
|||||||
typeMapping.put("long", "long");
|
typeMapping.put("long", "long");
|
||||||
typeMapping.put("double", "double");
|
typeMapping.put("double", "double");
|
||||||
typeMapping.put("number", "decimal");
|
typeMapping.put("number", "decimal");
|
||||||
typeMapping.put("BigDecimal", "decimal");
|
typeMapping.put("decimal", "decimal");
|
||||||
typeMapping.put("DateTime", "DateTime");
|
typeMapping.put("DateTime", "DateTime");
|
||||||
typeMapping.put("date", "DateTime");
|
typeMapping.put("date", "DateTime");
|
||||||
typeMapping.put("file", "System.IO.Stream");
|
typeMapping.put("file", "System.IO.Stream");
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
typeMapping.put("array", "list()");
|
typeMapping.put("array", "list()");
|
||||||
typeMapping.put("map", "maps:map()");
|
typeMapping.put("map", "maps:map()");
|
||||||
typeMapping.put("number", "integer()");
|
typeMapping.put("number", "integer()");
|
||||||
typeMapping.put("bigdecimal", "float()");
|
typeMapping.put("decimal", "float()");
|
||||||
typeMapping.put("List", "list()");
|
typeMapping.put("List", "list()");
|
||||||
typeMapping.put("object", "maps:map()");
|
typeMapping.put("object", "maps:map()");
|
||||||
typeMapping.put("file", "binary()");
|
typeMapping.put("file", "binary()");
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
|
|||||||
typeMapping.put("float", "Float");
|
typeMapping.put("float", "Float");
|
||||||
typeMapping.put("double", "Double");
|
typeMapping.put("double", "Double");
|
||||||
typeMapping.put("number", "Double");
|
typeMapping.put("number", "Double");
|
||||||
typeMapping.put("BigDecimal", "Double");
|
typeMapping.put("decimal", "Double");
|
||||||
typeMapping.put("integer", "Int");
|
typeMapping.put("integer", "Int");
|
||||||
typeMapping.put("file", "FilePath");
|
typeMapping.put("file", "FilePath");
|
||||||
// lib
|
// lib
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
|||||||
typeMapping.put("int", "Number");
|
typeMapping.put("int", "Number");
|
||||||
typeMapping.put("float", "Number");
|
typeMapping.put("float", "Number");
|
||||||
typeMapping.put("number", "Number");
|
typeMapping.put("number", "Number");
|
||||||
typeMapping.put("BigDecimal", "Number");
|
typeMapping.put("decimal", "Number");
|
||||||
typeMapping.put("DateTime", "Date");
|
typeMapping.put("DateTime", "Date");
|
||||||
typeMapping.put("date", "Date");
|
typeMapping.put("date", "Date");
|
||||||
typeMapping.put("long", "Number");
|
typeMapping.put("long", "Number");
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
typeMapping.put("ByteArray", "Data");
|
typeMapping.put("ByteArray", "Data");
|
||||||
typeMapping.put("UUID", "UUID");
|
typeMapping.put("UUID", "UUID");
|
||||||
typeMapping.put("URI", "String");
|
typeMapping.put("URI", "String");
|
||||||
typeMapping.put("BigDecimal", "Decimal");
|
typeMapping.put("decimal", "Decimal");
|
||||||
typeMapping.put("object", "Any");
|
typeMapping.put("object", "Any");
|
||||||
typeMapping.put("AnyType", "Any");
|
typeMapping.put("AnyType", "Any");
|
||||||
|
|
||||||
|
|||||||
@@ -689,6 +689,14 @@ public class ModelUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isDecimalSchema(Schema schema) {
|
||||||
|
if (SchemaTypeUtil.STRING_TYPE.equals(schema.getType()) // type: string
|
||||||
|
&& "number".equals(schema.getFormat())) { // format: number
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check to see if the schema is a model
|
* Check to see if the schema is a model
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -726,10 +726,13 @@ public class JavaModelTest {
|
|||||||
|
|
||||||
@Test(description = "types used by inner properties should be imported")
|
@Test(description = "types used by inner properties should be imported")
|
||||||
public void mapWithAnListOfBigDecimalTest() {
|
public void mapWithAnListOfBigDecimalTest() {
|
||||||
|
Schema decimal = new StringSchema();
|
||||||
|
decimal.setFormat("number");
|
||||||
|
|
||||||
Schema schema1 = new Schema()
|
Schema schema1 = new Schema()
|
||||||
.description("model with Map<String, List<BigDecimal>>")
|
.description("model with Map<String, List<BigDecimal>>")
|
||||||
.addProperties("map", new MapSchema()
|
.addProperties("map", new MapSchema()
|
||||||
.additionalProperties(new ArraySchema().items(new NumberSchema())));
|
.additionalProperties(new ArraySchema().items(decimal)));
|
||||||
OpenAPI openAPI1 = TestUtils.createOpenAPIWithOneSchema("sample", schema1);
|
OpenAPI openAPI1 = TestUtils.createOpenAPIWithOneSchema("sample", schema1);
|
||||||
JavaClientCodegen codegen1 = new JavaClientCodegen();
|
JavaClientCodegen codegen1 = new JavaClientCodegen();
|
||||||
codegen1.setOpenAPI(openAPI1);
|
codegen1.setOpenAPI(openAPI1);
|
||||||
@@ -741,7 +744,7 @@ public class JavaModelTest {
|
|||||||
.description("model with Map<String, Map<String, List<BigDecimal>>>")
|
.description("model with Map<String, Map<String, List<BigDecimal>>>")
|
||||||
.addProperties("map", new MapSchema()
|
.addProperties("map", new MapSchema()
|
||||||
.additionalProperties(new MapSchema()
|
.additionalProperties(new MapSchema()
|
||||||
.additionalProperties(new ArraySchema().items(new NumberSchema()))));
|
.additionalProperties(new ArraySchema().items(decimal))));
|
||||||
OpenAPI openAPI2 = TestUtils.createOpenAPIWithOneSchema("sample", schema2);
|
OpenAPI openAPI2 = TestUtils.createOpenAPIWithOneSchema("sample", schema2);
|
||||||
JavaClientCodegen codegen2 = new JavaClientCodegen();
|
JavaClientCodegen codegen2 = new JavaClientCodegen();
|
||||||
codegen2.setOpenAPI(openAPI2);
|
codegen2.setOpenAPI(openAPI2);
|
||||||
|
|||||||
@@ -1472,6 +1472,9 @@ components:
|
|||||||
format: double
|
format: double
|
||||||
maximum: 123.4
|
maximum: 123.4
|
||||||
minimum: 67.8
|
minimum: 67.8
|
||||||
|
decimal:
|
||||||
|
type: string
|
||||||
|
format: number
|
||||||
string:
|
string:
|
||||||
type: string
|
type: string
|
||||||
pattern: '/[a-z]/i'
|
pattern: '/[a-z]/i'
|
||||||
|
|||||||
@@ -1437,6 +1437,9 @@ components:
|
|||||||
format: double
|
format: double
|
||||||
maximum: 123.4
|
maximum: 123.4
|
||||||
minimum: 67.8
|
minimum: 67.8
|
||||||
|
decimal:
|
||||||
|
type: string
|
||||||
|
format: number
|
||||||
string:
|
string:
|
||||||
type: string
|
type: string
|
||||||
pattern: '/[a-z]/i'
|
pattern: '/[a-z]/i'
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Float** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Double** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
|
**Decimal** | **decimal** | | [optional]
|
||||||
**String** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**Byte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="number">number (required).</param>
|
/// <param name="number">number (required).</param>
|
||||||
/// <param name="_float">_float.</param>
|
/// <param name="_float">_float.</param>
|
||||||
/// <param name="_double">_double.</param>
|
/// <param name="_double">_double.</param>
|
||||||
|
/// <param name="_decimal">_decimal.</param>
|
||||||
/// <param name="_string">_string.</param>
|
/// <param name="_string">_string.</param>
|
||||||
/// <param name="_byte">_byte (required).</param>
|
/// <param name="_byte">_byte (required).</param>
|
||||||
/// <param name="binary">binary.</param>
|
/// <param name="binary">binary.</param>
|
||||||
@@ -58,7 +59,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="password">password (required).</param>
|
/// <param name="password">password (required).</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
||||||
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
||||||
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), decimal _decimal = default(decimal), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
||||||
{
|
{
|
||||||
this.Number = number;
|
this.Number = number;
|
||||||
// to ensure "_byte" is required (not null)
|
// to ensure "_byte" is required (not null)
|
||||||
@@ -71,6 +72,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
this.Int64 = int64;
|
this.Int64 = int64;
|
||||||
this.Float = _float;
|
this.Float = _float;
|
||||||
this.Double = _double;
|
this.Double = _double;
|
||||||
|
this.Decimal = _decimal;
|
||||||
this.String = _string;
|
this.String = _string;
|
||||||
this.Binary = binary;
|
this.Binary = binary;
|
||||||
this.DateTime = dateTime;
|
this.DateTime = dateTime;
|
||||||
@@ -116,6 +118,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||||
public double Double { get; set; }
|
public double Double { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Decimal
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
||||||
|
public decimal Decimal { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets String
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -193,6 +201,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" String: ").Append(String).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
@@ -251,6 +260,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||||
|
hashCode = hashCode * 59 + this.Decimal.GetHashCode();
|
||||||
if (this.String != null)
|
if (this.String != null)
|
||||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||||
if (this.Byte != null)
|
if (this.Byte != null)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Float** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Double** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
|
**Decimal** | **decimal** | | [optional]
|
||||||
**String** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**Byte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="number">number (required).</param>
|
/// <param name="number">number (required).</param>
|
||||||
/// <param name="_float">_float.</param>
|
/// <param name="_float">_float.</param>
|
||||||
/// <param name="_double">_double.</param>
|
/// <param name="_double">_double.</param>
|
||||||
|
/// <param name="_decimal">_decimal.</param>
|
||||||
/// <param name="_string">_string.</param>
|
/// <param name="_string">_string.</param>
|
||||||
/// <param name="_byte">_byte (required).</param>
|
/// <param name="_byte">_byte (required).</param>
|
||||||
/// <param name="binary">binary.</param>
|
/// <param name="binary">binary.</param>
|
||||||
@@ -58,7 +59,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="password">password (required).</param>
|
/// <param name="password">password (required).</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
||||||
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
||||||
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), decimal _decimal = default(decimal), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
||||||
{
|
{
|
||||||
this.Number = number;
|
this.Number = number;
|
||||||
// to ensure "_byte" is required (not null)
|
// to ensure "_byte" is required (not null)
|
||||||
@@ -71,6 +72,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
this.Int64 = int64;
|
this.Int64 = int64;
|
||||||
this.Float = _float;
|
this.Float = _float;
|
||||||
this.Double = _double;
|
this.Double = _double;
|
||||||
|
this.Decimal = _decimal;
|
||||||
this.String = _string;
|
this.String = _string;
|
||||||
this.Binary = binary;
|
this.Binary = binary;
|
||||||
this.DateTime = dateTime;
|
this.DateTime = dateTime;
|
||||||
@@ -116,6 +118,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||||
public double Double { get; set; }
|
public double Double { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Decimal
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
||||||
|
public decimal Decimal { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets String
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -193,6 +201,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" String: ").Append(String).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
@@ -251,6 +260,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||||
|
hashCode = hashCode * 59 + this.Decimal.GetHashCode();
|
||||||
if (this.String != null)
|
if (this.String != null)
|
||||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||||
if (this.Byte != null)
|
if (this.Byte != null)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Float** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Double** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
|
**Decimal** | **decimal** | | [optional]
|
||||||
**String** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**Byte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="number">number (required).</param>
|
/// <param name="number">number (required).</param>
|
||||||
/// <param name="_float">_float.</param>
|
/// <param name="_float">_float.</param>
|
||||||
/// <param name="_double">_double.</param>
|
/// <param name="_double">_double.</param>
|
||||||
|
/// <param name="_decimal">_decimal.</param>
|
||||||
/// <param name="_string">_string.</param>
|
/// <param name="_string">_string.</param>
|
||||||
/// <param name="_byte">_byte (required).</param>
|
/// <param name="_byte">_byte (required).</param>
|
||||||
/// <param name="binary">binary.</param>
|
/// <param name="binary">binary.</param>
|
||||||
@@ -55,7 +56,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="password">password (required).</param>
|
/// <param name="password">password (required).</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
||||||
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
||||||
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), decimal _decimal = default(decimal), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
||||||
{
|
{
|
||||||
this.Number = number;
|
this.Number = number;
|
||||||
// to ensure "_byte" is required (not null)
|
// to ensure "_byte" is required (not null)
|
||||||
@@ -68,6 +69,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
this.Int64 = int64;
|
this.Int64 = int64;
|
||||||
this.Float = _float;
|
this.Float = _float;
|
||||||
this.Double = _double;
|
this.Double = _double;
|
||||||
|
this.Decimal = _decimal;
|
||||||
this.String = _string;
|
this.String = _string;
|
||||||
this.Binary = binary;
|
this.Binary = binary;
|
||||||
this.DateTime = dateTime;
|
this.DateTime = dateTime;
|
||||||
@@ -112,6 +114,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataMember(Name = "double", EmitDefaultValue = false)]
|
[DataMember(Name = "double", EmitDefaultValue = false)]
|
||||||
public double Double { get; set; }
|
public double Double { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Decimal
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name = "decimal", EmitDefaultValue = false)]
|
||||||
|
public decimal Decimal { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets String
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -183,6 +191,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" String: ").Append(String).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
@@ -240,6 +249,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||||
|
hashCode = hashCode * 59 + this.Decimal.GetHashCode();
|
||||||
if (this.String != null)
|
if (this.String != null)
|
||||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||||
if (this.Byte != null)
|
if (this.Byte != null)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|||||||
**Number** | **decimal** | |
|
**Number** | **decimal** | |
|
||||||
**Float** | **float** | | [optional]
|
**Float** | **float** | | [optional]
|
||||||
**Double** | **double** | | [optional]
|
**Double** | **double** | | [optional]
|
||||||
|
**Decimal** | **decimal** | | [optional]
|
||||||
**String** | **string** | | [optional]
|
**String** | **string** | | [optional]
|
||||||
**Byte** | **byte[]** | |
|
**Byte** | **byte[]** | |
|
||||||
**Binary** | **System.IO.Stream** | | [optional]
|
**Binary** | **System.IO.Stream** | | [optional]
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="number">number (required).</param>
|
/// <param name="number">number (required).</param>
|
||||||
/// <param name="_float">_float.</param>
|
/// <param name="_float">_float.</param>
|
||||||
/// <param name="_double">_double.</param>
|
/// <param name="_double">_double.</param>
|
||||||
|
/// <param name="_decimal">_decimal.</param>
|
||||||
/// <param name="_string">_string.</param>
|
/// <param name="_string">_string.</param>
|
||||||
/// <param name="_byte">_byte (required).</param>
|
/// <param name="_byte">_byte (required).</param>
|
||||||
/// <param name="binary">binary.</param>
|
/// <param name="binary">binary.</param>
|
||||||
@@ -53,7 +54,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
/// <param name="password">password (required).</param>
|
/// <param name="password">password (required).</param>
|
||||||
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
/// <param name="patternWithDigits">A string that is a 10 digit number. Can have leading zeros..</param>
|
||||||
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
/// <param name="patternWithDigitsAndDelimiter">A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..</param>
|
||||||
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float _float = default(float), double _double = default(double), decimal _decimal = default(decimal), string _string = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string))
|
||||||
{
|
{
|
||||||
// to ensure "number" is required (not null)
|
// to ensure "number" is required (not null)
|
||||||
if (number == null)
|
if (number == null)
|
||||||
@@ -100,6 +101,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
this.Int64 = int64;
|
this.Int64 = int64;
|
||||||
this.Float = _float;
|
this.Float = _float;
|
||||||
this.Double = _double;
|
this.Double = _double;
|
||||||
|
this.Decimal = _decimal;
|
||||||
this.String = _string;
|
this.String = _string;
|
||||||
this.Binary = binary;
|
this.Binary = binary;
|
||||||
this.DateTime = dateTime;
|
this.DateTime = dateTime;
|
||||||
@@ -144,6 +146,12 @@ namespace Org.OpenAPITools.Model
|
|||||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||||
public double Double { get; set; }
|
public double Double { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or Sets Decimal
|
||||||
|
/// </summary>
|
||||||
|
[DataMember(Name="decimal", EmitDefaultValue=false)]
|
||||||
|
public decimal Decimal { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets String
|
/// Gets or Sets String
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -215,6 +223,7 @@ namespace Org.OpenAPITools.Model
|
|||||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||||
|
sb.Append(" Decimal: ").Append(Decimal).Append("\n");
|
||||||
sb.Append(" String: ").Append(String).Append("\n");
|
sb.Append(" String: ").Append(String).Append("\n");
|
||||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||||
@@ -288,6 +297,11 @@ namespace Org.OpenAPITools.Model
|
|||||||
(this.Double != null &&
|
(this.Double != null &&
|
||||||
this.Double.Equals(input.Double))
|
this.Double.Equals(input.Double))
|
||||||
) &&
|
) &&
|
||||||
|
(
|
||||||
|
this.Decimal == input.Decimal ||
|
||||||
|
(this.Decimal != null &&
|
||||||
|
this.Decimal.Equals(input.Decimal))
|
||||||
|
) &&
|
||||||
(
|
(
|
||||||
this.String == input.String ||
|
this.String == input.String ||
|
||||||
(this.String != null &&
|
(this.String != null &&
|
||||||
@@ -356,6 +370,8 @@ namespace Org.OpenAPITools.Model
|
|||||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||||
if (this.Double != null)
|
if (this.Double != null)
|
||||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||||
|
if (this.Decimal != null)
|
||||||
|
hashCode = hashCode * 59 + this.Decimal.GetHashCode();
|
||||||
if (this.String != null)
|
if (this.String != null)
|
||||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||||
if (this.Byte != null)
|
if (this.Byte != null)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|||||||
**_number** | **Number** | |
|
**_number** | **Number** | |
|
||||||
**_float** | **Number** | | [optional]
|
**_float** | **Number** | | [optional]
|
||||||
**_double** | **Number** | | [optional]
|
**_double** | **Number** | | [optional]
|
||||||
|
**decimal** | **Number** | | [optional]
|
||||||
**_string** | **String** | | [optional]
|
**_string** | **String** | | [optional]
|
||||||
**_byte** | **Blob** | |
|
**_byte** | **Blob** | |
|
||||||
**binary** | **File** | | [optional]
|
**binary** | **File** | | [optional]
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ class FormatTest {
|
|||||||
if (data.hasOwnProperty('double')) {
|
if (data.hasOwnProperty('double')) {
|
||||||
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
||||||
}
|
}
|
||||||
|
if (data.hasOwnProperty('decimal')) {
|
||||||
|
obj['decimal'] = ApiClient.convertToType(data['decimal'], 'Number');
|
||||||
|
}
|
||||||
if (data.hasOwnProperty('string')) {
|
if (data.hasOwnProperty('string')) {
|
||||||
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
||||||
}
|
}
|
||||||
@@ -137,6 +140,11 @@ FormatTest.prototype['float'] = undefined;
|
|||||||
*/
|
*/
|
||||||
FormatTest.prototype['double'] = undefined;
|
FormatTest.prototype['double'] = undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @member {Number} decimal
|
||||||
|
*/
|
||||||
|
FormatTest.prototype['decimal'] = undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @member {String} string
|
* @member {String} string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|||||||
**_number** | **Number** | |
|
**_number** | **Number** | |
|
||||||
**_float** | **Number** | | [optional]
|
**_float** | **Number** | | [optional]
|
||||||
**_double** | **Number** | | [optional]
|
**_double** | **Number** | | [optional]
|
||||||
|
**decimal** | **Number** | | [optional]
|
||||||
**_string** | **String** | | [optional]
|
**_string** | **String** | | [optional]
|
||||||
**_byte** | **Blob** | |
|
**_byte** | **Blob** | |
|
||||||
**binary** | **File** | | [optional]
|
**binary** | **File** | | [optional]
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ class FormatTest {
|
|||||||
if (data.hasOwnProperty('double')) {
|
if (data.hasOwnProperty('double')) {
|
||||||
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
|
||||||
}
|
}
|
||||||
|
if (data.hasOwnProperty('decimal')) {
|
||||||
|
obj['decimal'] = ApiClient.convertToType(data['decimal'], 'Number');
|
||||||
|
}
|
||||||
if (data.hasOwnProperty('string')) {
|
if (data.hasOwnProperty('string')) {
|
||||||
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
obj['string'] = ApiClient.convertToType(data['string'], 'String');
|
||||||
}
|
}
|
||||||
@@ -137,6 +140,11 @@ FormatTest.prototype['float'] = undefined;
|
|||||||
*/
|
*/
|
||||||
FormatTest.prototype['double'] = undefined;
|
FormatTest.prototype['double'] = undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @member {Number} decimal
|
||||||
|
*/
|
||||||
|
FormatTest.prototype['decimal'] = undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @member {String} string
|
* @member {String} string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | **double** | |
|
**number** | **double** | |
|
||||||
**float** | **double** | | [optional]
|
**float** | **double** | | [optional]
|
||||||
**double** | **double** | | [optional]
|
**double** | **double** | | [optional]
|
||||||
|
**decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
**string** | **string** | | [optional]
|
**string** | **string** | | [optional]
|
||||||
**byte** | **string** | |
|
**byte** | **string** | |
|
||||||
**binary** | **string** | | [optional]
|
**binary** | **string** | | [optional]
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ use Log::Any qw($log);
|
|||||||
use Date::Parse;
|
use Date::Parse;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
|
||||||
|
use WWW::OpenAPIClient::Object::Decimal;
|
||||||
|
|
||||||
use base ("Class::Accessor", "Class::Data::Inheritable");
|
use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||||
|
|
||||||
@@ -203,6 +204,13 @@ __PACKAGE__->method_documentation({
|
|||||||
format => '',
|
format => '',
|
||||||
read_only => '',
|
read_only => '',
|
||||||
},
|
},
|
||||||
|
'decimal' => {
|
||||||
|
datatype => 'Decimal',
|
||||||
|
base_name => 'decimal',
|
||||||
|
description => '',
|
||||||
|
format => '',
|
||||||
|
read_only => '',
|
||||||
|
},
|
||||||
'string' => {
|
'string' => {
|
||||||
datatype => 'string',
|
datatype => 'string',
|
||||||
base_name => 'string',
|
base_name => 'string',
|
||||||
@@ -275,6 +283,7 @@ __PACKAGE__->openapi_types( {
|
|||||||
'number' => 'double',
|
'number' => 'double',
|
||||||
'float' => 'double',
|
'float' => 'double',
|
||||||
'double' => 'double',
|
'double' => 'double',
|
||||||
|
'decimal' => 'Decimal',
|
||||||
'string' => 'string',
|
'string' => 'string',
|
||||||
'byte' => 'string',
|
'byte' => 'string',
|
||||||
'binary' => 'string',
|
'binary' => 'string',
|
||||||
@@ -293,6 +302,7 @@ __PACKAGE__->attribute_map( {
|
|||||||
'number' => 'number',
|
'number' => 'number',
|
||||||
'float' => 'float',
|
'float' => 'float',
|
||||||
'double' => 'double',
|
'double' => 'double',
|
||||||
|
'decimal' => 'decimal',
|
||||||
'string' => 'string',
|
'string' => 'string',
|
||||||
'byte' => 'byte',
|
'byte' => 'byte',
|
||||||
'binary' => 'binary',
|
'binary' => 'binary',
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | **float** | |
|
**number** | **float** | |
|
||||||
**float** | **float** | | [optional]
|
**float** | **float** | | [optional]
|
||||||
**double** | **double** | | [optional]
|
**double** | **double** | | [optional]
|
||||||
|
**decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
**string** | **string** | | [optional]
|
**string** | **string** | | [optional]
|
||||||
**byte** | **string** | |
|
**byte** | **string** | |
|
||||||
**binary** | [**\SplFileObject**](\SplFileObject.md) | | [optional]
|
**binary** | [**\SplFileObject**](\SplFileObject.md) | | [optional]
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
'number' => 'float',
|
'number' => 'float',
|
||||||
'float' => 'float',
|
'float' => 'float',
|
||||||
'double' => 'double',
|
'double' => 'double',
|
||||||
|
'decimal' => 'Decimal',
|
||||||
'string' => 'string',
|
'string' => 'string',
|
||||||
'byte' => 'string',
|
'byte' => 'string',
|
||||||
'binary' => '\SplFileObject',
|
'binary' => '\SplFileObject',
|
||||||
@@ -91,6 +92,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
'number' => null,
|
'number' => null,
|
||||||
'float' => 'float',
|
'float' => 'float',
|
||||||
'double' => 'double',
|
'double' => 'double',
|
||||||
|
'decimal' => 'number',
|
||||||
'string' => null,
|
'string' => null,
|
||||||
'byte' => 'byte',
|
'byte' => 'byte',
|
||||||
'binary' => 'binary',
|
'binary' => 'binary',
|
||||||
@@ -135,6 +137,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
'number' => 'number',
|
'number' => 'number',
|
||||||
'float' => 'float',
|
'float' => 'float',
|
||||||
'double' => 'double',
|
'double' => 'double',
|
||||||
|
'decimal' => 'decimal',
|
||||||
'string' => 'string',
|
'string' => 'string',
|
||||||
'byte' => 'byte',
|
'byte' => 'byte',
|
||||||
'binary' => 'binary',
|
'binary' => 'binary',
|
||||||
@@ -158,6 +161,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
'number' => 'setNumber',
|
'number' => 'setNumber',
|
||||||
'float' => 'setFloat',
|
'float' => 'setFloat',
|
||||||
'double' => 'setDouble',
|
'double' => 'setDouble',
|
||||||
|
'decimal' => 'setDecimal',
|
||||||
'string' => 'setString',
|
'string' => 'setString',
|
||||||
'byte' => 'setByte',
|
'byte' => 'setByte',
|
||||||
'binary' => 'setBinary',
|
'binary' => 'setBinary',
|
||||||
@@ -181,6 +185,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
'number' => 'getNumber',
|
'number' => 'getNumber',
|
||||||
'float' => 'getFloat',
|
'float' => 'getFloat',
|
||||||
'double' => 'getDouble',
|
'double' => 'getDouble',
|
||||||
|
'decimal' => 'getDecimal',
|
||||||
'string' => 'getString',
|
'string' => 'getString',
|
||||||
'byte' => 'getByte',
|
'byte' => 'getByte',
|
||||||
'binary' => 'getBinary',
|
'binary' => 'getBinary',
|
||||||
@@ -258,6 +263,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
$this->container['number'] = $data['number'] ?? null;
|
$this->container['number'] = $data['number'] ?? null;
|
||||||
$this->container['float'] = $data['float'] ?? null;
|
$this->container['float'] = $data['float'] ?? null;
|
||||||
$this->container['double'] = $data['double'] ?? null;
|
$this->container['double'] = $data['double'] ?? null;
|
||||||
|
$this->container['decimal'] = $data['decimal'] ?? null;
|
||||||
$this->container['string'] = $data['string'] ?? null;
|
$this->container['string'] = $data['string'] ?? null;
|
||||||
$this->container['byte'] = $data['byte'] ?? null;
|
$this->container['byte'] = $data['byte'] ?? null;
|
||||||
$this->container['binary'] = $data['binary'] ?? null;
|
$this->container['binary'] = $data['binary'] ?? null;
|
||||||
@@ -549,6 +555,30 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets decimal
|
||||||
|
*
|
||||||
|
* @return Decimal|null
|
||||||
|
*/
|
||||||
|
public function getDecimal()
|
||||||
|
{
|
||||||
|
return $this->container['decimal'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets decimal
|
||||||
|
*
|
||||||
|
* @param Decimal|null $decimal decimal
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setDecimal($decimal)
|
||||||
|
{
|
||||||
|
$this->container['decimal'] = $decimal;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets string
|
* Gets string
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
|
|||||||
**date_time** | **datetime** | | [optional]
|
**date_time** | **datetime** | | [optional]
|
||||||
**uuid** | **str** | | [optional]
|
**uuid** | **str** | | [optional]
|
||||||
**password** | **str** | |
|
**password** | **str** | |
|
||||||
**big_decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
**big_decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class FormatTest(object):
|
|||||||
'date_time': 'datetime',
|
'date_time': 'datetime',
|
||||||
'uuid': 'str',
|
'uuid': 'str',
|
||||||
'password': 'str',
|
'password': 'str',
|
||||||
'big_decimal': 'BigDecimal'
|
'big_decimal': 'Decimal'
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute_map = {
|
attribute_map = {
|
||||||
@@ -442,7 +442,7 @@ class FormatTest(object):
|
|||||||
|
|
||||||
|
|
||||||
:return: The big_decimal of this FormatTest. # noqa: E501
|
:return: The big_decimal of this FormatTest. # noqa: E501
|
||||||
:rtype: BigDecimal
|
:rtype: Decimal
|
||||||
"""
|
"""
|
||||||
return self._big_decimal
|
return self._big_decimal
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ class FormatTest(object):
|
|||||||
|
|
||||||
|
|
||||||
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
|
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
|
||||||
:type big_decimal: BigDecimal
|
:type big_decimal: Decimal
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._big_decimal = big_decimal
|
self._big_decimal = big_decimal
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
|
|||||||
**date_time** | **datetime** | | [optional]
|
**date_time** | **datetime** | | [optional]
|
||||||
**uuid** | **str** | | [optional]
|
**uuid** | **str** | | [optional]
|
||||||
**password** | **str** | |
|
**password** | **str** | |
|
||||||
**big_decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
**big_decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class FormatTest(object):
|
|||||||
'date_time': 'datetime',
|
'date_time': 'datetime',
|
||||||
'uuid': 'str',
|
'uuid': 'str',
|
||||||
'password': 'str',
|
'password': 'str',
|
||||||
'big_decimal': 'BigDecimal'
|
'big_decimal': 'Decimal'
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute_map = {
|
attribute_map = {
|
||||||
@@ -442,7 +442,7 @@ class FormatTest(object):
|
|||||||
|
|
||||||
|
|
||||||
:return: The big_decimal of this FormatTest. # noqa: E501
|
:return: The big_decimal of this FormatTest. # noqa: E501
|
||||||
:rtype: BigDecimal
|
:rtype: Decimal
|
||||||
"""
|
"""
|
||||||
return self._big_decimal
|
return self._big_decimal
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ class FormatTest(object):
|
|||||||
|
|
||||||
|
|
||||||
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
|
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
|
||||||
:type big_decimal: BigDecimal
|
:type big_decimal: Decimal
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._big_decimal = big_decimal
|
self._big_decimal = big_decimal
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
|
|||||||
**date_time** | **datetime** | | [optional]
|
**date_time** | **datetime** | | [optional]
|
||||||
**uuid** | **str** | | [optional]
|
**uuid** | **str** | | [optional]
|
||||||
**password** | **str** | |
|
**password** | **str** | |
|
||||||
**big_decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
**big_decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class FormatTest(object):
|
|||||||
'date_time': 'datetime',
|
'date_time': 'datetime',
|
||||||
'uuid': 'str',
|
'uuid': 'str',
|
||||||
'password': 'str',
|
'password': 'str',
|
||||||
'big_decimal': 'BigDecimal'
|
'big_decimal': 'Decimal'
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute_map = {
|
attribute_map = {
|
||||||
@@ -442,7 +442,7 @@ class FormatTest(object):
|
|||||||
|
|
||||||
|
|
||||||
:return: The big_decimal of this FormatTest. # noqa: E501
|
:return: The big_decimal of this FormatTest. # noqa: E501
|
||||||
:rtype: BigDecimal
|
:rtype: Decimal
|
||||||
"""
|
"""
|
||||||
return self._big_decimal
|
return self._big_decimal
|
||||||
|
|
||||||
@@ -452,7 +452,7 @@ class FormatTest(object):
|
|||||||
|
|
||||||
|
|
||||||
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
|
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
|
||||||
:type big_decimal: BigDecimal
|
:type big_decimal: Decimal
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self._big_decimal = big_decimal
|
self._big_decimal = big_decimal
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | **Float** | |
|
**number** | **Float** | |
|
||||||
**float** | **Float** | | [optional]
|
**float** | **Float** | | [optional]
|
||||||
**double** | **Float** | | [optional]
|
**double** | **Float** | | [optional]
|
||||||
|
**decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
**string** | **String** | | [optional]
|
**string** | **String** | | [optional]
|
||||||
**byte** | **String** | |
|
**byte** | **String** | |
|
||||||
**binary** | **File** | | [optional]
|
**binary** | **File** | | [optional]
|
||||||
@@ -31,6 +32,7 @@ instance = Petstore::FormatTest.new(integer: null,
|
|||||||
number: null,
|
number: null,
|
||||||
float: null,
|
float: null,
|
||||||
double: null,
|
double: null,
|
||||||
|
decimal: null,
|
||||||
string: null,
|
string: null,
|
||||||
byte: null,
|
byte: null,
|
||||||
binary: null,
|
binary: null,
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ module Petstore
|
|||||||
|
|
||||||
attr_accessor :double
|
attr_accessor :double
|
||||||
|
|
||||||
|
attr_accessor :decimal
|
||||||
|
|
||||||
attr_accessor :string
|
attr_accessor :string
|
||||||
|
|
||||||
attr_accessor :byte
|
attr_accessor :byte
|
||||||
@@ -56,6 +58,7 @@ module Petstore
|
|||||||
:'number' => :'number',
|
:'number' => :'number',
|
||||||
:'float' => :'float',
|
:'float' => :'float',
|
||||||
:'double' => :'double',
|
:'double' => :'double',
|
||||||
|
:'decimal' => :'decimal',
|
||||||
:'string' => :'string',
|
:'string' => :'string',
|
||||||
:'byte' => :'byte',
|
:'byte' => :'byte',
|
||||||
:'binary' => :'binary',
|
:'binary' => :'binary',
|
||||||
@@ -77,6 +80,7 @@ module Petstore
|
|||||||
:'number' => :'Float',
|
:'number' => :'Float',
|
||||||
:'float' => :'Float',
|
:'float' => :'Float',
|
||||||
:'double' => :'Float',
|
:'double' => :'Float',
|
||||||
|
:'decimal' => :'Decimal',
|
||||||
:'string' => :'String',
|
:'string' => :'String',
|
||||||
:'byte' => :'String',
|
:'byte' => :'String',
|
||||||
:'binary' => :'File',
|
:'binary' => :'File',
|
||||||
@@ -134,6 +138,10 @@ module Petstore
|
|||||||
self.double = attributes[:'double']
|
self.double = attributes[:'double']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if attributes.key?(:'decimal')
|
||||||
|
self.decimal = attributes[:'decimal']
|
||||||
|
end
|
||||||
|
|
||||||
if attributes.key?(:'string')
|
if attributes.key?(:'string')
|
||||||
self.string = attributes[:'string']
|
self.string = attributes[:'string']
|
||||||
end
|
end
|
||||||
@@ -418,6 +426,7 @@ module Petstore
|
|||||||
number == o.number &&
|
number == o.number &&
|
||||||
float == o.float &&
|
float == o.float &&
|
||||||
double == o.double &&
|
double == o.double &&
|
||||||
|
decimal == o.decimal &&
|
||||||
string == o.string &&
|
string == o.string &&
|
||||||
byte == o.byte &&
|
byte == o.byte &&
|
||||||
binary == o.binary &&
|
binary == o.binary &&
|
||||||
@@ -438,7 +447,7 @@ module Petstore
|
|||||||
# Calculates hash code according to all attributes.
|
# Calculates hash code according to all attributes.
|
||||||
# @return [Integer] Hash code
|
# @return [Integer] Hash code
|
||||||
def hash
|
def hash
|
||||||
[integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash
|
[integer, int32, int64, number, float, double, decimal, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds the object from hash
|
# Builds the object from hash
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | **Float** | |
|
**number** | **Float** | |
|
||||||
**float** | **Float** | | [optional]
|
**float** | **Float** | | [optional]
|
||||||
**double** | **Float** | | [optional]
|
**double** | **Float** | | [optional]
|
||||||
|
**decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
**string** | **String** | | [optional]
|
**string** | **String** | | [optional]
|
||||||
**byte** | **String** | |
|
**byte** | **String** | |
|
||||||
**binary** | **File** | | [optional]
|
**binary** | **File** | | [optional]
|
||||||
@@ -31,6 +32,7 @@ instance = Petstore::FormatTest.new(integer: null,
|
|||||||
number: null,
|
number: null,
|
||||||
float: null,
|
float: null,
|
||||||
double: null,
|
double: null,
|
||||||
|
decimal: null,
|
||||||
string: null,
|
string: null,
|
||||||
byte: null,
|
byte: null,
|
||||||
binary: null,
|
binary: null,
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ module Petstore
|
|||||||
|
|
||||||
attr_accessor :double
|
attr_accessor :double
|
||||||
|
|
||||||
|
attr_accessor :decimal
|
||||||
|
|
||||||
attr_accessor :string
|
attr_accessor :string
|
||||||
|
|
||||||
attr_accessor :byte
|
attr_accessor :byte
|
||||||
@@ -56,6 +58,7 @@ module Petstore
|
|||||||
:'number' => :'number',
|
:'number' => :'number',
|
||||||
:'float' => :'float',
|
:'float' => :'float',
|
||||||
:'double' => :'double',
|
:'double' => :'double',
|
||||||
|
:'decimal' => :'decimal',
|
||||||
:'string' => :'string',
|
:'string' => :'string',
|
||||||
:'byte' => :'byte',
|
:'byte' => :'byte',
|
||||||
:'binary' => :'binary',
|
:'binary' => :'binary',
|
||||||
@@ -77,6 +80,7 @@ module Petstore
|
|||||||
:'number' => :'Float',
|
:'number' => :'Float',
|
||||||
:'float' => :'Float',
|
:'float' => :'Float',
|
||||||
:'double' => :'Float',
|
:'double' => :'Float',
|
||||||
|
:'decimal' => :'Decimal',
|
||||||
:'string' => :'String',
|
:'string' => :'String',
|
||||||
:'byte' => :'String',
|
:'byte' => :'String',
|
||||||
:'binary' => :'File',
|
:'binary' => :'File',
|
||||||
@@ -134,6 +138,10 @@ module Petstore
|
|||||||
self.double = attributes[:'double']
|
self.double = attributes[:'double']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if attributes.key?(:'decimal')
|
||||||
|
self.decimal = attributes[:'decimal']
|
||||||
|
end
|
||||||
|
|
||||||
if attributes.key?(:'string')
|
if attributes.key?(:'string')
|
||||||
self.string = attributes[:'string']
|
self.string = attributes[:'string']
|
||||||
end
|
end
|
||||||
@@ -418,6 +426,7 @@ module Petstore
|
|||||||
number == o.number &&
|
number == o.number &&
|
||||||
float == o.float &&
|
float == o.float &&
|
||||||
double == o.double &&
|
double == o.double &&
|
||||||
|
decimal == o.decimal &&
|
||||||
string == o.string &&
|
string == o.string &&
|
||||||
byte == o.byte &&
|
byte == o.byte &&
|
||||||
binary == o.binary &&
|
binary == o.binary &&
|
||||||
@@ -438,7 +447,7 @@ module Petstore
|
|||||||
# Calculates hash code according to all attributes.
|
# Calculates hash code according to all attributes.
|
||||||
# @return [Integer] Hash code
|
# @return [Integer] Hash code
|
||||||
def hash
|
def hash
|
||||||
[integer, int32, int64, number, float, double, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash
|
[integer, int32, int64, number, float, double, decimal, string, byte, binary, date, date_time, uuid, password, pattern_with_digits, pattern_with_digits_and_delimiter].hash
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds the object from hash
|
# Builds the object from hash
|
||||||
|
|||||||
@@ -1611,6 +1611,9 @@ components:
|
|||||||
maximum: 123.4
|
maximum: 123.4
|
||||||
minimum: 67.8
|
minimum: 67.8
|
||||||
type: number
|
type: number
|
||||||
|
decimal:
|
||||||
|
format: number
|
||||||
|
type: string
|
||||||
string:
|
string:
|
||||||
pattern: /[a-z]/i
|
pattern: /[a-z]/i
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | [**BigDecimal**](BigDecimal.md) | |
|
**number** | [**BigDecimal**](BigDecimal.md) | |
|
||||||
**_float** | **Float** | | [optional]
|
**_float** | **Float** | | [optional]
|
||||||
**_double** | **Double** | | [optional]
|
**_double** | **Double** | | [optional]
|
||||||
|
**decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||||
**string** | **String** | | [optional]
|
**string** | **String** | | [optional]
|
||||||
**_byte** | **byte[]** | |
|
**_byte** | **byte[]** | |
|
||||||
**binary** | [**File**](File.md) | | [optional]
|
**binary** | [**File**](File.md) | | [optional]
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import org.openapitools.client.JSON;
|
|||||||
FormatTest.JSON_PROPERTY_NUMBER,
|
FormatTest.JSON_PROPERTY_NUMBER,
|
||||||
FormatTest.JSON_PROPERTY_FLOAT,
|
FormatTest.JSON_PROPERTY_FLOAT,
|
||||||
FormatTest.JSON_PROPERTY_DOUBLE,
|
FormatTest.JSON_PROPERTY_DOUBLE,
|
||||||
|
FormatTest.JSON_PROPERTY_DECIMAL,
|
||||||
FormatTest.JSON_PROPERTY_STRING,
|
FormatTest.JSON_PROPERTY_STRING,
|
||||||
FormatTest.JSON_PROPERTY_BYTE,
|
FormatTest.JSON_PROPERTY_BYTE,
|
||||||
FormatTest.JSON_PROPERTY_BINARY,
|
FormatTest.JSON_PROPERTY_BINARY,
|
||||||
@@ -73,6 +74,9 @@ public class FormatTest {
|
|||||||
public static final String JSON_PROPERTY_DOUBLE = "double";
|
public static final String JSON_PROPERTY_DOUBLE = "double";
|
||||||
private Double _double;
|
private Double _double;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_DECIMAL = "decimal";
|
||||||
|
private BigDecimal decimal;
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_STRING = "string";
|
public static final String JSON_PROPERTY_STRING = "string";
|
||||||
private String string;
|
private String string;
|
||||||
|
|
||||||
@@ -254,6 +258,30 @@ public class FormatTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public FormatTest decimal(BigDecimal decimal) {
|
||||||
|
this.decimal = decimal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get decimal
|
||||||
|
* @return decimal
|
||||||
|
**/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@JsonProperty(JSON_PROPERTY_DECIMAL)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public BigDecimal getDecimal() {
|
||||||
|
return decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDecimal(BigDecimal decimal) {
|
||||||
|
this.decimal = decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public FormatTest string(String string) {
|
public FormatTest string(String string) {
|
||||||
this.string = string;
|
this.string = string;
|
||||||
return this;
|
return this;
|
||||||
@@ -485,6 +513,7 @@ public class FormatTest {
|
|||||||
Objects.equals(this.number, formatTest.number) &&
|
Objects.equals(this.number, formatTest.number) &&
|
||||||
Objects.equals(this._float, formatTest._float) &&
|
Objects.equals(this._float, formatTest._float) &&
|
||||||
Objects.equals(this._double, formatTest._double) &&
|
Objects.equals(this._double, formatTest._double) &&
|
||||||
|
Objects.equals(this.decimal, formatTest.decimal) &&
|
||||||
Objects.equals(this.string, formatTest.string) &&
|
Objects.equals(this.string, formatTest.string) &&
|
||||||
Arrays.equals(this._byte, formatTest._byte) &&
|
Arrays.equals(this._byte, formatTest._byte) &&
|
||||||
Objects.equals(this.binary, formatTest.binary) &&
|
Objects.equals(this.binary, formatTest.binary) &&
|
||||||
@@ -498,7 +527,7 @@ public class FormatTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
|
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -512,6 +541,7 @@ public class FormatTest {
|
|||||||
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
||||||
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
||||||
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
||||||
|
sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n");
|
||||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||||
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
||||||
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
||||||
|
|||||||
@@ -1611,6 +1611,9 @@ components:
|
|||||||
maximum: 123.4
|
maximum: 123.4
|
||||||
minimum: 67.8
|
minimum: 67.8
|
||||||
type: number
|
type: number
|
||||||
|
decimal:
|
||||||
|
format: number
|
||||||
|
type: string
|
||||||
string:
|
string:
|
||||||
pattern: /[a-z]/i
|
pattern: /[a-z]/i
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | [**BigDecimal**](BigDecimal.md) | |
|
**number** | [**BigDecimal**](BigDecimal.md) | |
|
||||||
**_float** | **Float** | | [optional]
|
**_float** | **Float** | | [optional]
|
||||||
**_double** | **Double** | | [optional]
|
**_double** | **Double** | | [optional]
|
||||||
|
**decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
|
||||||
**string** | **String** | | [optional]
|
**string** | **String** | | [optional]
|
||||||
**_byte** | **byte[]** | |
|
**_byte** | **byte[]** | |
|
||||||
**binary** | [**File**](File.md) | | [optional]
|
**binary** | [**File**](File.md) | | [optional]
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import org.openapitools.client.JSON;
|
|||||||
FormatTest.JSON_PROPERTY_NUMBER,
|
FormatTest.JSON_PROPERTY_NUMBER,
|
||||||
FormatTest.JSON_PROPERTY_FLOAT,
|
FormatTest.JSON_PROPERTY_FLOAT,
|
||||||
FormatTest.JSON_PROPERTY_DOUBLE,
|
FormatTest.JSON_PROPERTY_DOUBLE,
|
||||||
|
FormatTest.JSON_PROPERTY_DECIMAL,
|
||||||
FormatTest.JSON_PROPERTY_STRING,
|
FormatTest.JSON_PROPERTY_STRING,
|
||||||
FormatTest.JSON_PROPERTY_BYTE,
|
FormatTest.JSON_PROPERTY_BYTE,
|
||||||
FormatTest.JSON_PROPERTY_BINARY,
|
FormatTest.JSON_PROPERTY_BINARY,
|
||||||
@@ -73,6 +74,9 @@ public class FormatTest {
|
|||||||
public static final String JSON_PROPERTY_DOUBLE = "double";
|
public static final String JSON_PROPERTY_DOUBLE = "double";
|
||||||
private Double _double;
|
private Double _double;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_DECIMAL = "decimal";
|
||||||
|
private BigDecimal decimal;
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_STRING = "string";
|
public static final String JSON_PROPERTY_STRING = "string";
|
||||||
private String string;
|
private String string;
|
||||||
|
|
||||||
@@ -254,6 +258,30 @@ public class FormatTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public FormatTest decimal(BigDecimal decimal) {
|
||||||
|
this.decimal = decimal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get decimal
|
||||||
|
* @return decimal
|
||||||
|
**/
|
||||||
|
@javax.annotation.Nullable
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@JsonProperty(JSON_PROPERTY_DECIMAL)
|
||||||
|
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||||
|
|
||||||
|
public BigDecimal getDecimal() {
|
||||||
|
return decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDecimal(BigDecimal decimal) {
|
||||||
|
this.decimal = decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public FormatTest string(String string) {
|
public FormatTest string(String string) {
|
||||||
this.string = string;
|
this.string = string;
|
||||||
return this;
|
return this;
|
||||||
@@ -485,6 +513,7 @@ public class FormatTest {
|
|||||||
Objects.equals(this.number, formatTest.number) &&
|
Objects.equals(this.number, formatTest.number) &&
|
||||||
Objects.equals(this._float, formatTest._float) &&
|
Objects.equals(this._float, formatTest._float) &&
|
||||||
Objects.equals(this._double, formatTest._double) &&
|
Objects.equals(this._double, formatTest._double) &&
|
||||||
|
Objects.equals(this.decimal, formatTest.decimal) &&
|
||||||
Objects.equals(this.string, formatTest.string) &&
|
Objects.equals(this.string, formatTest.string) &&
|
||||||
Arrays.equals(this._byte, formatTest._byte) &&
|
Arrays.equals(this._byte, formatTest._byte) &&
|
||||||
Objects.equals(this.binary, formatTest.binary) &&
|
Objects.equals(this.binary, formatTest.binary) &&
|
||||||
@@ -498,7 +527,7 @@ public class FormatTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
|
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -511,6 +540,7 @@ public class FormatTest {
|
|||||||
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
||||||
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
||||||
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
||||||
|
sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n");
|
||||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||||
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
||||||
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|||||||
**number** | **float** | |
|
**number** | **float** | |
|
||||||
**float** | **float** | | [optional]
|
**float** | **float** | | [optional]
|
||||||
**double** | **float** | | [optional]
|
**double** | **float** | | [optional]
|
||||||
|
**decimal** | [**Decimal**](Decimal.md) | | [optional]
|
||||||
**string** | **str** | | [optional]
|
**string** | **str** | | [optional]
|
||||||
**byte** | **str** | |
|
**byte** | **str** | |
|
||||||
**binary** | **file** | | [optional]
|
**binary** | **file** | | [optional]
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class FormatTest(object):
|
|||||||
'number': 'float',
|
'number': 'float',
|
||||||
'float': 'float',
|
'float': 'float',
|
||||||
'double': 'float',
|
'double': 'float',
|
||||||
|
'decimal': 'Decimal',
|
||||||
'string': 'str',
|
'string': 'str',
|
||||||
'byte': 'str',
|
'byte': 'str',
|
||||||
'binary': 'file',
|
'binary': 'file',
|
||||||
@@ -57,6 +58,7 @@ class FormatTest(object):
|
|||||||
'number': 'number',
|
'number': 'number',
|
||||||
'float': 'float',
|
'float': 'float',
|
||||||
'double': 'double',
|
'double': 'double',
|
||||||
|
'decimal': 'decimal',
|
||||||
'string': 'string',
|
'string': 'string',
|
||||||
'byte': 'byte',
|
'byte': 'byte',
|
||||||
'binary': 'binary',
|
'binary': 'binary',
|
||||||
@@ -68,7 +70,7 @@ class FormatTest(object):
|
|||||||
'pattern_with_digits_and_delimiter': 'pattern_with_digits_and_delimiter'
|
'pattern_with_digits_and_delimiter': 'pattern_with_digits_and_delimiter'
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None, local_vars_configuration=None): # noqa: E501
|
def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, decimal=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None, pattern_with_digits=None, pattern_with_digits_and_delimiter=None, local_vars_configuration=None): # noqa: E501
|
||||||
"""FormatTest - a model defined in OpenAPI""" # noqa: E501
|
"""FormatTest - a model defined in OpenAPI""" # noqa: E501
|
||||||
if local_vars_configuration is None:
|
if local_vars_configuration is None:
|
||||||
local_vars_configuration = Configuration()
|
local_vars_configuration = Configuration()
|
||||||
@@ -80,6 +82,7 @@ class FormatTest(object):
|
|||||||
self._number = None
|
self._number = None
|
||||||
self._float = None
|
self._float = None
|
||||||
self._double = None
|
self._double = None
|
||||||
|
self._decimal = None
|
||||||
self._string = None
|
self._string = None
|
||||||
self._byte = None
|
self._byte = None
|
||||||
self._binary = None
|
self._binary = None
|
||||||
@@ -102,6 +105,8 @@ class FormatTest(object):
|
|||||||
self.float = float
|
self.float = float
|
||||||
if double is not None:
|
if double is not None:
|
||||||
self.double = double
|
self.double = double
|
||||||
|
if decimal is not None:
|
||||||
|
self.decimal = decimal
|
||||||
if string is not None:
|
if string is not None:
|
||||||
self.string = string
|
self.string = string
|
||||||
self.byte = byte
|
self.byte = byte
|
||||||
@@ -276,6 +281,27 @@ class FormatTest(object):
|
|||||||
|
|
||||||
self._double = double
|
self._double = double
|
||||||
|
|
||||||
|
@property
|
||||||
|
def decimal(self):
|
||||||
|
"""Gets the decimal of this FormatTest. # noqa: E501
|
||||||
|
|
||||||
|
|
||||||
|
:return: The decimal of this FormatTest. # noqa: E501
|
||||||
|
:rtype: Decimal
|
||||||
|
"""
|
||||||
|
return self._decimal
|
||||||
|
|
||||||
|
@decimal.setter
|
||||||
|
def decimal(self, decimal):
|
||||||
|
"""Sets the decimal of this FormatTest.
|
||||||
|
|
||||||
|
|
||||||
|
:param decimal: The decimal of this FormatTest. # noqa: E501
|
||||||
|
:type decimal: Decimal
|
||||||
|
"""
|
||||||
|
|
||||||
|
self._decimal = decimal
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def string(self):
|
def string(self):
|
||||||
"""Gets the string of this FormatTest. # noqa: E501
|
"""Gets the string of this FormatTest. # noqa: E501
|
||||||
|
|||||||
@@ -7,17 +7,17 @@
|
|||||||
--
|
--
|
||||||
-- SELECT template for table `format_test`
|
-- SELECT template for table `format_test`
|
||||||
--
|
--
|
||||||
SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter` FROM `format_test` WHERE 1;
|
SELECT `integer`, `int32`, `int64`, `number`, `float`, `double`, `decimal`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter` FROM `format_test` WHERE 1;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- INSERT template for table `format_test`
|
-- INSERT template for table `format_test`
|
||||||
--
|
--
|
||||||
INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
INSERT INTO `format_test`(`integer`, `int32`, `int64`, `number`, `float`, `double`, `decimal`, `string`, `byte`, `binary`, `date`, `dateTime`, `uuid`, `password`, `pattern_with_digits`, `pattern_with_digits_and_delimiter`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- UPDATE template for table `format_test`
|
-- UPDATE template for table `format_test`
|
||||||
--
|
--
|
||||||
UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `uuid` = ?, `password` = ?, `pattern_with_digits` = ?, `pattern_with_digits_and_delimiter` = ? WHERE 1;
|
UPDATE `format_test` SET `integer` = ?, `int32` = ?, `int64` = ?, `number` = ?, `float` = ?, `double` = ?, `decimal` = ?, `string` = ?, `byte` = ?, `binary` = ?, `date` = ?, `dateTime` = ?, `uuid` = ?, `password` = ?, `pattern_with_digits` = ?, `pattern_with_digits_and_delimiter` = ? WHERE 1;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- DELETE template for table `format_test`
|
-- DELETE template for table `format_test`
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ CREATE TABLE IF NOT EXISTS `format_test` (
|
|||||||
`number` DECIMAL(20, 9) UNSIGNED NOT NULL,
|
`number` DECIMAL(20, 9) UNSIGNED NOT NULL,
|
||||||
`float` DECIMAL(20, 9) UNSIGNED DEFAULT NULL,
|
`float` DECIMAL(20, 9) UNSIGNED DEFAULT NULL,
|
||||||
`double` DECIMAL(20, 9) UNSIGNED DEFAULT NULL,
|
`double` DECIMAL(20, 9) UNSIGNED DEFAULT NULL,
|
||||||
|
`decimal` TEXT DEFAULT NULL,
|
||||||
`string` TEXT DEFAULT NULL,
|
`string` TEXT DEFAULT NULL,
|
||||||
`byte` MEDIUMBLOB NOT NULL,
|
`byte` MEDIUMBLOB NOT NULL,
|
||||||
`binary` MEDIUMBLOB DEFAULT NULL,
|
`binary` MEDIUMBLOB DEFAULT NULL,
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class FormatTest {
|
|||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
private BigDecimal bigDecimal;
|
private BigDecimal bigDecimal;
|
||||||
/**
|
/**
|
||||||
* Get integer
|
* Get integer
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ public class FormatTest implements Serializable {
|
|||||||
**/
|
**/
|
||||||
@JsonProperty("BigDecimal")
|
@JsonProperty("BigDecimal")
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
public BigDecimal getBigDecimal() {
|
public BigDecimal getBigDecimal() {
|
||||||
return bigDecimal;
|
return bigDecimal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import javax.validation.Valid;
|
|||||||
FormatTest.JSON_PROPERTY_NUMBER,
|
FormatTest.JSON_PROPERTY_NUMBER,
|
||||||
FormatTest.JSON_PROPERTY_FLOAT,
|
FormatTest.JSON_PROPERTY_FLOAT,
|
||||||
FormatTest.JSON_PROPERTY_DOUBLE,
|
FormatTest.JSON_PROPERTY_DOUBLE,
|
||||||
|
FormatTest.JSON_PROPERTY_DECIMAL,
|
||||||
FormatTest.JSON_PROPERTY_STRING,
|
FormatTest.JSON_PROPERTY_STRING,
|
||||||
FormatTest.JSON_PROPERTY_BYTE,
|
FormatTest.JSON_PROPERTY_BYTE,
|
||||||
FormatTest.JSON_PROPERTY_BINARY,
|
FormatTest.JSON_PROPERTY_BINARY,
|
||||||
@@ -72,6 +73,10 @@ public class FormatTest {
|
|||||||
@JsonProperty(JSON_PROPERTY_DOUBLE)
|
@JsonProperty(JSON_PROPERTY_DOUBLE)
|
||||||
private Double _double;
|
private Double _double;
|
||||||
|
|
||||||
|
public static final String JSON_PROPERTY_DECIMAL = "decimal";
|
||||||
|
@JsonProperty(JSON_PROPERTY_DECIMAL)
|
||||||
|
private BigDecimal decimal;
|
||||||
|
|
||||||
public static final String JSON_PROPERTY_STRING = "string";
|
public static final String JSON_PROPERTY_STRING = "string";
|
||||||
@JsonProperty(JSON_PROPERTY_STRING)
|
@JsonProperty(JSON_PROPERTY_STRING)
|
||||||
private String string;
|
private String string;
|
||||||
@@ -238,6 +243,26 @@ public class FormatTest {
|
|||||||
this._double = _double;
|
this._double = _double;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FormatTest decimal(BigDecimal decimal) {
|
||||||
|
this.decimal = decimal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get decimal
|
||||||
|
* @return decimal
|
||||||
|
**/
|
||||||
|
@JsonProperty("decimal")
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
|
public BigDecimal getDecimal() {
|
||||||
|
return decimal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDecimal(BigDecimal decimal) {
|
||||||
|
this.decimal = decimal;
|
||||||
|
}
|
||||||
|
|
||||||
public FormatTest string(String string) {
|
public FormatTest string(String string) {
|
||||||
this.string = string;
|
this.string = string;
|
||||||
return this;
|
return this;
|
||||||
@@ -434,6 +459,7 @@ public class FormatTest {
|
|||||||
Objects.equals(this.number, formatTest.number) &&
|
Objects.equals(this.number, formatTest.number) &&
|
||||||
Objects.equals(this._float, formatTest._float) &&
|
Objects.equals(this._float, formatTest._float) &&
|
||||||
Objects.equals(this._double, formatTest._double) &&
|
Objects.equals(this._double, formatTest._double) &&
|
||||||
|
Objects.equals(this.decimal, formatTest.decimal) &&
|
||||||
Objects.equals(this.string, formatTest.string) &&
|
Objects.equals(this.string, formatTest.string) &&
|
||||||
Objects.equals(this._byte, formatTest._byte) &&
|
Objects.equals(this._byte, formatTest._byte) &&
|
||||||
Objects.equals(this.binary, formatTest.binary) &&
|
Objects.equals(this.binary, formatTest.binary) &&
|
||||||
@@ -447,7 +473,7 @@ public class FormatTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
|
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, _byte, binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -462,6 +488,7 @@ public class FormatTest {
|
|||||||
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
sb.append(" number: ").append(toIndentedString(number)).append("\n");
|
||||||
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
|
||||||
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
|
||||||
|
sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n");
|
||||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||||
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
|
||||||
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@JsonProperty("BigDecimal")
|
@JsonProperty("BigDecimal")
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
public BigDecimal getBigDecimal() {
|
public BigDecimal getBigDecimal() {
|
||||||
return bigDecimal;
|
return bigDecimal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@JsonProperty("BigDecimal")
|
@JsonProperty("BigDecimal")
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
public BigDecimal getBigDecimal() {
|
public BigDecimal getBigDecimal() {
|
||||||
return bigDecimal;
|
return bigDecimal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@JsonProperty("BigDecimal")
|
@JsonProperty("BigDecimal")
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
public BigDecimal getBigDecimal() {
|
public BigDecimal getBigDecimal() {
|
||||||
return bigDecimal;
|
return bigDecimal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@JsonProperty("BigDecimal")
|
@JsonProperty("BigDecimal")
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
@Valid
|
||||||
public BigDecimal getBigDecimal() {
|
public BigDecimal getBigDecimal() {
|
||||||
return bigDecimal;
|
return bigDecimal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ class FormatTest {
|
|||||||
/** @var double $double */
|
/** @var double $double */
|
||||||
private $double;
|
private $double;
|
||||||
|
|
||||||
|
/** @var Decimal $decimal */
|
||||||
|
private $decimal;
|
||||||
|
|
||||||
/** @var string $string */
|
/** @var string $string */
|
||||||
private $string;
|
private $string;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user