Skip to content

Examples ​

Every JSON artifact shown anywhere in these docs is a real file — never a sketch with ... elisions. They live in two places:

  • ../tutorial/example-plugin/ — the complete, published, verified tutorial module (office-equipment). Most guide examples point here.
  • standalone-plugin/ — individual artifact files a guide needs that aren't part of the tutorial module (a validation rule, the aggregation/cadence/compliance config seeds).

Keeping them honest ​

bash
node help-docs/examples/test-examples.mjs

The runner:

  1. validates every entity / provider / data-service / data-view / workflow / rule / menu / seed-data file in both trees against the live SDK schemas (erp schema validate);
  2. runs erp plugin test on the tutorial module (page contract + block registry
    • semantic lints).

Exit code 0 = every example is valid. Non-zero names the file that drifted.

Wire this into CI on any change under help-docs/. If a schema changes and an example no longer matches, the build fails and the doc gets fixed.

Page files are validated by erp plugin test, not erp schema validate — on disk a page is the wrapper { name, description, definition: {...} } and --schema page checks only the inner definition.