-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.json
66 lines (66 loc) · 1.9 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"title": "MSB message validation schema",
"type": "object",
"properties": {
"id": { "type": "string" },
"correlationId": { "type": "string" },
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"topics": {
"type": ["object", "null"],
"properties": {
"to": { "$ref": "#/definitions/topic" },
"response": { "$ref": "#/definitions/topic" },
"forward": { "$ref": "#/definitions/topic" }
},
"required": ["to"]
},
"meta": {
"type": ["object", "null"],
"properties": {
"ttl": { "type": ["integer", "null"] },
"createdAt": { "type": "string", "format": "date-time" },
"publishedAt": { "type": ["string", "null"], "format": "date-time" },
"durationMs": { "type": ["number", "null"] },
"serviceDetails": { "$ref": "#/definitions/serviceDetails" }
},
"required": ["createdAt"]
},
"ack": {
"type": ["object", "null"],
"properties": {
"responderId": { "type": "string" },
"responsesRemaining": { "type": "number"},
"timeoutMs": { "type": ["number", "null"] }
},
"required": ["responderId", "responsesRemaining"]
},
"payload": {}
},
"required": ["id", "correlationId", "meta"],
"definitions": {
"topic": {
"type": ["string", "null"],
"pattern": "^_?([a-z0-9\\-]+\\:)+([a-z0-9\\-]+)$"
},
"serviceDetails": {
"type": "object",
"properties": {
"instanceId": { "type": "string" },
"hostname": { "type": "string" },
"ip": {
"type": "string",
"pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
},
"pid": { "type": "integer" },
"name": { "type": "string" },
"version": { "type": "string" }
},
"required": ["name", "version"]
}
}
}