Skip to main content

The manifest

pdm-generator.json sits in the generator's directory. The PDM checks it when it syncs, and checks every run's parameters against it.

FieldWhat it is
schema, schemaVersion"pdm-generator", "1.0.0"
name, descriptionShown in the PDM
runtime"node". Other languages are planned
entryThe file whose default export is the generator
parametersThe form, in order. See below
outputsWhat a run makes: exactly one { "key": …, "kind": "part" } or "assembly"

A parameter:

Field
nameWhat the code gets it as, in params
labelWhat the form says. The name if you leave it out
typenumber, integer, boolean, string or enum
defaultRequired, so every run has every value
min, maxFor numbers
valuesFor enum: the choices
unitShown next to the field, mm or deg for example. Nothing is converted: the code gets what was typed

The key of an output is part of what makes a result the same document again: the same parameters and the same key give the same document.