skema

IfThenElse

@Serializable
@SerialName(value = "IfThenElse")
data class IfThenElse(val condition: JsonSpec, val then: JsonSpec? = null, val otherwise: JsonSpec? = null) : JsonSpec(source)

Conditional schema. If condition matches, then applies; otherwise otherwise applies. Either branch may be omitted.

Constructors

Link copied to clipboard
constructor(condition: JsonSpec, then: JsonSpec? = null, otherwise: JsonSpec? = null)

Properties

Link copied to clipboard

The condition spec.

Link copied to clipboard

Applied when condition does not match.

Link copied to clipboard

Applied when condition matches.

Functions

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

JSON Schema fragment describing the value this primitive validates.

IfThenElse

constructor(condition: JsonSpec, then: JsonSpec? = null, otherwise: JsonSpec? = null)(source)

condition

The condition spec.

otherwise

Applied when condition does not match.

then

Applied when condition matches.