diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md
index b28410855f..a17ea112cc 100644
--- a/docs/generators/aspnetcore.md
+++ b/docs/generators/aspnetcore.md
@@ -63,6 +63,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
DateTime?
DateTimeOffset
DateTimeOffset?
+Decimal
Dictionary
Double
Float
diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md
index 3b5cee05e3..4ce8ee5b14 100644
--- a/docs/generators/csharp-dotnet2.md
+++ b/docs/generators/csharp-dotnet2.md
@@ -35,6 +35,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
DateTime?
DateTimeOffset
DateTimeOffset?
+Decimal
Dictionary
Double
Float
diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md
index 537db8e94c..f08b515793 100644
--- a/docs/generators/csharp-nancyfx.md
+++ b/docs/generators/csharp-nancyfx.md
@@ -46,6 +46,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
DateTime?
DateTimeOffset
DateTimeOffset?
+Decimal
Dictionary
Double
Float
diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md
index d115bfa9e6..816fc2820e 100644
--- a/docs/generators/csharp-netcore.md
+++ b/docs/generators/csharp-netcore.md
@@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
DateTime?
DateTimeOffset
DateTimeOffset?
+Decimal
Dictionary
Double
Float
diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md
index 663bc7c5d0..ec9c4454ff 100644
--- a/docs/generators/csharp.md
+++ b/docs/generators/csharp.md
@@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
DateTime?
DateTimeOffset
DateTimeOffset?
+Decimal
Dictionary
Double
Float
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
index 61fa928c20..e44af181e4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
@@ -34,7 +34,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
public String nameInLowerCase; // property name in lower case
public String example; // example value (x-example)
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;
public boolean isArray, isMap;
public boolean isFile;
@@ -172,6 +172,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
output.isInteger = this.isInteger;
output.isLong = this.isLong;
output.isDouble = this.isDouble;
+ output.isDecimal = this.isDecimal;
output.isFloat = this.isFloat;
output.isNumber = this.isNumber;
output.isBoolean = this.isBoolean;
@@ -193,7 +194,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
@Override
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
@@ -221,6 +222,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
isNumber == that.isNumber &&
isFloat == that.isFloat &&
isDouble == that.isDouble &&
+ isDecimal == that.isDecimal &&
isByteArray == that.isByteArray &&
isBinary == that.isBinary &&
isBoolean == that.isBoolean &&
@@ -311,6 +313,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
sb.append(", isNumber=").append(isNumber);
sb.append(", isFloat=").append(isFloat);
sb.append(", isDouble=").append(isDouble);
+ sb.append(", isDecimal=").append(isDecimal);
sb.append(", isByteArray=").append(isByteArray);
sb.append(", isBinary=").append(isBinary);
sb.append(", isBoolean=").append(isBoolean);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
index efabd68731..e3fdf70d8c 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
@@ -124,6 +124,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
public boolean isNumber;
public boolean isFloat;
public boolean isDouble;
+ public boolean isDecimal;
public boolean isByteArray;
public boolean isBinary;
public boolean isFile;
@@ -702,6 +703,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", isNumber=").append(isNumber);
sb.append(", isFloat=").append(isFloat);
sb.append(", isDouble=").append(isDouble);
+ sb.append(", isDecimal=").append(isDecimal);
sb.append(", isByteArray=").append(isByteArray);
sb.append(", isBinary=").append(isBinary);
sb.append(", isFile=").append(isFile);
@@ -770,6 +772,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
isNumber == that.isNumber &&
isFloat == that.isFloat &&
isDouble == that.isDouble &&
+ isDecimal == that.isDecimal &&
isByteArray == that.isByteArray &&
isBinary == that.isBinary &&
isFile == that.isFile &&
@@ -845,7 +848,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
maxLength, minLength, pattern, example, jsonSchema, minimum, maximum,
exclusiveMinimum, exclusiveMaximum, hasMore, required, deprecated, secondaryParam,
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,
isArray, isMap, isEnum, isReadOnly, isWriteOnly, isNullable,
isSelfReference, isCircularReference, isDiscriminator, _enum, allowableValues,
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
index b0e79592c0..e43a02be6b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
@@ -41,6 +41,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
public boolean isNumber;
public boolean isFloat;
public boolean isDouble;
+ public boolean isDecimal;
public boolean isByteArray;
public boolean isBoolean;
public boolean isDate;
@@ -79,7 +80,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
@Override
public int hashCode() {
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,
isMap, isArray, isBinary, isFile, schema, jsonSchema, vendorExtensions, items, additionalProperties,
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
@@ -100,6 +101,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
isNumber == that.isNumber &&
isFloat == that.isFloat &&
isDouble == that.isDouble &&
+ isDecimal == that.isDecimal &&
isByteArray == that.isByteArray &&
isBoolean == that.isBoolean &&
isDate == that.isDate &&
@@ -351,6 +353,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
sb.append(", isNumber=").append(isNumber);
sb.append(", isFloat=").append(isFloat);
sb.append(", isDouble=").append(isDouble);
+ sb.append(", isDecimal=").append(isDecimal);
sb.append(", isByteArray=").append(isByteArray);
sb.append(", isBoolean=").append(isBoolean);
sb.append(", isDate=").append(isDate);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index 45e88b15fb..b7df014de2 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -1451,12 +1451,13 @@ public class DefaultCodegen implements CodegenConfig {
typeMapping.put("string", "String");
typeMapping.put("int", "Integer");
typeMapping.put("float", "Float");
+ typeMapping.put("double", "Double");
typeMapping.put("number", "BigDecimal");
+ typeMapping.put("decimal", "BigDecimal");
typeMapping.put("DateTime", "Date");
typeMapping.put("long", "Long");
typeMapping.put("short", "Short");
typeMapping.put("char", "String");
- typeMapping.put("double", "Double");
typeMapping.put("object", "Object");
typeMapping.put("integer", "Integer");
typeMapping.put("ByteArray", "byte[]");
@@ -1464,7 +1465,6 @@ public class DefaultCodegen implements CodegenConfig {
typeMapping.put("file", "File");
typeMapping.put("UUID", "UUID");
typeMapping.put("URI", "URI");
- typeMapping.put("BigDecimal", "BigDecimal");
typeMapping.put("AnyType", "oas_any_type_not_mapped");
instantiationTypes = new HashMap();
@@ -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,
// though this tooling supports it.
return "null";
- } else if (ModelUtils.isStringSchema(schema) && "number".equals(schema.getFormat())) {
+ } else if (ModelUtils.isDecimalSchema(schema)) {
// special handle of type: string, format: number
- return "BigDecimal";
+ return "decimal";
} else if (ModelUtils.isByteArraySchema(schema)) {
return "ByteArray";
} else if (ModelUtils.isFileSchema(schema)) {
@@ -3156,7 +3156,29 @@ public class DefaultCodegen implements CodegenConfig {
} else if (ModelUtils.isDateTimeSchema(p)) { // date-time format
property.isString = false; // for backward compatibility with 2.x
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)) {
if (ModelUtils.isByteArraySchema(p)) {
property.isByteArray = true;
@@ -4065,6 +4087,9 @@ public class DefaultCodegen implements CodegenConfig {
} else if (Boolean.TRUE.equals(cp.isFloat)) {
r.isFloat = true;
r.isNumeric = true;
+ } else if (Boolean.TRUE.equals(cp.isDecimal)) {
+ r.isDecimal = true;
+ r.isNumeric = true;
} else if (Boolean.TRUE.equals(cp.isBinary)) {
r.isFile = true; // file = binary in OAS3
r.isBinary = true;
@@ -5406,6 +5431,9 @@ public class DefaultCodegen implements CodegenConfig {
} else if (Boolean.TRUE.equals(property.isFloat)) {
parameter.isFloat = true;
parameter.isPrimitiveType = true;
+ } else if (Boolean.TRUE.equals(property.isDecimal)) {
+ parameter.isDecimal = true;
+ parameter.isPrimitiveType = true;
} else if (Boolean.TRUE.equals(property.isNumber)) {
parameter.isNumber = true;
parameter.isPrimitiveType = true;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index a12409e15e..7f164bc961 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -160,6 +160,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"DateTimeOffset",
"Boolean",
"Double",
+ "Decimal",
"Int32",
"Int64",
"Float",
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index 6636de057d..694f53281e 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
@@ -107,7 +107,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
typeMapping.put("number", "float32");
typeMapping.put("float", "float32");
typeMapping.put("double", "float64");
- typeMapping.put("BigDecimal", "float64");
+ typeMapping.put("decimal", "float64");
typeMapping.put("boolean", "bool");
typeMapping.put("string", "string");
typeMapping.put("UUID", "string");
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
index 2ebc0fc251..8d42e1c8c7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java
@@ -1078,7 +1078,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
@Override
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
if (serializeBigDecimalAsString) {
- if (property.baseType.equals("BigDecimal")) {
+ if ("decimal".equals(property.baseType)) {
// we serialize BigDecimal as `string` to avoid precision loss
property.vendorExtensions.put("x-extra-annotation", "@JsonSerialize(using = ToStringSerializer.class)");
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
index 3fc32ec10f..33ac8a95bb 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java
@@ -152,6 +152,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
typeMapping.put("double", "kotlin.Double");
typeMapping.put("ByteArray", "kotlin.ByteArray");
typeMapping.put("number", "java.math.BigDecimal");
+ typeMapping.put("decimal", "java.math.BigDecimal");
typeMapping.put("date-time", "java.time.LocalDateTime");
typeMapping.put("date", "java.time.LocalDate");
typeMapping.put("file", "java.io.File");
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
index b56dce759e..f64d2d99d3 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
@@ -344,7 +344,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
}
if (schema.getEnum() != null && !schema.getEnum().isEmpty()) {
- // Enum case:
+ // Enum case:
example = schema.getEnum().get(0).toString();
/* if (ModelUtils.isStringSchema(schema)) {
example = "'" + escapeText(example) + "'";
@@ -354,7 +354,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
return example;
} else if (null != schema.get$ref()) {
- // $ref case:
+ // $ref case:
Map allDefinitions = ModelUtils.getSchemas(this.openAPI);
String ref = ModelUtils.getSimpleRef(schema.get$ref());
if (allDefinitions != null) {
@@ -384,14 +384,20 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
} else if (ModelUtils.isByteArraySchema(schema)) {
example = "YQ==";
} else if (ModelUtils.isStringSchema(schema)) {
- // a BigDecimal:
- if ("Number".equalsIgnoreCase(schema.getFormat())) {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
+ // decimal (type: string, format: decimal)
+ if ("number".equalsIgnoreCase(schema.getFormat())) {
+ 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;
- if (null != schema.getMinLength()) len = schema.getMinLength().intValue();
- if (len < 1) len = 1;
+ if (null != schema.getMinLength())
+ len = schema.getMinLength().intValue();
+ if (len < 1)
+ len = 1;
example = "";
- for (int i=0;i>")
.addProperties("map", new MapSchema()
- .additionalProperties(new ArraySchema().items(new NumberSchema())));
+ .additionalProperties(new ArraySchema().items(decimal)));
OpenAPI openAPI1 = TestUtils.createOpenAPIWithOneSchema("sample", schema1);
JavaClientCodegen codegen1 = new JavaClientCodegen();
codegen1.setOpenAPI(openAPI1);
@@ -741,7 +744,7 @@ public class JavaModelTest {
.description("model with Map>>")
.addProperties("map", new MapSchema()
.additionalProperties(new MapSchema()
- .additionalProperties(new ArraySchema().items(new NumberSchema()))));
+ .additionalProperties(new ArraySchema().items(decimal))));
OpenAPI openAPI2 = TestUtils.createOpenAPIWithOneSchema("sample", schema2);
JavaClientCodegen codegen2 = new JavaClientCodegen();
codegen2.setOpenAPI(openAPI2);
diff --git a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index 1c6d933115..75479284fb 100644
--- a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -1472,6 +1472,9 @@ components:
format: double
maximum: 123.4
minimum: 67.8
+ decimal:
+ type: string
+ format: number
string:
type: string
pattern: '/[a-z]/i'
diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
index a8449a1cba..f46a2427dd 100644
--- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
@@ -1437,6 +1437,9 @@ components:
format: double
maximum: 123.4
minimum: 67.8
+ decimal:
+ type: string
+ format: number
string:
type: string
pattern: '/[a-z]/i'
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FormatTest.md
index e996de5ab6..3efa07e3b4 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FormatTest.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FormatTest.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**Number** | **decimal** | |
**Float** | **float** | | [optional]
**Double** | **double** | | [optional]
+**Decimal** | **decimal** | | [optional]
**String** | **string** | | [optional]
**Byte** | **byte[]** | |
**Binary** | **System.IO.Stream** | | [optional]
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs
index 289ad6be3e..3ff064d7e8 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -49,6 +49,7 @@ namespace Org.OpenAPITools.Model
/// number (required).
/// _float.
/// _double.
+ /// _decimal.
/// _string.
/// _byte (required).
/// binary.
@@ -58,7 +59,7 @@ namespace Org.OpenAPITools.Model
/// password (required).
/// A string that is a 10 digit number. Can have leading zeros..
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..
- 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;
// to ensure "_byte" is required (not null)
@@ -71,6 +72,7 @@ namespace Org.OpenAPITools.Model
this.Int64 = int64;
this.Float = _float;
this.Double = _double;
+ this.Decimal = _decimal;
this.String = _string;
this.Binary = binary;
this.DateTime = dateTime;
@@ -116,6 +118,12 @@ namespace Org.OpenAPITools.Model
[DataMember(Name = "double", EmitDefaultValue = false)]
public double Double { get; set; }
+ ///
+ /// Gets or Sets Decimal
+ ///
+ [DataMember(Name = "decimal", EmitDefaultValue = false)]
+ public decimal Decimal { get; set; }
+
///
/// Gets or Sets String
///
@@ -193,6 +201,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Float: ").Append(Float).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(" Byte: ").Append(Byte).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.Float.GetHashCode();
hashCode = hashCode * 59 + this.Double.GetHashCode();
+ hashCode = hashCode * 59 + this.Decimal.GetHashCode();
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
if (this.Byte != null)
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FormatTest.md
index e996de5ab6..3efa07e3b4 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FormatTest.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FormatTest.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**Number** | **decimal** | |
**Float** | **float** | | [optional]
**Double** | **double** | | [optional]
+**Decimal** | **decimal** | | [optional]
**String** | **string** | | [optional]
**Byte** | **byte[]** | |
**Binary** | **System.IO.Stream** | | [optional]
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
index 289ad6be3e..3ff064d7e8 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -49,6 +49,7 @@ namespace Org.OpenAPITools.Model
/// number (required).
/// _float.
/// _double.
+ /// _decimal.
/// _string.
/// _byte (required).
/// binary.
@@ -58,7 +59,7 @@ namespace Org.OpenAPITools.Model
/// password (required).
/// A string that is a 10 digit number. Can have leading zeros..
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..
- 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;
// to ensure "_byte" is required (not null)
@@ -71,6 +72,7 @@ namespace Org.OpenAPITools.Model
this.Int64 = int64;
this.Float = _float;
this.Double = _double;
+ this.Decimal = _decimal;
this.String = _string;
this.Binary = binary;
this.DateTime = dateTime;
@@ -116,6 +118,12 @@ namespace Org.OpenAPITools.Model
[DataMember(Name = "double", EmitDefaultValue = false)]
public double Double { get; set; }
+ ///
+ /// Gets or Sets Decimal
+ ///
+ [DataMember(Name = "decimal", EmitDefaultValue = false)]
+ public decimal Decimal { get; set; }
+
///
/// Gets or Sets String
///
@@ -193,6 +201,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Float: ").Append(Float).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(" Byte: ").Append(Byte).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.Float.GetHashCode();
hashCode = hashCode * 59 + this.Double.GetHashCode();
+ hashCode = hashCode * 59 + this.Decimal.GetHashCode();
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
if (this.Byte != null)
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FormatTest.md
index e996de5ab6..3efa07e3b4 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FormatTest.md
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FormatTest.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**Number** | **decimal** | |
**Float** | **float** | | [optional]
**Double** | **double** | | [optional]
+**Decimal** | **decimal** | | [optional]
**String** | **string** | | [optional]
**Byte** | **byte[]** | |
**Binary** | **System.IO.Stream** | | [optional]
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs
index 4c438bce0c..e60cf79c2c 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -46,6 +46,7 @@ namespace Org.OpenAPITools.Model
/// number (required).
/// _float.
/// _double.
+ /// _decimal.
/// _string.
/// _byte (required).
/// binary.
@@ -55,7 +56,7 @@ namespace Org.OpenAPITools.Model
/// password (required).
/// A string that is a 10 digit number. Can have leading zeros..
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..
- 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;
// to ensure "_byte" is required (not null)
@@ -68,6 +69,7 @@ namespace Org.OpenAPITools.Model
this.Int64 = int64;
this.Float = _float;
this.Double = _double;
+ this.Decimal = _decimal;
this.String = _string;
this.Binary = binary;
this.DateTime = dateTime;
@@ -112,6 +114,12 @@ namespace Org.OpenAPITools.Model
[DataMember(Name = "double", EmitDefaultValue = false)]
public double Double { get; set; }
+ ///
+ /// Gets or Sets Decimal
+ ///
+ [DataMember(Name = "decimal", EmitDefaultValue = false)]
+ public decimal Decimal { get; set; }
+
///
/// Gets or Sets String
///
@@ -183,6 +191,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Float: ").Append(Float).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(" Byte: ").Append(Byte).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.Float.GetHashCode();
hashCode = hashCode * 59 + this.Double.GetHashCode();
+ hashCode = hashCode * 59 + this.Decimal.GetHashCode();
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
if (this.Byte != null)
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md
index 6cef48d5b4..dd7d68501c 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
**Number** | **decimal** | |
**Float** | **float** | | [optional]
**Double** | **double** | | [optional]
+**Decimal** | **decimal** | | [optional]
**String** | **string** | | [optional]
**Byte** | **byte[]** | |
**Binary** | **System.IO.Stream** | | [optional]
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
index 202bd2d471..db1b061009 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -44,6 +44,7 @@ namespace Org.OpenAPITools.Model
/// number (required).
/// _float.
/// _double.
+ /// _decimal.
/// _string.
/// _byte (required).
/// binary.
@@ -53,7 +54,7 @@ namespace Org.OpenAPITools.Model
/// password (required).
/// A string that is a 10 digit number. Can have leading zeros..
/// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01..
- 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)
if (number == null)
@@ -100,6 +101,7 @@ namespace Org.OpenAPITools.Model
this.Int64 = int64;
this.Float = _float;
this.Double = _double;
+ this.Decimal = _decimal;
this.String = _string;
this.Binary = binary;
this.DateTime = dateTime;
@@ -144,6 +146,12 @@ namespace Org.OpenAPITools.Model
[DataMember(Name="double", EmitDefaultValue=false)]
public double Double { get; set; }
+ ///
+ /// Gets or Sets Decimal
+ ///
+ [DataMember(Name="decimal", EmitDefaultValue=false)]
+ public decimal Decimal { get; set; }
+
///
/// Gets or Sets String
///
@@ -215,6 +223,7 @@ namespace Org.OpenAPITools.Model
sb.Append(" Number: ").Append(Number).Append("\n");
sb.Append(" Float: ").Append(Float).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(" Byte: ").Append(Byte).Append("\n");
sb.Append(" Binary: ").Append(Binary).Append("\n");
@@ -288,6 +297,11 @@ namespace Org.OpenAPITools.Model
(this.Double != null &&
this.Double.Equals(input.Double))
) &&
+ (
+ this.Decimal == input.Decimal ||
+ (this.Decimal != null &&
+ this.Decimal.Equals(input.Decimal))
+ ) &&
(
this.String == input.String ||
(this.String != null &&
@@ -356,6 +370,8 @@ namespace Org.OpenAPITools.Model
hashCode = hashCode * 59 + this.Float.GetHashCode();
if (this.Double != null)
hashCode = hashCode * 59 + this.Double.GetHashCode();
+ if (this.Decimal != null)
+ hashCode = hashCode * 59 + this.Decimal.GetHashCode();
if (this.String != null)
hashCode = hashCode * 59 + this.String.GetHashCode();
if (this.Byte != null)
diff --git a/samples/client/petstore/javascript-es6/docs/FormatTest.md b/samples/client/petstore/javascript-es6/docs/FormatTest.md
index 83d751d4cd..b6424d6230 100644
--- a/samples/client/petstore/javascript-es6/docs/FormatTest.md
+++ b/samples/client/petstore/javascript-es6/docs/FormatTest.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**_number** | **Number** | |
**_float** | **Number** | | [optional]
**_double** | **Number** | | [optional]
+**decimal** | **Number** | | [optional]
**_string** | **String** | | [optional]
**_byte** | **Blob** | |
**binary** | **File** | | [optional]
diff --git a/samples/client/petstore/javascript-es6/src/model/FormatTest.js b/samples/client/petstore/javascript-es6/src/model/FormatTest.js
index 0c5fccb907..7d1944dd9c 100644
--- a/samples/client/petstore/javascript-es6/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript-es6/src/model/FormatTest.js
@@ -73,6 +73,9 @@ class FormatTest {
if (data.hasOwnProperty('double')) {
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
}
+ if (data.hasOwnProperty('decimal')) {
+ obj['decimal'] = ApiClient.convertToType(data['decimal'], 'Number');
+ }
if (data.hasOwnProperty('string')) {
obj['string'] = ApiClient.convertToType(data['string'], 'String');
}
@@ -137,6 +140,11 @@ FormatTest.prototype['float'] = undefined;
*/
FormatTest.prototype['double'] = undefined;
+/**
+ * @member {Number} decimal
+ */
+FormatTest.prototype['decimal'] = undefined;
+
/**
* @member {String} string
*/
diff --git a/samples/client/petstore/javascript-promise-es6/docs/FormatTest.md b/samples/client/petstore/javascript-promise-es6/docs/FormatTest.md
index 83d751d4cd..b6424d6230 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/FormatTest.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/FormatTest.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**_number** | **Number** | |
**_float** | **Number** | | [optional]
**_double** | **Number** | | [optional]
+**decimal** | **Number** | | [optional]
**_string** | **String** | | [optional]
**_byte** | **Blob** | |
**binary** | **File** | | [optional]
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/FormatTest.js b/samples/client/petstore/javascript-promise-es6/src/model/FormatTest.js
index 0c5fccb907..7d1944dd9c 100644
--- a/samples/client/petstore/javascript-promise-es6/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript-promise-es6/src/model/FormatTest.js
@@ -73,6 +73,9 @@ class FormatTest {
if (data.hasOwnProperty('double')) {
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
}
+ if (data.hasOwnProperty('decimal')) {
+ obj['decimal'] = ApiClient.convertToType(data['decimal'], 'Number');
+ }
if (data.hasOwnProperty('string')) {
obj['string'] = ApiClient.convertToType(data['string'], 'String');
}
@@ -137,6 +140,11 @@ FormatTest.prototype['float'] = undefined;
*/
FormatTest.prototype['double'] = undefined;
+/**
+ * @member {Number} decimal
+ */
+FormatTest.prototype['decimal'] = undefined;
+
/**
* @member {String} string
*/
diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md
index 7cfabebb28..886a93b4fe 100644
--- a/samples/client/petstore/perl/docs/FormatTest.md
+++ b/samples/client/petstore/perl/docs/FormatTest.md
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
**number** | **double** | |
**float** | **double** | | [optional]
**double** | **double** | | [optional]
+**decimal** | [**Decimal**](Decimal.md) | | [optional]
**string** | **string** | | [optional]
**byte** | **string** | |
**binary** | **string** | | [optional]
diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm
index b3c1defbd7..de296cf393 100644
--- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm
+++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm
@@ -30,6 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
+use WWW::OpenAPIClient::Object::Decimal;
use base ("Class::Accessor", "Class::Data::Inheritable");
@@ -203,6 +204,13 @@ __PACKAGE__->method_documentation({
format => '',
read_only => '',
},
+ 'decimal' => {
+ datatype => 'Decimal',
+ base_name => 'decimal',
+ description => '',
+ format => '',
+ read_only => '',
+ },
'string' => {
datatype => 'string',
base_name => 'string',
@@ -275,6 +283,7 @@ __PACKAGE__->openapi_types( {
'number' => 'double',
'float' => 'double',
'double' => 'double',
+ 'decimal' => 'Decimal',
'string' => 'string',
'byte' => 'string',
'binary' => 'string',
@@ -293,6 +302,7 @@ __PACKAGE__->attribute_map( {
'number' => 'number',
'float' => 'float',
'double' => 'double',
+ 'decimal' => 'decimal',
'string' => 'string',
'byte' => 'byte',
'binary' => 'binary',
diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md
index c6be0ac729..28f426d0cf 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md
+++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/FormatTest.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**number** | **float** | |
**float** | **float** | | [optional]
**double** | **double** | | [optional]
+**decimal** | [**Decimal**](Decimal.md) | | [optional]
**string** | **string** | | [optional]
**byte** | **string** | |
**binary** | [**\SplFileObject**](\SplFileObject.md) | | [optional]
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
index 124db285c2..9fa4bc9748 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
@@ -66,6 +66,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
'number' => 'float',
'float' => 'float',
'double' => 'double',
+ 'decimal' => 'Decimal',
'string' => 'string',
'byte' => 'string',
'binary' => '\SplFileObject',
@@ -91,6 +92,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
'number' => null,
'float' => 'float',
'double' => 'double',
+ 'decimal' => 'number',
'string' => null,
'byte' => 'byte',
'binary' => 'binary',
@@ -135,6 +137,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
'number' => 'number',
'float' => 'float',
'double' => 'double',
+ 'decimal' => 'decimal',
'string' => 'string',
'byte' => 'byte',
'binary' => 'binary',
@@ -158,6 +161,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
'number' => 'setNumber',
'float' => 'setFloat',
'double' => 'setDouble',
+ 'decimal' => 'setDecimal',
'string' => 'setString',
'byte' => 'setByte',
'binary' => 'setBinary',
@@ -181,6 +185,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
'number' => 'getNumber',
'float' => 'getFloat',
'double' => 'getDouble',
+ 'decimal' => 'getDecimal',
'string' => 'getString',
'byte' => 'getByte',
'binary' => 'getBinary',
@@ -258,6 +263,7 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
$this->container['number'] = $data['number'] ?? null;
$this->container['float'] = $data['float'] ?? null;
$this->container['double'] = $data['double'] ?? null;
+ $this->container['decimal'] = $data['decimal'] ?? null;
$this->container['string'] = $data['string'] ?? null;
$this->container['byte'] = $data['byte'] ?? null;
$this->container['binary'] = $data['binary'] ?? null;
@@ -549,6 +555,30 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable
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
*
diff --git a/samples/client/petstore/python-asyncio/docs/FormatTest.md b/samples/client/petstore/python-asyncio/docs/FormatTest.md
index 4c15cd852f..f0942f5248 100644
--- a/samples/client/petstore/python-asyncio/docs/FormatTest.md
+++ b/samples/client/petstore/python-asyncio/docs/FormatTest.md
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
**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)
diff --git a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py
index c96f8132fa..4a1d16bb15 100644
--- a/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python-asyncio/petstore_api/models/format_test.py
@@ -46,7 +46,7 @@ class FormatTest(object):
'date_time': 'datetime',
'uuid': 'str',
'password': 'str',
- 'big_decimal': 'BigDecimal'
+ 'big_decimal': 'Decimal'
}
attribute_map = {
@@ -442,7 +442,7 @@ class FormatTest(object):
:return: The big_decimal of this FormatTest. # noqa: E501
- :rtype: BigDecimal
+ :rtype: Decimal
"""
return self._big_decimal
@@ -452,7 +452,7 @@ class FormatTest(object):
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
- :type big_decimal: BigDecimal
+ :type big_decimal: Decimal
"""
self._big_decimal = big_decimal
diff --git a/samples/client/petstore/python-tornado/docs/FormatTest.md b/samples/client/petstore/python-tornado/docs/FormatTest.md
index 4c15cd852f..f0942f5248 100644
--- a/samples/client/petstore/python-tornado/docs/FormatTest.md
+++ b/samples/client/petstore/python-tornado/docs/FormatTest.md
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
**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)
diff --git a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
index c96f8132fa..4a1d16bb15 100644
--- a/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python-tornado/petstore_api/models/format_test.py
@@ -46,7 +46,7 @@ class FormatTest(object):
'date_time': 'datetime',
'uuid': 'str',
'password': 'str',
- 'big_decimal': 'BigDecimal'
+ 'big_decimal': 'Decimal'
}
attribute_map = {
@@ -442,7 +442,7 @@ class FormatTest(object):
:return: The big_decimal of this FormatTest. # noqa: E501
- :rtype: BigDecimal
+ :rtype: Decimal
"""
return self._big_decimal
@@ -452,7 +452,7 @@ class FormatTest(object):
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
- :type big_decimal: BigDecimal
+ :type big_decimal: Decimal
"""
self._big_decimal = big_decimal
diff --git a/samples/client/petstore/python/docs/FormatTest.md b/samples/client/petstore/python/docs/FormatTest.md
index 4c15cd852f..f0942f5248 100644
--- a/samples/client/petstore/python/docs/FormatTest.md
+++ b/samples/client/petstore/python/docs/FormatTest.md
@@ -16,7 +16,7 @@ Name | Type | Description | Notes
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
**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)
diff --git a/samples/client/petstore/python/petstore_api/models/format_test.py b/samples/client/petstore/python/petstore_api/models/format_test.py
index c96f8132fa..4a1d16bb15 100644
--- a/samples/client/petstore/python/petstore_api/models/format_test.py
+++ b/samples/client/petstore/python/petstore_api/models/format_test.py
@@ -46,7 +46,7 @@ class FormatTest(object):
'date_time': 'datetime',
'uuid': 'str',
'password': 'str',
- 'big_decimal': 'BigDecimal'
+ 'big_decimal': 'Decimal'
}
attribute_map = {
@@ -442,7 +442,7 @@ class FormatTest(object):
:return: The big_decimal of this FormatTest. # noqa: E501
- :rtype: BigDecimal
+ :rtype: Decimal
"""
return self._big_decimal
@@ -452,7 +452,7 @@ class FormatTest(object):
:param big_decimal: The big_decimal of this FormatTest. # noqa: E501
- :type big_decimal: BigDecimal
+ :type big_decimal: Decimal
"""
self._big_decimal = big_decimal
diff --git a/samples/client/petstore/ruby-faraday/docs/FormatTest.md b/samples/client/petstore/ruby-faraday/docs/FormatTest.md
index 9368aa50ff..85558a2cc0 100644
--- a/samples/client/petstore/ruby-faraday/docs/FormatTest.md
+++ b/samples/client/petstore/ruby-faraday/docs/FormatTest.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**number** | **Float** | |
**float** | **Float** | | [optional]
**double** | **Float** | | [optional]
+**decimal** | [**Decimal**](Decimal.md) | | [optional]
**string** | **String** | | [optional]
**byte** | **String** | |
**binary** | **File** | | [optional]
@@ -31,6 +32,7 @@ instance = Petstore::FormatTest.new(integer: null,
number: null,
float: null,
double: null,
+ decimal: null,
string: null,
byte: null,
binary: null,
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
index 18b8e54fbb..34a2fd575d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
@@ -27,6 +27,8 @@ module Petstore
attr_accessor :double
+ attr_accessor :decimal
+
attr_accessor :string
attr_accessor :byte
@@ -56,6 +58,7 @@ module Petstore
:'number' => :'number',
:'float' => :'float',
:'double' => :'double',
+ :'decimal' => :'decimal',
:'string' => :'string',
:'byte' => :'byte',
:'binary' => :'binary',
@@ -77,6 +80,7 @@ module Petstore
:'number' => :'Float',
:'float' => :'Float',
:'double' => :'Float',
+ :'decimal' => :'Decimal',
:'string' => :'String',
:'byte' => :'String',
:'binary' => :'File',
@@ -134,6 +138,10 @@ module Petstore
self.double = attributes[:'double']
end
+ if attributes.key?(:'decimal')
+ self.decimal = attributes[:'decimal']
+ end
+
if attributes.key?(:'string')
self.string = attributes[:'string']
end
@@ -418,6 +426,7 @@ module Petstore
number == o.number &&
float == o.float &&
double == o.double &&
+ decimal == o.decimal &&
string == o.string &&
byte == o.byte &&
binary == o.binary &&
@@ -438,7 +447,7 @@ module Petstore
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
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
# Builds the object from hash
diff --git a/samples/client/petstore/ruby/docs/FormatTest.md b/samples/client/petstore/ruby/docs/FormatTest.md
index 9368aa50ff..85558a2cc0 100644
--- a/samples/client/petstore/ruby/docs/FormatTest.md
+++ b/samples/client/petstore/ruby/docs/FormatTest.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**number** | **Float** | |
**float** | **Float** | | [optional]
**double** | **Float** | | [optional]
+**decimal** | [**Decimal**](Decimal.md) | | [optional]
**string** | **String** | | [optional]
**byte** | **String** | |
**binary** | **File** | | [optional]
@@ -31,6 +32,7 @@ instance = Petstore::FormatTest.new(integer: null,
number: null,
float: null,
double: null,
+ decimal: null,
string: null,
byte: null,
binary: null,
diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
index 18b8e54fbb..34a2fd575d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
@@ -27,6 +27,8 @@ module Petstore
attr_accessor :double
+ attr_accessor :decimal
+
attr_accessor :string
attr_accessor :byte
@@ -56,6 +58,7 @@ module Petstore
:'number' => :'number',
:'float' => :'float',
:'double' => :'double',
+ :'decimal' => :'decimal',
:'string' => :'string',
:'byte' => :'byte',
:'binary' => :'binary',
@@ -77,6 +80,7 @@ module Petstore
:'number' => :'Float',
:'float' => :'Float',
:'double' => :'Float',
+ :'decimal' => :'Decimal',
:'string' => :'String',
:'byte' => :'String',
:'binary' => :'File',
@@ -134,6 +138,10 @@ module Petstore
self.double = attributes[:'double']
end
+ if attributes.key?(:'decimal')
+ self.decimal = attributes[:'decimal']
+ end
+
if attributes.key?(:'string')
self.string = attributes[:'string']
end
@@ -418,6 +426,7 @@ module Petstore
number == o.number &&
float == o.float &&
double == o.double &&
+ decimal == o.decimal &&
string == o.string &&
byte == o.byte &&
binary == o.binary &&
@@ -438,7 +447,7 @@ module Petstore
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
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
# Builds the object from hash
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml
index b95a10933d..4e4b9f4002 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml
+++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml
@@ -1611,6 +1611,9 @@ components:
maximum: 123.4
minimum: 67.8
type: number
+ decimal:
+ format: number
+ type: string
string:
pattern: /[a-z]/i
type: string
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md
index 742bccb77e..c5597abc4e 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FormatTest.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**number** | [**BigDecimal**](BigDecimal.md) | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
+**decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
**binary** | [**File**](File.md) | | [optional]
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java
index 370a7c8d96..ef56e32cd5 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -43,6 +43,7 @@ import org.openapitools.client.JSON;
FormatTest.JSON_PROPERTY_NUMBER,
FormatTest.JSON_PROPERTY_FLOAT,
FormatTest.JSON_PROPERTY_DOUBLE,
+ FormatTest.JSON_PROPERTY_DECIMAL,
FormatTest.JSON_PROPERTY_STRING,
FormatTest.JSON_PROPERTY_BYTE,
FormatTest.JSON_PROPERTY_BINARY,
@@ -73,6 +74,9 @@ public class FormatTest {
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
+ public static final String JSON_PROPERTY_DECIMAL = "decimal";
+ private BigDecimal decimal;
+
public static final String JSON_PROPERTY_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) {
this.string = string;
return this;
@@ -485,6 +513,7 @@ public class FormatTest {
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
+ Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
@@ -498,7 +527,7 @@ public class FormatTest {
@Override
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(" _float: ").append(toIndentedString(_float)).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(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
diff --git a/samples/openapi3/client/petstore/java/native/api/openapi.yaml b/samples/openapi3/client/petstore/java/native/api/openapi.yaml
index b95a10933d..4e4b9f4002 100644
--- a/samples/openapi3/client/petstore/java/native/api/openapi.yaml
+++ b/samples/openapi3/client/petstore/java/native/api/openapi.yaml
@@ -1611,6 +1611,9 @@ components:
maximum: 123.4
minimum: 67.8
type: number
+ decimal:
+ format: number
+ type: string
string:
pattern: /[a-z]/i
type: string
diff --git a/samples/openapi3/client/petstore/java/native/docs/FormatTest.md b/samples/openapi3/client/petstore/java/native/docs/FormatTest.md
index 742bccb77e..c5597abc4e 100644
--- a/samples/openapi3/client/petstore/java/native/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/java/native/docs/FormatTest.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**number** | [**BigDecimal**](BigDecimal.md) | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
+**decimal** | [**BigDecimal**](BigDecimal.md) | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | |
**binary** | [**File**](File.md) | | [optional]
diff --git a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java
index 20f2404f59..567a3e3926 100644
--- a/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java
+++ b/samples/openapi3/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java
@@ -43,6 +43,7 @@ import org.openapitools.client.JSON;
FormatTest.JSON_PROPERTY_NUMBER,
FormatTest.JSON_PROPERTY_FLOAT,
FormatTest.JSON_PROPERTY_DOUBLE,
+ FormatTest.JSON_PROPERTY_DECIMAL,
FormatTest.JSON_PROPERTY_STRING,
FormatTest.JSON_PROPERTY_BYTE,
FormatTest.JSON_PROPERTY_BINARY,
@@ -73,6 +74,9 @@ public class FormatTest {
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
+ public static final String JSON_PROPERTY_DECIMAL = "decimal";
+ private BigDecimal decimal;
+
public static final String JSON_PROPERTY_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) {
this.string = string;
return this;
@@ -485,6 +513,7 @@ public class FormatTest {
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
+ Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
@@ -498,7 +527,7 @@ public class FormatTest {
@Override
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
@@ -511,6 +540,7 @@ public class FormatTest {
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).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(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
diff --git a/samples/openapi3/client/petstore/python/docs/FormatTest.md b/samples/openapi3/client/petstore/python/docs/FormatTest.md
index d503d24bfa..919d954bf5 100644
--- a/samples/openapi3/client/petstore/python/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/python/docs/FormatTest.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**number** | **float** | |
**float** | **float** | | [optional]
**double** | **float** | | [optional]
+**decimal** | [**Decimal**](Decimal.md) | | [optional]
**string** | **str** | | [optional]
**byte** | **str** | |
**binary** | **file** | | [optional]
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py
index f6d90fb0d5..c1cc77d8d1 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/format_test.py
@@ -39,6 +39,7 @@ class FormatTest(object):
'number': 'float',
'float': 'float',
'double': 'float',
+ 'decimal': 'Decimal',
'string': 'str',
'byte': 'str',
'binary': 'file',
@@ -57,6 +58,7 @@ class FormatTest(object):
'number': 'number',
'float': 'float',
'double': 'double',
+ 'decimal': 'decimal',
'string': 'string',
'byte': 'byte',
'binary': 'binary',
@@ -68,7 +70,7 @@ class FormatTest(object):
'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
if local_vars_configuration is None:
local_vars_configuration = Configuration()
@@ -80,6 +82,7 @@ class FormatTest(object):
self._number = None
self._float = None
self._double = None
+ self._decimal = None
self._string = None
self._byte = None
self._binary = None
@@ -102,6 +105,8 @@ class FormatTest(object):
self.float = float
if double is not None:
self.double = double
+ if decimal is not None:
+ self.decimal = decimal
if string is not None:
self.string = string
self.byte = byte
@@ -276,6 +281,27 @@ class FormatTest(object):
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
def string(self):
"""Gets the string of this FormatTest. # noqa: E501
diff --git a/samples/schema/petstore/mysql/Model/FormatTest.sql b/samples/schema/petstore/mysql/Model/FormatTest.sql
index 205353c54a..0c7bf749cb 100644
--- a/samples/schema/petstore/mysql/Model/FormatTest.sql
+++ b/samples/schema/petstore/mysql/Model/FormatTest.sql
@@ -7,17 +7,17 @@
--
-- 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 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 `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`
diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql
index a0e04a9b01..f1f6f328a1 100644
--- a/samples/schema/petstore/mysql/mysql_schema.sql
+++ b/samples/schema/petstore/mysql/mysql_schema.sql
@@ -205,6 +205,7 @@ CREATE TABLE IF NOT EXISTS `format_test` (
`number` DECIMAL(20, 9) UNSIGNED NOT NULL,
`float` DECIMAL(20, 9) UNSIGNED DEFAULT NULL,
`double` DECIMAL(20, 9) UNSIGNED DEFAULT NULL,
+ `decimal` TEXT DEFAULT NULL,
`string` TEXT DEFAULT NULL,
`byte` MEDIUMBLOB NOT NULL,
`binary` MEDIUMBLOB DEFAULT NULL,
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java
index 3ad6009fc1..14144b58f3 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/FormatTest.java
@@ -61,6 +61,7 @@ public class FormatTest {
private String password;
@ApiModelProperty(value = "")
+ @Valid
private BigDecimal bigDecimal;
/**
* Get integer
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java
index c42455d38c..c3022356f9 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/FormatTest.java
@@ -386,7 +386,7 @@ public class FormatTest implements Serializable {
**/
@JsonProperty("BigDecimal")
@ApiModelProperty(value = "")
-
+ @Valid
public BigDecimal getBigDecimal() {
return bigDecimal;
}
diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java
index e675e81820..614b54e17a 100644
--- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/FormatTest.java
@@ -36,6 +36,7 @@ import javax.validation.Valid;
FormatTest.JSON_PROPERTY_NUMBER,
FormatTest.JSON_PROPERTY_FLOAT,
FormatTest.JSON_PROPERTY_DOUBLE,
+ FormatTest.JSON_PROPERTY_DECIMAL,
FormatTest.JSON_PROPERTY_STRING,
FormatTest.JSON_PROPERTY_BYTE,
FormatTest.JSON_PROPERTY_BINARY,
@@ -72,6 +73,10 @@ public class FormatTest {
@JsonProperty(JSON_PROPERTY_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";
@JsonProperty(JSON_PROPERTY_STRING)
private String string;
@@ -238,6 +243,26 @@ public class FormatTest {
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) {
this.string = string;
return this;
@@ -434,6 +459,7 @@ public class FormatTest {
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
+ Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
@@ -447,7 +473,7 @@ public class FormatTest {
@Override
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(" _float: ").append(toIndentedString(_float)).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(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/FormatTest.java
index e68bc3d154..9817e78712 100644
--- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/FormatTest.java
@@ -384,7 +384,7 @@ public class FormatTest {
**/
@JsonProperty("BigDecimal")
@ApiModelProperty(value = "")
-
+ @Valid
public BigDecimal getBigDecimal() {
return bigDecimal;
}
diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/FormatTest.java
index e68bc3d154..9817e78712 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/FormatTest.java
@@ -384,7 +384,7 @@ public class FormatTest {
**/
@JsonProperty("BigDecimal")
@ApiModelProperty(value = "")
-
+ @Valid
public BigDecimal getBigDecimal() {
return bigDecimal;
}
diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FormatTest.java
index e68bc3d154..9817e78712 100644
--- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/FormatTest.java
@@ -384,7 +384,7 @@ public class FormatTest {
**/
@JsonProperty("BigDecimal")
@ApiModelProperty(value = "")
-
+ @Valid
public BigDecimal getBigDecimal() {
return bigDecimal;
}
diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FormatTest.java
index e68bc3d154..9817e78712 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FormatTest.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/FormatTest.java
@@ -384,7 +384,7 @@ public class FormatTest {
**/
@JsonProperty("BigDecimal")
@ApiModelProperty(value = "")
-
+ @Valid
public BigDecimal getBigDecimal() {
return bigDecimal;
}
diff --git a/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php b/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php
index bd21dacc68..32e11e6c10 100644
--- a/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php
+++ b/samples/server/petstore/php-laravel/lib/app/Models/FormatTest.php
@@ -27,6 +27,9 @@ class FormatTest {
/** @var double $double */
private $double;
+ /** @var Decimal $decimal */
+ private $decimal;
+
/** @var string $string */
private $string;