Skip to content

validateGadgetSchema

validateGadgetSchema(schema, gadgetName): void

Defined in: gadgets/schema-validator.ts:12

Validates that a Zod schema doesn’t contain z.unknown() which produces incomplete JSON schemas without type information.

ZodType

The Zod schema to validate

string

Name of the gadget (for error messages)

void

Error if z.unknown() is detected with helpful suggestions