Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Edit diagram:

  1. Visit https://azimutt.app/new

  2. Import project (using the JSON provided below👇)


Object schemas

Journal object

{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://example.com/table-journal.schema.json",
	"title": "Table record journal",
	"description": "Auditable journal of record changes",
	"type": "array",
	"items": {
		"type": "object",
		"properties": {
			"at": {
				"type": "string",
				"format": "date-time",
				"description": "ISO 8601 formatted date-time string designating when a change event of the journaled object took place."
			},
			"by": {
				"not": {
					"type": ["object", "boolean"]
				},
				"description": "Name of the authorized person or system making the change event."
			},
			"action": {
				"type": "string",
				"enum": ["CREATED", "MODIFIED"],
				"description": "Value designating which action, either creation of a new or modification of an existing record was undertaken."
			}
		},
		"required": ["at", "by", "action"]
	},
	"minItems": 1
}

Rooms configuration object

{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://example.com/rooms-configuration.schema.json",
	"title": "Room configuration",
	"description": "Configuration settings of a room",
	"type": "object",
	"properties": {
		"messageExpiration": {
			"type": ["integer", "null"],
		 	"description": "Duration in milliseconds after which messages should expire. If set to 'null', messages never expire."
		},
 		"deliveryDelay": {
			"type": "integer",
			"minimum": 1,
			"description": "Duration in milliseconds for delay between message delivery attempts for PUSH configuration. Can be overridden by subscriptions."
		},
		"deliveryDelayMultiplier": {
			"type": "number",
			"minimum": 1.01
			"description": "Multiplier by which delivery delay is increased exponentially between delivery attempts for PUSH configuration. Always rounded up with millisecond accuracy. Can be overridden by subscriptions."
		},
		"deliveryAttempts": {
			"type": "integer",
			"minimum": 1,
			"description": "Maximum number of delivery attempts for a message in PUSH configuration. Can be overridden by subscriptions."
		}
	},
	"required": ["messageExpiration", "deliveryDelay", "deliveryDelayMultiplier", "deliveryAttempts"]
}

Subscription parameters object

{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://example.com/subscriptions-parameters.schema.json",
	"title": "Subscription parameters",
	"description": "Parameters for a subscription",
	"type": "object",
	"properties": {
		"eventType": {
			"type": "string"
			"description": "Identifies the Event Type to which to subscribe in the room"
		}
		"method": {
			"type": "string",
			"enum": ["PUSH", "PULL"],
			"description": "Identifies subscription type as either being PULL or PUSH"
		},
		"pushUrl": {
			"type": "string",
			"format": "uri",
			"description": "URL for the callback to push messages. Required for PUSH configuration, ignored for PULL."
		},
  		"deliveryDelay": {
			"type": "integer",
			"minimum": 1,
			"description": "Duration in milliseconds for delay between message delivery attempts. Optional and will override room default value in PUSH configuration, ignored for PULL."
		},
		"deliveryDelayMultiplier": {
			"type": "number",
			"minimum": 1.01
			"description": "Multiplier by which delivery delay is increased exponentially between delivery attempts. Optional and will override room default value in PUSH configuration, ignored for PULL."
		},
		"deliveryAttempts": {
			"type": "integer",
			"minimum": 1,
			"description": "Maximum number of delivery attempts. Optional and will override room default value in PUSH configuration, ignored for PULL."
	},
	"required": ["eventType", "method"],
	"dependencies": {
		"method": {
			"oneOf": [
				{
					"properties": {
						"method": { "enum": ["PUSH"] },
						"pushUrl": { "type": "string", "format": "uri" }
					},
					"required": ["pushUrl"]
				},
				{
					"properties": {
						"method": { "enum": ["PULL"] }
					}
				}
			]
		}
	}
}

Event type version JSON schema object

When defining the schema for the event type, it is mandatory that the schema is encapsulated within a field named "content".

The "content" field should be of type object. This encapsulation ensures a consistent structure for event processing. Any deviation from this structure, such as using a different type for the "content" field, will result in schema validation failure, and creation of the event type will fail.

Here is a snippet demonstrating the correct structure:

{
  "type": "object",
  "properties": {
    "content": {
      "type": "object"
    }
  },
  "required": ["content"]
}

Ensure that the event-specific properties and requirements are accurately defined within the "content" field, adhering to the JSON schema standards.

  • No labels