skema

Array

@Serializable
@SerialName(value = "Array")
data class Array(val items: JsonSpec? = null, val prefixItems: List<JsonSpec>? = null, val minItems: Int? = null, val maxItems: Int? = null, val uniqueItems: Boolean? = null) : JsonSpec(source)

Array of values. items constrains every element; prefixItems constrains the first N positionally (tuple-style); set both for a tuple with a trailing homogeneous tail.

Constructors

Link copied to clipboard
constructor(items: JsonSpec? = null, prefixItems: List<JsonSpec>? = null, minItems: Int? = null, maxItems: Int? = null, uniqueItems: Boolean? = null)

Properties

Link copied to clipboard

Spec for every element, or null for unconstrained.

Link copied to clipboard

Maximum array length.

Link copied to clipboard

Minimum array length.

Link copied to clipboard

Positional specs for leading elements.

Link copied to clipboard

If true, elements must be unique.

Functions

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

JSON Schema fragment describing the value this primitive validates.

Array

constructor(items: JsonSpec? = null, prefixItems: List<JsonSpec>? = null, minItems: Int? = null, maxItems: Int? = null, uniqueItems: Boolean? = null)(source)

items

Spec for every element, or null for unconstrained.

maxItems

Maximum array length.

minItems

Minimum array length.

prefixItems

Positional specs for leading elements.

uniqueItems

If true, elements must be unique.