Skip to content

Commit

Permalink
Add links, chainId schemaUri where missing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
afrittoli committed May 15, 2024
1 parent e7e357b commit f19df52
Show file tree
Hide file tree
Showing 11 changed files with 279 additions and 7 deletions.
34 changes: 33 additions & 1 deletion conformance/incident_detected.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,39 @@
"chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b",
"source": "/monitoring/prod1",
"type": "dev.cdevents.incident.detected.0.3.0-draft",
"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",
Expand Down
34 changes: 33 additions & 1 deletion conformance/incident_reported.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,39 @@
"chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b",
"source": "/monitoring/prod1",
"type": "dev.cdevents.incident.reported.0.3.0-draft",
"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",
Expand Down
34 changes: 33 additions & 1 deletion conformance/incident_resolved.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,39 @@
"chainId": "4c8cb7dd-3448-41de-8768-eec704e2829b",
"source": "/monitoring/prod1",
"type": "dev.cdevents.incident.resolved.0.3.0-draft",
"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",
Expand Down
34 changes: 33 additions & 1 deletion conformance/testcaserun_skipped.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,39 @@
"id": "271069a8-fc18-44f1-b38f-9d70a1695819",
"source": "/event/source/123",
"type": "dev.cdevents.testcaserun.skipped.0.2.0-draft",
"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",
Expand Down
34 changes: 33 additions & 1 deletion conformance/ticket_closed.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,39 @@
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
"source": "/ticketing/system",
"type": "dev.cdevents.ticket.closed.0.2.0-draft",
"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",
Expand Down
34 changes: 33 additions & 1 deletion conformance/ticket_created.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,39 @@
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
"source": "/ticketing/system",
"type": "dev.cdevents.ticket.created.0.2.0-draft",
"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",
Expand Down
34 changes: 33 additions & 1 deletion conformance/ticket_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,39 @@
"id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708",
"source": "/ticketing/system",
"type": "dev.cdevents.ticket.updated.0.2.0-draft",
"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",
Expand Down
12 changes: 12 additions & 0 deletions schemas/testcaserunskipped.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions schemas/ticketclosed.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions schemas/ticketcreated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 12 additions & 0 deletions schemas/ticketupdated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f19df52

Please sign in to comment.