Skip to content

@maxhealth.tech/prefab / auto / JsonSchemaNode

Interface: JsonSchemaNode

Defined in: auto/schema.ts:45

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:46


format?

ts
optional format?: string;

Defined in: auto/schema.ts:47


title?

ts
optional title?: string;

Defined in: auto/schema.ts:48


description?

ts
optional description?: string;

Defined in: auto/schema.ts:49


enum?

ts
optional enum?: unknown[];

Defined in: auto/schema.ts:50


const?

ts
optional const?: unknown;

Defined in: auto/schema.ts:51


default?

ts
optional default?: unknown;

Defined in: auto/schema.ts:52


properties?

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

Defined in: auto/schema.ts:53


required?

ts
optional required?: string[];

Defined in: auto/schema.ts:54


items?

ts
optional items?: JsonSchemaNode;

Defined in: auto/schema.ts:55


anyOf?

ts
optional anyOf?: JsonSchemaNode[];

Defined in: auto/schema.ts:56


oneOf?

ts
optional oneOf?: JsonSchemaNode[];

Defined in: auto/schema.ts:57


minimum?

ts
optional minimum?: number;

Defined in: auto/schema.ts:58


maximum?

ts
optional maximum?: number;

Defined in: auto/schema.ts:59


minLength?

ts
optional minLength?: number;

Defined in: auto/schema.ts:60


maxLength?

ts
optional maxLength?: number;

Defined in: auto/schema.ts:61


minItems?

ts
optional minItems?: number;

Defined in: auto/schema.ts:62


maxItems?

ts
optional maxItems?: number;

Defined in: auto/schema.ts:63


readOnly?

ts
optional readOnly?: boolean;

Defined in: auto/schema.ts:64

Released under the MIT License.