Skip to content

block-definition schema

A block TYPE's own declared property/event contract (what core.grid, core.container, etc. accept).

Pull the full JSON Schema: erp schema pull block-definition  ·  MCP: erp_get_schema {"name":"block-definition"}

Top-level properties

PropertyTypeRequiredNotes
contractVersionyes
typestringyesGlobally unique block-type id, dot-namespaced (e.g. core.text-input, acme-hr.org-chart).
versionstringyesSemver. Instances pin the version they were authored against; minor/patch upgrades apply automatically, major upgrades require an explicit migration (W1-05).
publisherstringyesThe Phase 21 marketplace publisher id.
inputClassbooleanTrue for input-class blocks: the block inherits the validation-message surface (invalid state + message slot + aria-invalid/aria-describedby) from the base contract, which Phase 6's validation pipeline populates (round 2).
propertiesarrayyes
inputsarray
outputsarray
eventsarrayyes
permissionsobjectyesWhich permission hook points the block honors (W2-05). Enforcement lands in Phase 11; the hooks are in the render path from day one.
a11yobjectyes
designerobjectyesBlock-level designer metadata: what Phase 10's palette and property panel render for a block they have never seen (gap audit).
slotsarrayContainer-class blocks only: named child slots and what they may contain.
compositionarray2026-07-18: present only on tenant-authored composite Block definitions (Studio's Block Designer) - the block's own fixed internal content, an array of frozen @erp/block-engine BlockInstanceConfig, validated against the live BlockRegistry at mount time exactly like a page item's or a container's own children. undefined for every core/plugin block.

Named sub-definitions

identifier, i18nKey, propertyType, valueSourceKind, selectOption, propertySpec, portSpec, eventSpec