skema

Num

@Serializable
@SerialName(value = "Number")
data class Num(val min: Double? = null, val max: Double? = null, val exclusiveMin: Double? = null, val exclusiveMax: Double? = null, val multipleOf: Double? = null) : JsonSpec(source)

Floating-point value, optionally bounded. Maps to {"type":"number"} plus minimum/maximum.

Constructors

Link copied to clipboard
constructor(min: Double? = null, max: Double? = null, exclusiveMin: Double? = null, exclusiveMax: Double? = null, multipleOf: Double? = null)

Properties

Link copied to clipboard

Exclusive upper bound, or null for unbounded.

Link copied to clipboard

Exclusive lower bound, or null for unbounded.

Link copied to clipboard
val max: Double?

Inclusive upper bound, or null for unbounded.

Link copied to clipboard
val min: Double?

Inclusive lower bound, or null for unbounded.

Link copied to clipboard

Value must be a multiple of this, or null for no constraint.

Functions

Link copied to clipboard
fun JsonSpec.toJsonSchema(): JsonObject

JSON Schema fragment describing the value this primitive validates.

Num

constructor(min: Double? = null, max: Double? = null, exclusiveMin: Double? = null, exclusiveMax: Double? = null, multipleOf: Double? = null)(source)

exclusiveMax

Exclusive upper bound, or null for unbounded.

exclusiveMin

Exclusive lower bound, or null for unbounded.

max

Inclusive upper bound, or null for unbounded.

min

Inclusive lower bound, or null for unbounded.

multipleOf

Value must be a multiple of this, or null for no constraint.