Some checks failed
CultMesh QUIC native / Build win32-x64 (push) Has been skipped
CultMesh QUIC native / Build linux-x64 (push) Has been skipped
CultMesh QUIC native / Release native binaries (push) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (push) Failing after 20m15s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (push) Successful in 48s
26 lines
1.1 KiB
JSON
26 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://github.com/GameCult/CultLib/contracts/cultnet/cultnet.database-change-raw.schema.json",
|
|
"title": "CultNet Raw Database Change Message",
|
|
"type": "object",
|
|
"required": ["schemaVersion", "messageId", "subscriptionId", "changeKind"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"schemaVersion": { "const": "cultnet.database_change_raw.v0" },
|
|
"messageId": { "type": "string", "minLength": 1 },
|
|
"subscriptionId": { "type": "string", "minLength": 1 },
|
|
"changeKind": { "enum": ["added", "updated", "removed"] },
|
|
"document": { "$ref": "./cultnet.raw-document-record.schema.json" },
|
|
"recordKey": { "type": "string", "minLength": 1 },
|
|
"schemaId": { "type": "string", "minLength": 1 },
|
|
"commitId": { "type": "string", "minLength": 1 },
|
|
"commitCount": { "type": "integer", "minimum": 2 }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "changeKind": { "const": "removed" } } },
|
|
"then": { "required": ["recordKey", "schemaId"] },
|
|
"else": { "required": ["document"] }
|
|
}
|
|
]
|
|
}
|