Skip to content

@maxhealth.tech/prefab / auto / JsonSchemaNode

Interface: JsonSchemaNode ​

Defined in: auto/schema.ts:46

The JSON Schema keywords a form field can express, read structurally.

Deliberately not a full JSON Schema type: this reads schemas from anywhere (TypeBox, Zod, a hand-written spec, an OpenAPI document) and only the keywords below survive the crossing into a control.

Properties ​

type? ​

ts
optional type?: string | string[];

Defined in: auto/schema.ts:47


format? ​

ts
optional format?: string;

Defined in: auto/schema.ts:48


title? ​

ts
optional title?: string;

Defined in: auto/schema.ts:49


description? ​

ts
optional description?: string;

Defined in: auto/schema.ts:50


enum? ​

ts
optional enum?: unknown[];

Defined in: auto/schema.ts:51


const? ​

ts
optional const?: unknown;

Defined in: auto/schema.ts:52


default? ​

ts
optional default?: unknown;

Defined in: auto/schema.ts:53


properties? ​

ts
optional properties?: Record<string, JsonSchemaNode>;

Defined in: auto/schema.ts:54


required? ​

ts
optional required?: string[];

Defined in: auto/schema.ts:55


items? ​

ts
optional items?: JsonSchemaNode;

Defined in: auto/schema.ts:56


anyOf? ​

ts
optional anyOf?: JsonSchemaNode[];

Defined in: auto/schema.ts:57


oneOf? ​

ts
optional oneOf?: JsonSchemaNode[];

Defined in: auto/schema.ts:58


minimum? ​

ts
optional minimum?: number;

Defined in: auto/schema.ts:59


maximum? ​

ts
optional maximum?: number;

Defined in: auto/schema.ts:60


minLength? ​

ts
optional minLength?: number;

Defined in: auto/schema.ts:61


maxLength? ​

ts
optional maxLength?: number;

Defined in: auto/schema.ts:62


minItems? ​

ts
optional minItems?: number;

Defined in: auto/schema.ts:63


maxItems? ​

ts
optional maxItems?: number;

Defined in: auto/schema.ts:64


readOnly? ​

ts
optional readOnly?: boolean;

Defined in: auto/schema.ts:65

Released under the MIT License.