From 10618e8d01f74a8a8bc5d6a77b68ccbf62745867 Mon Sep 17 00:00:00 2001 From: Jan Kowalleck Date: Sat, 3 Jun 2023 14:51:29 +0200 Subject: [PATCH] add BOM-Link related types Signed-off-by: Jan Kowalleck --- schema/bom-1.5.schema.json | 20 ++++++++++++++++++++ schema/bom-1.5.xsd | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/schema/bom-1.5.schema.json b/schema/bom-1.5.schema.json index b4e315d8..68e0abb9 100644 --- a/schema/bom-1.5.schema.json +++ b/schema/bom-1.5.schema.json @@ -117,6 +117,26 @@ "$comment": "Identifier-DataType for interlinked elements.", "type": "string" }, + "bomLinkDocumentType": { + "title": "BOM-Link document", + "description": "Descriptor for another BOM document. See https://cyclonedx.org/capabilities/bomlink/", + "type": "string", + "pattern": "^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*$", + "$comment": "part of the pattern is based on `bom.serialNumber`'s pattern" + }, + "bomLinkElementType": { + "title": "BOM-Link element", + "description": "Descriptor for an element in another BOM document. See https://cyclonedx.org/capabilities/bomlink/", + "type": "string", + "pattern": "^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*#.+$", + "$comment": "part of the pattern is based on `bom.serialNumber`'s pattern" + }, + "bomLink": { + "anyOf": [ + {"$ref": "#/definitions/bomLinkDocumentType"}, + {"$ref": "#/definitions/bomLinkElementType"} + ] + }, "metadata": { "type": "object", "title": "BOM Metadata Object", diff --git a/schema/bom-1.5.xsd b/schema/bom-1.5.xsd index 6f13964e..98237283 100644 --- a/schema/bom-1.5.xsd +++ b/schema/bom-1.5.xsd @@ -42,6 +42,34 @@ limitations under the License. + + + + Descriptor for another BOM document. + See https://cyclonedx.org/capabilities/bomlink/ + + + + + + + + + + + Descriptor for an element in another BOM document. + See https://cyclonedx.org/capabilities/bomlink/ + + + + + + + + + + +