31 lines
943 B
JSON
31 lines
943 B
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://mvp-cc.local/docs/architecture/event-envelope.json",
|
|
"title": "EventEnvelope",
|
|
"type": "object",
|
|
"required": [
|
|
"event_id",
|
|
"event_type",
|
|
"event_version",
|
|
"occurred_at",
|
|
"producer",
|
|
"entity_type",
|
|
"entity_id",
|
|
"routing_key",
|
|
"payload"
|
|
],
|
|
"properties": {
|
|
"event_id": {"type": "string", "minLength": 1},
|
|
"event_type": {"type": "string", "minLength": 1},
|
|
"event_version": {"type": "integer", "minimum": 1},
|
|
"occurred_at": {"type": "string", "format": "date-time"},
|
|
"producer": {"type": "string", "minLength": 1},
|
|
"entity_type": {"type": "string", "minLength": 1},
|
|
"entity_id": {"type": "string", "minLength": 1},
|
|
"correlation_id": {"type": ["string", "null"]},
|
|
"routing_key": {"type": "string", "minLength": 1},
|
|
"payload": {"type": "object"}
|
|
},
|
|
"additionalProperties": true
|
|
}
|