Skip to content

Commit 4e569ed

Browse files
committed
Add links, chainId schemaUri where missing
Add links, chainId and schemUri in the schema and/or in the conformance test when missing. Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
1 parent 6293eb8 commit 4e569ed

11 files changed

Lines changed: 279 additions & 7 deletions

conformance/incident_detected.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,39 @@
55
"chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b",
66
"source": "/monitoring/prod1",
77
"type": "dev.cdevents.incident.detected.0.2.0",
8-
"timestamp": "2022-11-11T13:52:20.079Z"
8+
"timestamp": "2022-11-11T13:52:20.079Z",
9+
"schemaUri": "https://myorg.com/schema/custom",
10+
"links": [
11+
{
12+
"linkType": "RELATION",
13+
"linkKind": "TRIGGER",
14+
"target": {
15+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
16+
},
17+
"tags": {
18+
"foo1": "bar",
19+
"foo2": "bar"
20+
}
21+
}, {
22+
"linkType": "PATH",
23+
"from": {
24+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
25+
},
26+
"tags": {
27+
"foo1": "bar",
28+
"foo2": "bar"
29+
}
30+
}, {
31+
"linkType": "END",
32+
"from": {
33+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
34+
},
35+
"tags": {
36+
"foo1": "bar",
37+
"foo2": "bar"
38+
}
39+
}
40+
]
941
},
1042
"subject": {
1143
"id": "incident-123",

conformance/incident_reported.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,39 @@
55
"chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b",
66
"source": "/monitoring/prod1",
77
"type": "dev.cdevents.incident.reported.0.2.0",
8-
"timestamp": "2022-11-11T13:52:20.079Z"
8+
"timestamp": "2022-11-11T13:52:20.079Z",
9+
"schemaUri": "https://myorg.com/schema/custom",
10+
"links": [
11+
{
12+
"linkType": "RELATION",
13+
"linkKind": "TRIGGER",
14+
"target": {
15+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
16+
},
17+
"tags": {
18+
"foo1": "bar",
19+
"foo2": "bar"
20+
}
21+
}, {
22+
"linkType": "PATH",
23+
"from": {
24+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
25+
},
26+
"tags": {
27+
"foo1": "bar",
28+
"foo2": "bar"
29+
}
30+
}, {
31+
"linkType": "END",
32+
"from": {
33+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
34+
},
35+
"tags": {
36+
"foo1": "bar",
37+
"foo2": "bar"
38+
}
39+
}
40+
]
941
},
1042
"subject": {
1143
"id": "incident-123",

conformance/incident_resolved.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,39 @@
55
"chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b",
66
"source": "/monitoring/prod1",
77
"type": "dev.cdevents.incident.resolved.0.2.0",
8-
"timestamp": "2022-11-11T13:52:20.079Z"
8+
"timestamp": "2022-11-11T13:52:20.079Z",
9+
"schemaUri": "https://myorg.com/schema/custom",
10+
"links": [
11+
{
12+
"linkType": "RELATION",
13+
"linkKind": "TRIGGER",
14+
"target": {
15+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
16+
},
17+
"tags": {
18+
"foo1": "bar",
19+
"foo2": "bar"
20+
}
21+
}, {
22+
"linkType": "PATH",
23+
"from": {
24+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
25+
},
26+
"tags": {
27+
"foo1": "bar",
28+
"foo2": "bar"
29+
}
30+
}, {
31+
"linkType": "END",
32+
"from": {
33+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
34+
},
35+
"tags": {
36+
"foo1": "bar",
37+
"foo2": "bar"
38+
}
39+
}
40+
]
941
},
1042
"subject": {
1143
"id": "incident-123",

conformance/testcaserun_skipped.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,39 @@
44
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
55
"source": "/event/source/123",
66
"type": "dev.cdevents.testcaserun.skipped.0.1.0",
7-
"timestamp": "2023-03-20T14:27:05.315384Z"
7+
"timestamp": "2023-03-20T14:27:05.315384Z",
8+
"schemaUri": "https://myorg.com/schema/custom",
9+
"links": [
10+
{
11+
"linkType": "RELATION",
12+
"linkKind": "TRIGGER",
13+
"target": {
14+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
15+
},
16+
"tags": {
17+
"foo1": "bar",
18+
"foo2": "bar"
19+
}
20+
}, {
21+
"linkType": "PATH",
22+
"from": {
23+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
24+
},
25+
"tags": {
26+
"foo1": "bar",
27+
"foo2": "bar"
28+
}
29+
}, {
30+
"linkType": "END",
31+
"from": {
32+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
33+
},
34+
"tags": {
35+
"foo1": "bar",
36+
"foo2": "bar"
37+
}
38+
}
39+
]
840
},
941
"subject": {
1042
"id": "myTestCaseRun123",

conformance/ticket_closed.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,39 @@
44
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
55
"source": "/ticketing/system",
66
"type": "dev.cdevents.ticket.closed.0.1.0",
7-
"timestamp": "2022-11-11T13:52:20.079Z"
7+
"timestamp": "2022-11-11T13:52:20.079Z",
8+
"schemaUri": "https://myorg.com/schema/custom",
9+
"links": [
10+
{
11+
"linkType": "RELATION",
12+
"linkKind": "TRIGGER",
13+
"target": {
14+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
15+
},
16+
"tags": {
17+
"foo1": "bar",
18+
"foo2": "bar"
19+
}
20+
}, {
21+
"linkType": "PATH",
22+
"from": {
23+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
24+
},
25+
"tags": {
26+
"foo1": "bar",
27+
"foo2": "bar"
28+
}
29+
}, {
30+
"linkType": "END",
31+
"from": {
32+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
33+
},
34+
"tags": {
35+
"foo1": "bar",
36+
"foo2": "bar"
37+
}
38+
}
39+
]
840
},
941
"subject": {
1042
"id": "ticket-123",

conformance/ticket_created.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,39 @@
44
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
55
"source": "/ticketing/system",
66
"type": "dev.cdevents.ticket.created.0.1.0",
7-
"timestamp": "2022-11-11T13:52:20.079Z"
7+
"timestamp": "2022-11-11T13:52:20.079Z",
8+
"schemaUri": "https://myorg.com/schema/custom",
9+
"links": [
10+
{
11+
"linkType": "RELATION",
12+
"linkKind": "TRIGGER",
13+
"target": {
14+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
15+
},
16+
"tags": {
17+
"foo1": "bar",
18+
"foo2": "bar"
19+
}
20+
}, {
21+
"linkType": "PATH",
22+
"from": {
23+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
24+
},
25+
"tags": {
26+
"foo1": "bar",
27+
"foo2": "bar"
28+
}
29+
}, {
30+
"linkType": "END",
31+
"from": {
32+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
33+
},
34+
"tags": {
35+
"foo1": "bar",
36+
"foo2": "bar"
37+
}
38+
}
39+
]
840
},
941
"subject": {
1042
"id": "ticket-123",

conformance/ticket_updated.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,39 @@
44
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
55
"source": "/ticketing/system",
66
"type": "dev.cdevents.ticket.updated.0.1.0",
7-
"timestamp": "2022-11-11T13:52:20.079Z"
7+
"timestamp": "2022-11-11T13:52:20.079Z",
8+
"schemaUri": "https://myorg.com/schema/custom",
9+
"links": [
10+
{
11+
"linkType": "RELATION",
12+
"linkKind": "TRIGGER",
13+
"target": {
14+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
15+
},
16+
"tags": {
17+
"foo1": "bar",
18+
"foo2": "bar"
19+
}
20+
}, {
21+
"linkType": "PATH",
22+
"from": {
23+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
24+
},
25+
"tags": {
26+
"foo1": "bar",
27+
"foo2": "bar"
28+
}
29+
}, {
30+
"linkType": "END",
31+
"from": {
32+
"contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
33+
},
34+
"tags": {
35+
"foo1": "bar",
36+
"foo2": "bar"
37+
}
38+
}
39+
]
840
},
941
"subject": {
1042
"id": "ticket-123",

schemas/testcaserunskipped.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@
2626
"timestamp": {
2727
"type": "string",
2828
"format": "date-time"
29+
},
30+
"schemaUri": {
31+
"type": "string",
32+
"minLength": 1,
33+
"format": "uri"
34+
},
35+
"chainId": {
36+
"type": "string",
37+
"minLength": 1
38+
},
39+
"links": {
40+
"$ref": "links/embeddedlinksarray"
2941
}
3042
},
3143
"additionalProperties": false,

schemas/ticketclosed.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
"timestamp": {
2828
"type": "string",
2929
"format": "date-time"
30+
},
31+
"schemaUri": {
32+
"type": "string",
33+
"minLength": 1,
34+
"format": "uri"
35+
},
36+
"chainId": {
37+
"type": "string",
38+
"minLength": 1
39+
},
40+
"links": {
41+
"$ref": "links/embeddedlinksarray"
3042
}
3143
},
3244
"additionalProperties": false,

schemas/ticketcreated.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@
2727
"timestamp": {
2828
"type": "string",
2929
"format": "date-time"
30+
},
31+
"schemaUri": {
32+
"type": "string",
33+
"minLength": 1,
34+
"format": "uri"
35+
},
36+
"chainId": {
37+
"type": "string",
38+
"minLength": 1
39+
},
40+
"links": {
41+
"$ref": "links/embeddedlinksarray"
3042
}
3143
},
3244
"additionalProperties": false,

0 commit comments

Comments
 (0)