This directory contains example JSON files that demonstrate the usage of schemas defined in the /schemas
directory.
Examples are organized by protocol and mirror the schema directory structure:
examples/
├── PACT_methodology/ # PACT protocol examples
│ ├── DataModelExtension/ # Extension examples
│ └── core/ # Core schema examples
└── {other_protocols}/ # Additional protocol examples
Examples serve multiple purposes:
product-carbon-footprint-basic.json
simple-example.json
, complex-example.json
automotive-pcf-example.json
, textile-pcf-example.json
Each example should:
Use the validation tools to ensure examples remain valid:
# Validate all examples for a protocol
npm run test:examples PACT_methodology
# Validate specific example
npm run validate examples/PACT_methodology/simple-pcf.json
When adding examples: