Skip to main content

Interface: SchemaAdapter

Defined in: packages/core/src/field.types.ts:42

The contract for reading a schema's field structure — what defineCatalog resolves hint paths through, and what an editing surface reads a block's fields from.

Methods

describe()

describe(schema): FieldNode[]

Defined in: packages/core/src/field.types.ts:54

Describes every path a hint may target.

Parameters

schema

unknown

The schema to read. What counts as readable is the implementation's to decide; zodAdapter accepts anything exposing the Standard JSON Schema converter.

Returns

FieldNode[]

One FieldNode per addressable path, parent before child. The schema root itself has no path and no entry, so the result is exactly the set of paths a hint may name.

Throws

Implementation-defined. zodAdapter refuses a schema with no converter as no-json-schema; the converter itself throws on a type JSON Schema cannot represent.