Amazon Vinyl
    Preparing search index...

    Interface JsonSchema

    A JSON Schema definition (a draft-07 compatible subset) describing the shape a value must take.

    This is the serializable representation produced by toJsonSchema, suitable for handing to an LLM as the shape it must produce. It intentionally mirrors zod-to-json-schema output for the node types this library supports.

    interface JsonSchema {
        additionalItems?: boolean;
        additionalProperties?: boolean | JsonSchema;
        anyOf?: readonly JsonSchema[];
        description?: string;
        enum?: readonly unknown[];
        exclusiveMaximum?: number;
        exclusiveMinimum?: number;
        items?: JsonSchema | readonly JsonSchema[];
        maximum?: number;
        maxItems?: number;
        maxLength?: number;
        minimum?: number;
        minItems?: number;
        minLength?: number;
        pattern?: string;
        properties?: Readonly<Record<string, JsonSchema>>;
        required?: readonly string[];
        type?: JsonSchemaType | readonly JsonSchemaType[];
        uniqueItems?: boolean;
    }
    Index
    additionalItems?: boolean
    additionalProperties?: boolean | JsonSchema
    anyOf?: readonly JsonSchema[]
    description?: string

    A human-readable description, attached to a schema node via its describe method.

    enum?: readonly unknown[]
    exclusiveMaximum?: number
    exclusiveMinimum?: number
    items?: JsonSchema | readonly JsonSchema[]
    maximum?: number
    maxItems?: number
    maxLength?: number
    minimum?: number
    minItems?: number
    minLength?: number
    pattern?: string
    properties?: Readonly<Record<string, JsonSchema>>
    required?: readonly string[]
    type?: JsonSchemaType | readonly JsonSchemaType[]
    uniqueItems?: boolean