File naming
Each schema lives in its own.json file, named after the event:
eventName field inside the file is what Vela uses to match incoming events. By convention, keep them in sync.
File structure
Top-level fields
Field properties
Field types
Validation examples
Metadata fields
Metadata fields hold optional contextual data that isn’t part of the core event payload — things like deployment environment, trace IDs, or client version. They have the sameid, name, type, and description properties as regular fields, but:
- They are always optional (no
requiredproperty) - They have no
defaultValueorvalidation
metadata key:
How diffing works
When you runvela diff or vela push, schemas are matched by eventName. For each schema:
- No remote match → schema will be created
- Remote exists, no changes → skipped
- Remote exists, changes detected → schema will be updated
name, not id. You can change a field’s id without triggering an update — only changes to name, type, required, enumValues, or validation count as changes.
When updating, the entire
fields array replaces the remote version. Removing a field from the local file removes it from the schema. Make sure downstream consumers are updated before removing required fields.