Event Schema
The Jade Platform Event Stream Producer (ESP) uses a JSON schema to describe database state change events. For details about the JSON schema specification, see https://json-schema.org/specification.
The JSON schema defines the structure for describing database change events in a Jade Platform database. It serves as a template for generating valid JSON payloads that represent these events.
The schema is composed of the following key components.
-
Root‑level properties
-
Definitions section, which contains nested schemas
Root-Level Properties
The following table lists the root‑level properties in the JSON schema.
Property | Description |
---|---|
$schema |
Specifies the JSON schema draft version; for example, "http://json-schema.org/draft-07/schema#" |
title |
Provides a human‑readable title for the schema |
type |
Defines the root‑level object type |
properties |
Lists all of the properties of the root object |
required |
Specifies which properties are mandatory |
The following table lists details of the properties property.
properties Detail | Description |
---|---|
eventId |
String type |
schemaId |
String type |
eventType |
String type |
eventTime |
String type with date-time format |
eventTimezoneOffset | String type |
eventSequenceNumber |
Integer type |
contentType |
String type |
transactionId |
Integer type |
objectType |
String type |
object |
Object type referencing another schema |
Definitions Section
The "definitions" section of the JSON schema contains nested schemas for complex types.
Object Definition
The "Object" defines the structure of the main event payload object.
ObjectReference Definition
The "ObjectReference" defines the structure for referencing other objects.
Constraints
The following constraints apply to the JSON schema.
-
Uses JSON Schema draft-07 standard
-
Implements recursive references using $ref
-
Applies type definitions and constraints to each property
The following is an example of a JSON schema.
{ "$schema": "<http://json-schema.org/draft-07/schema#>", "title": "BankModelSchema.Account.v1", "type": "object", "properties": { // ... properties definitions ... }, "required": ["eventId", "schemaId", "eventType", "eventTime", "eventTimezoneOffset", "eventSequenceNumber", "contentType", "transactionId", "objectType", "object"], "definitions": { "Object": { // ... Object definition ... }, "ObjectReference": { // ... ObjectReference definition ... } } }