@knot0/event-schemas
v2.0.34
Published
Knot0 event JSON Schemas (versioned, internal contracts)
Maintainers
Readme
@knot0/event-schemas
Versioned JSON Schemas for Knot0 platform events.
- Contents:
events/mirrorsschemas-v2/events/structure. - Use: import schema files to validate event payloads in consumers.
Example
import fs from 'fs'
const payload = JSON.parse(fs.readFileSync('example.json', 'utf8'))
const schema = JSON.parse(
fs.readFileSync(require('@knot0/event-schemas/events/v1/orchestration/workflow.started.schema.json'), 'utf8')
)Notes
- Schemas follow JSON Schema draft 2020-12.
- Breaking changes result in a new major (vN) folder under
events/.
