@walkeros/transformer-validator
v0.8.0
Published
Event validation transformer for walkerOS using AJV and JSON Schema
Downloads
154
Maintainers
Readme
@walkeros/transformer-validator
Event validation transformer using JSON Schema.
Source Code | NPM | Documentation
Quick Start
{
"transformers": {
"validate": {
"package": "@walkeros/transformer-validator",
"config": {
"logger": { "level": "DEBUG" },
"settings": {
"format": true,
"contract": {
"product": {
"add": {
"schema": {
"properties": {
"data": { "required": ["id", "name"] }
}
}
}
}
}
}
}
}
}
}Features
- Format validation: Validates full WalkerOS.Event structure
- Contract validation: Entity/action-specific business rules
- Wildcards: Match multiple events with
*patterns - Conditional rules: Apply different schemas based on event data
Installation
npm install @walkeros/transformer-validatorConfiguration
| Property | Type | Description |
| ---------- | ------------------------------------------------------------------------------- | --------------------------------------------------- |
| format | boolean | Validate WalkerOS.Event structure (default: true) |
| contract | Contract | Entity/action validation rules (see docs) |
