diff --git a/schemas/links/embeddedlinkend.json b/schemas/links/embeddedlinkend.json index f9a4bf4..6a94ac6 100644 --- a/schemas/links/embeddedlinkend.json +++ b/schemas/links/embeddedlinkend.json @@ -1,24 +1,30 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdevents.dev/0.6.0-draft/schema/links/embeddedlinkend", + "type": "object", + "additionalProperties": false, "properties": { "linkType": { "type": "string", - "enum": [ - "END" - ] + "enum": ["END"] }, "from": { - "description": "When consuming a CDEvent, you are consuming a parent event. So, when looking at the 'from' key, this is the parent's parent.", + "description": "Identifies the upstream entity of the END link. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "tags": { @@ -26,8 +32,6 @@ "additionalProperties": true } }, - "additionalProperties": false, - "type": "object", "required": [ "linkType" ] diff --git a/schemas/links/embeddedlinkpath.json b/schemas/links/embeddedlinkpath.json index d783aa4..41fa4d8 100644 --- a/schemas/links/embeddedlinkpath.json +++ b/schemas/links/embeddedlinkpath.json @@ -1,24 +1,30 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdevents.dev/0.6.0-draft/schema/links/embeddedlinkpath", + "type": "object", + "additionalProperties": false, "properties": { "linkType": { "type": "string", - "enum": [ - "PATH" - ] + "enum": ["PATH"] }, "from": { - "description": "When consuming a CDEvent, you are consuming a parent event. So, when looking at the 'from' key, this is the parent's parent.", + "description": "Identifies the upstream parent in the path. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "tags": { @@ -26,10 +32,9 @@ "additionalProperties": true } }, - "additionalProperties": false, - "type": "object", "required": [ "linkType", "from" ] } + diff --git a/schemas/links/embeddedlinkrelation.json b/schemas/links/embeddedlinkrelation.json index aa5d438..5b4de33 100644 --- a/schemas/links/embeddedlinkrelation.json +++ b/schemas/links/embeddedlinkrelation.json @@ -1,34 +1,41 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdevents.dev/0.6.0-draft/schema/links/embeddedlinkrelation", + "type": "object", + "additionalProperties": false, "properties": { "linkType": { "type": "string", - "enum": [ - "RELATION" - ] + "enum": ["RELATION"] }, "linkKind": { "type": "string", "minLength": 1 }, "target": { - "description": "", + "description": "Identifies the target of the relation. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } - } + }, + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } + ] }, "tags": { "type": "object", "additionalProperties": true } }, - "additionalProperties": false, - "type": "object", "required": [ "linkType", "linkKind", diff --git a/schemas/links/linkend.json b/schemas/links/linkend.json index 6bc3904..cc79826 100644 --- a/schemas/links/linkend.json +++ b/schemas/links/linkend.json @@ -1,47 +1,59 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdevents.dev/0.6.0-draft/schema/links/linkend", + "type": "object", + "additionalProperties": false, "properties": { "chainId": { - "description": "This represents the full lifecycles of a series of events in CDEvents", + "description": "Represents the lifecycle grouping of a series of related events.", "type": "string", "minLength": 1 }, "linkType": { - "description": "The type associated with the link. In this case, 'END', suggesting the end of some CI/CD lifecycle", + "description": "The type associated with the link. In this case, 'END', suggesting the end of some CI/CD lifecycle.", "type": "string", - "enum": [ - "END" - ] + "enum": ["END"] }, "timestamp": { "type": "string", "format": "date-time" }, "from": { - "description": "This is the context ID of the producing CDEvent.", + "description": "Identifies the producing entity of the END link. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "end": { - "description": "This is the context ID of the final CDEvent in the chain", + "description": "Identifies the final entity in the lifecycle. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "tags": { @@ -49,10 +61,7 @@ "additionalProperties": true } }, - "additionalProperties": false, - "type": "object", "required": [ - "chainId", "linkType", "timestamp", "from", diff --git a/schemas/links/linkrelation.json b/schemas/links/linkrelation.json index d597264..9890eb4 100644 --- a/schemas/links/linkrelation.json +++ b/schemas/links/linkrelation.json @@ -1,17 +1,17 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdevents.dev/0.6.0-draft/schema/links/linkrelation", + "type": "object", + "additionalProperties": false, "properties": { "chainId": { - "description": "This represents the full lifecycles of a series of events in CDEvents", + "description": "Represents the lifecycle grouping of a series of related events.", "type": "string", "minLength": 1 }, "linkType": { "type": "string", - "enum": [ - "RELATION" - ] + "enum": ["RELATION"] }, "linkKind": { "type": "string", @@ -22,29 +22,41 @@ "format": "date-time" }, "source": { - "description": "", + "description": "Identifies the source of the relation. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "target": { - "description": "", + "description": "Identifies the target of the relation. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "tags": { @@ -52,13 +64,11 @@ "additionalProperties": true } }, - "additionalProperties": false, - "type": "object", "required": [ - "chainId", "linkType", "timestamp", "source", "target" ] } + diff --git a/schemas/links/linkstart.json b/schemas/links/linkstart.json index 1a60021..b6572d5 100644 --- a/schemas/links/linkstart.json +++ b/schemas/links/linkstart.json @@ -1,34 +1,40 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cdevents.dev/0.6.0-draft/schema/links/linkstart", + "type": "object", + "additionalProperties": false, "properties": { "chainId": { - "description": "This represents the full lifecycles of a series of events in CDEvents", + "description": "Represents the lifecycle grouping of a series of related events.", "type": "string", "minLength": 1 }, "linkType": { - "description": "The type associated with the link. In this case, 'START', suggesting the start of some CI/CD lifecycle", + "description": "The type associated with the link. In this case, 'START', suggesting the start of some lifecycle.", "type": "string", - "enum": [ - "START" - ] + "enum": ["START"] }, "timestamp": { "type": "string", "format": "date-time" }, "start": { - "description": "This is the context ID of the starting CDEvent in the chain.", + "description": "Identifies the starting point of the link. May reference a CDEvent context ID, a domain execution ID, or both.", "type": "object", + "additionalProperties": false, "properties": { "contextId": { "type": "string", "minLength": 1 + }, + "domainId": { + "type": "string", + "minLength": 1 } }, - "required": [ - "contextId" + "anyOf": [ + { "required": ["contextId"] }, + { "required": ["domainId"] } ] }, "tags": { @@ -36,12 +42,10 @@ "additionalProperties": true } }, - "additionalProperties": false, - "type": "object", "required": [ - "chainId", "linkType", "timestamp", "start" ] } +