NumericPropertyBuilder
Builder for NumericPropertyDefinition.
Configures numeric properties (integer or number type) with range constraints, multiple-of validation, and default values. Supports automatic type conversion for all numeric types (Int, Long, Double, Float, etc.).
This class is part of the JSON Schema DSL and cannot be instantiated directly. Use PropertyBuilder.integer or PropertyBuilder.number instead within the DSL context.
Integer Property
property("count") {
integer {
description = "Item count"
minimum = 0.0
default = 10
}
}Content copied to clipboard
Number Property with Constraints
property("score") {
number {
description = "User score"
minimum = 0.0
maximum = 100.0
multipleOf = 0.5
}
}Content copied to clipboard