Import Zod schemas
Zod schemas carry the validation rules an API description needs. Apiome now imports a module's exported Zod schemas into the catalog, with those rules as constraints. What gets imported.
- Constraints come with them. Lengths, patterns,
email/uuid/datetimeformats, integer and numeric bounds, defaults and optionality land on each field. - Unions, recursion and composition. Discriminated unions name their variants,
z.lazyrecursion points back at the schema, andmerge,extend,pickandomitare applied. - Declared, not dropped.
refine,transform,brandand the other rules with no schema equivalent are listed in the coverage ledger. - Run in a sandbox. The module runs with no network, no file access, an empty environment and a time limit; a module that loops forever fails cleanly.
