Documentation Index
Fetch the complete documentation index at: https://docs.velahq.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
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 | Required | Description |
|---|---|---|
eventName | yes | The event name that must match when ingesting. Dot-separated by convention: order.placed, payment.failed. |
description | no | Human-readable description of what this event represents. Shown in the dashboard. |
fields | yes | Array of field definitions. Minimum one field. |
metadataFields | no | Optional contextual fields (environment, trace ID, version). Not part of the core payload. |
Field properties
| Property | Required | Description |
|---|---|---|
id | yes | Unique identifier for this field within the schema. Use a stable value — changing an id doesn’t affect matching, but it’s confusing. |
name | yes | The key name in the event payload (e.g. orderId). Case-sensitive. |
type | yes | Data type — see the table below. |
required | yes | true → event is rejected if this field is missing. false → field is optional. |
description | no | Human-readable description. Shown in the dashboard. |
defaultValue | no | Default value used when the field is absent and required is false. |
enumValues | conditional | Required when type is "enum". Array of allowed string values. |
validation | no | Additional validation constraints (see below). |
Field types
| Type | Description | Validation options |
|---|---|---|
string | Text value | min (min length), max (max length), pattern (regex) |
number | Integer or float | min, max |
boolean | true or false | — |
date | ISO-8601 date string (e.g. 2024-06-01T12:00:00Z) | — |
enum | One value from a fixed set of strings | enumValues array required |
object | Nested JSON object | — |
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.