From aecc1c95cd8c217fbae0ed74f6d36d2029bb3ac5 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Wed, 15 May 2024 22:01:14 +0100 Subject: [PATCH] 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 --- conformance/incident_detected.json | 34 +++++++++++++++++++++++++++- conformance/incident_reported.json | 34 +++++++++++++++++++++++++++- conformance/incident_resolved.json | 34 +++++++++++++++++++++++++++- conformance/testcaserun_skipped.json | 34 +++++++++++++++++++++++++++- conformance/ticket_closed.json | 34 +++++++++++++++++++++++++++- conformance/ticket_created.json | 34 +++++++++++++++++++++++++++- conformance/ticket_updated.json | 34 +++++++++++++++++++++++++++- schemas/testcaserunskipped.json | 12 ++++++++++ schemas/ticketclosed.json | 12 ++++++++++ schemas/ticketcreated.json | 12 ++++++++++ schemas/ticketupdated.json | 12 ++++++++++ 11 files changed, 279 insertions(+), 7 deletions(-) diff --git a/conformance/incident_detected.json b/conformance/incident_detected.json index 18357a87..dc06cf46 100644 --- a/conformance/incident_detected.json +++ b/conformance/incident_detected.json @@ -5,7 +5,39 @@ "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", "source": "/monitoring/prod1", "type": "dev.cdevents.incident.detected.0.2.0", - "timestamp": "2022-11-11T13:52:20.079Z" + "timestamp": "2022-11-11T13:52:20.079Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "incident-123", diff --git a/conformance/incident_reported.json b/conformance/incident_reported.json index 376111a6..aabfc855 100644 --- a/conformance/incident_reported.json +++ b/conformance/incident_reported.json @@ -5,7 +5,39 @@ "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", "source": "/monitoring/prod1", "type": "dev.cdevents.incident.reported.0.2.0", - "timestamp": "2022-11-11T13:52:20.079Z" + "timestamp": "2022-11-11T13:52:20.079Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "incident-123", diff --git a/conformance/incident_resolved.json b/conformance/incident_resolved.json index f62e735c..cad5e40e 100644 --- a/conformance/incident_resolved.json +++ b/conformance/incident_resolved.json @@ -5,7 +5,39 @@ "chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b", "source": "/monitoring/prod1", "type": "dev.cdevents.incident.resolved.0.2.0", - "timestamp": "2022-11-11T13:52:20.079Z" + "timestamp": "2022-11-11T13:52:20.079Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "incident-123", diff --git a/conformance/testcaserun_skipped.json b/conformance/testcaserun_skipped.json index 8b016768..703e7faf 100644 --- a/conformance/testcaserun_skipped.json +++ b/conformance/testcaserun_skipped.json @@ -4,7 +4,39 @@ "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", "type": "dev.cdevents.testcaserun.skipped.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "myTestCaseRun123", diff --git a/conformance/ticket_closed.json b/conformance/ticket_closed.json index 7c7dd405..26d1e91c 100644 --- a/conformance/ticket_closed.json +++ b/conformance/ticket_closed.json @@ -4,7 +4,39 @@ "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", "source": "/ticketing/system", "type": "dev.cdevents.ticket.closed.0.1.0", - "timestamp": "2022-11-11T13:52:20.079Z" + "timestamp": "2022-11-11T13:52:20.079Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "ticket-123", diff --git a/conformance/ticket_created.json b/conformance/ticket_created.json index 334d67c7..4b4846e8 100644 --- a/conformance/ticket_created.json +++ b/conformance/ticket_created.json @@ -4,7 +4,39 @@ "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", "source": "/ticketing/system", "type": "dev.cdevents.ticket.created.0.1.0", - "timestamp": "2022-11-11T13:52:20.079Z" + "timestamp": "2022-11-11T13:52:20.079Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "ticket-123", diff --git a/conformance/ticket_updated.json b/conformance/ticket_updated.json index a1053e7a..e107d22e 100644 --- a/conformance/ticket_updated.json +++ b/conformance/ticket_updated.json @@ -4,7 +4,39 @@ "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", "source": "/ticketing/system", "type": "dev.cdevents.ticket.updated.0.1.0", - "timestamp": "2022-11-11T13:52:20.079Z" + "timestamp": "2022-11-11T13:52:20.079Z", + "schemaUri": "https://myorg.com/schema/custom", + "links": [ + { + "linkType": "RELATION", + "linkKind": "TRIGGER", + "target": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "PATH", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + }, { + "linkType": "END", + "from": { + "contextId": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce" + }, + "tags": { + "foo1": "bar", + "foo2": "bar" + } + } + ] }, "subject": { "id": "ticket-123", diff --git a/schemas/testcaserunskipped.json b/schemas/testcaserunskipped.json index 95137ff8..2b964508 100644 --- a/schemas/testcaserunskipped.json +++ b/schemas/testcaserunskipped.json @@ -26,6 +26,18 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" + }, + "chainId": { + "type": "string", + "minLength": 1 + }, + "links": { + "$ref": "links/embeddedlinksarray" } }, "additionalProperties": false, diff --git a/schemas/ticketclosed.json b/schemas/ticketclosed.json index 8b670ac8..9c14d7a6 100644 --- a/schemas/ticketclosed.json +++ b/schemas/ticketclosed.json @@ -27,6 +27,18 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" + }, + "chainId": { + "type": "string", + "minLength": 1 + }, + "links": { + "$ref": "links/embeddedlinksarray" } }, "additionalProperties": false, diff --git a/schemas/ticketcreated.json b/schemas/ticketcreated.json index d54dd18b..66b75050 100644 --- a/schemas/ticketcreated.json +++ b/schemas/ticketcreated.json @@ -27,6 +27,18 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" + }, + "chainId": { + "type": "string", + "minLength": 1 + }, + "links": { + "$ref": "links/embeddedlinksarray" } }, "additionalProperties": false, diff --git a/schemas/ticketupdated.json b/schemas/ticketupdated.json index 8f3ca300..5246ce02 100644 --- a/schemas/ticketupdated.json +++ b/schemas/ticketupdated.json @@ -27,6 +27,18 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" + }, + "chainId": { + "type": "string", + "minLength": 1 + }, + "links": { + "$ref": "links/embeddedlinksarray" } }, "additionalProperties": false,