langium-zod / ZodPropertyDescriptor
Interface: ZodPropertyDescriptor
Defined in: types.ts:50
Describes a single property of a Langium interface type after extraction, capturing all information the code generator needs to emit a Zod property expression.
name— property name as it appears in the grammar (e.g."elements").zodType— the resolved ZodTypeExpression for this property.optional—truewhen the grammar uses?=assignment or marks the property as optional.minItems— minimum array length when the grammar uses+=with+cardinality (emits.min(1));undefinedfor all other cases.comment— JSDoc/grammar comment to propagate into form metadata, if any.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
comment? | string | JSDoc/grammar comment to propagate into form metadata, if any. | types.ts:63 |
minItems? | number | Minimum array length when the grammar uses += with + cardinality; undefined for all other cases. Emits .min(1) on the generated array schema. | types.ts:61 |
name | string | Property name as it appears in the Langium grammar (e.g. "elements"). | types.ts:52 |
optional | boolean | true when the grammar uses ?= assignment or marks the property optional. | types.ts:56 |
zodType | ZodTypeExpression | Resolved Zod type expression for this property. | types.ts:54 |