codebook_schema_helpers: Codebook schema helpers

codebook_schema_helpersR Documentation

Codebook schema helpers

Description

These light wrappers reuse foundryR's existing strict JSON Schema constructors while following the measurement-layer codebook vocabulary.

Usage

type_boolean(desc = NULL)

type_enum(desc = NULL, values)

type_number(desc = NULL)

type_string(desc = NULL)

Arguments

desc

Character. Optional field description.

values

Character vector of allowed values for type_enum().

Value

A JSON Schema fragment represented as an R list.

Examples

type_boolean("Whether AI could materially assist the task")
type_enum("Priority label", values = c("low", "medium", "high"))
type_number("Confidence score")
type_string("Short rationale")

foundryR documentation built on Sept. 25, 2026, 1:10 a.m.