Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3002,7 +3002,9 @@ protected void updateModelForNumber(CodegenModel model, Schema schema) {
model.isNumeric = Boolean.TRUE;
if (ModelUtils.isFloatSchema(schema)) { // float
model.isFloat = Boolean.TRUE;
} else if (ModelUtils.isDoubleSchema(schema)) { // double
} else {
// Set isDouble for explicit "format: double" OR when no format is specified
// (since "type: number" without format defaults to Double in most languages)
model.isDouble = Boolean.TRUE;
}
}
Expand Down Expand Up @@ -3886,7 +3888,9 @@ protected void updatePropertyForNumber(CodegenProperty property, Schema p) {
property.isNumeric = Boolean.TRUE;
if (ModelUtils.isFloatSchema(p)) { // float
property.isFloat = Boolean.TRUE;
} else if (ModelUtils.isDoubleSchema(p)) { // double
} else {
// Set isDouble for explicit "format: double" OR when no format is specified
// (since "type: number" without format defaults to Double in most languages)
property.isDouble = Boolean.TRUE;
}
}
Expand Down