File Layout & Single File Mode
Options:
useMultipleFiles(default true)singleFileName(defaultschemas.ts)placeSingleFileAtRoot(default true) – root of output vsschemas/subdirplaceArrayVariantsAtRoot(defaultfalse) – applies only to the array form ofvariants, e.g."variants": [{ "name": "input", "suffix": "Input" }]. Whenfalse(the default) those files are written toschemas/variants/; set it totrueto write them to theschemas/root.
note
The bundled JSON Schema currently advertises default: true for placeArrayVariantsAtRoot. The generator's actual behaviour is false — omitting the key puts array variants under schemas/variants/.
Single-file mode:
- Aggregates generated content (initSingleFile)
- Hoists and de-duplicates the shared
literalSchema/jsonSchemahelpers so the bundle defines them exactly once - Hoists external
@zod.importcustom-validator modules into the bundle instead of stripping them along with the other relative imports - Writes final bundle (flushSingleFile)
- Cleans sibling files in target directory
- Disables variant emission path
See Single File Mode for the full bundling pipeline.
Layout conflicts between generator block & JSON config are surfaced (generator block wins).