schema-components - v3.7.0
    Preparing search index...

    Interface TupleField

    Properties common to every WalkedField variant. The type field acts as the discriminant for the tagged union.

    interface TupleField {
        editability: Editability;
        meta: SchemaMeta;
        isOptional?: boolean;
        isNullable?: boolean;
        defaultValue?: unknown;
        examples?: unknown[];
        type: "tuple";
        constraints: ArrayConstraints;
        prefixItems: WalkedField[];
        restItems?: WalkedField;
        contains?: WalkedField;
        unevaluatedItems?: WalkedField;
        unevaluatedItemsClosed?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    editability: Editability
    isOptional?: boolean

    Whether the field is optional (not in required).

    isNullable?: boolean

    Whether the field is nullable (anyOf [T, null] or type: ["...", "null"]).

    defaultValue?: unknown

    Default value from the schema's default keyword.

    examples?: unknown[]

    Example values from the schema's examples keyword.

    type: "tuple"
    constraints: ArrayConstraints
    prefixItems: WalkedField[]

    Positional element schemas from prefixItems.

    restItems?: WalkedField

    Schema for items beyond the prefixItems length. In Draft 2020-12, items adjacent to prefixItems describes the rest element. When absent, additional items are permitted but unconstrained.

    contains?: WalkedField

    Walked schema that at least one array item must match (contains keyword). Tuples may declare it alongside positional element schemas to require the presence of a specific element.

    unevaluatedItems?: WalkedField

    Walked schema for unevaluatedItems adjacent to prefixItems. Permits additional items only when they satisfy this schema.

    unevaluatedItemsClosed?: boolean

    Whether unevaluatedItems is explicitly false on a tuple. With prefixItems declared, this forbids any items beyond the prefix length.