Slide 22
Slide 22 text
Creating Components
{
"type": "object",
"properties": {
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Wizard Step Title."
},
"description": {
"type": "string",
"description": "Wizard Step Short Description.
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"title",
"subtitle",
"description",
"text",
"textarea",
"select",
"radioGroup",
"date",
"dateRange",
const WizardStepSchema = z.object({
steps: z
.object({
title: z.string().describe('Wizard Step Title.'),
description: z.string().describe('Wizard Step Short Description.'),
fields: z
.object({
type: z.nativeEnum(FormFieldType).describe('Type of form'),
description: z.string()
.describe('Description of the Field. What it is and… ‘),
label: z.string().describe('Form field label…'),
required: z.boolean().describe('Whether the field …’),
key: z.string().describe('Key to store the value under.'),
})
.array(),
})
.array(),
});
Zod Schema de
fi
nition
Schema De
fi
nition