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

    Interface ConditionalField

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

    interface ConditionalField {
        editability: Editability;
        meta: SchemaMeta;
        isOptional?: boolean;
        isNullable?: boolean;
        defaultValue?: unknown;
        examples?: unknown[];
        type: "conditional";
        constraints: Record<string, never>;
        ifClause: WalkedField;
        thenClause?: WalkedField;
        elseClause?: WalkedField;
    }

    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: "conditional"
    constraints: Record<string, never>
    ifClause: WalkedField

    The if sub-schema.

    thenClause?: WalkedField

    The then sub-schema.

    elseClause?: WalkedField

    The else sub-schema.