{eventName}.json.
Directory structure
File structure
Top-level fields
| Field | Required | Description |
|---|---|---|
eventName | yes | Event name that must match when ingesting |
description | no | Human-readable description |
fields | yes | Array of field definitions (min 1) |
metadataFields | no | Array of metadata field definitions |
Field properties
| Property | Required | Description |
|---|---|---|
id | yes | Unique identifier for the field |
name | yes | Field name in the event payload |
type | yes | Data type (see below) |
required | yes | Whether the field must be present |
description | no | Human-readable description |
defaultValue | no | Default value if field is omitted |
enumValues | no | Allowed values (only for enum type) |
validation | no | Validation rules (min, max, pattern) |
Field types
| Type | Description | Validation options |
|---|---|---|
string | Text value | min, max (length), pattern (regex) |
number | Numeric value | min, max |
boolean | true or false | — |
date | ISO-8601 date string | — |
enum | Fixed set of strings | Provide enumValues array |
object | Nested JSON object | — |
Metadata fields
Metadata fields define optional contextual data (environment, trace ID, etc.). They have the same structure as regular fields but withoutrequired, defaultValue, or validation.
How diffing works
When you runvela diff or vela push, schemas are matched by eventName:
- No remote match — schema will be created
- Remote exists —
description,fields, andmetadataFieldsare compared - Fields are compared by
name(notid) — you can change IDs without triggering an update - When updating, the full
fieldsarray replaces the remote version entirely