You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: schema/bom-1.5.schema.json
+61-16Lines changed: 61 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@
42
42
"type": "integer",
43
43
"title": "BOM Version",
44
44
"description": "Whenever an existing BOM is modified, either manually or through automated processes, the version of the BOM SHOULD be incremented by 1. When a system is presented with multiple BOMs with identical serial numbers, the system SHOULD use the most recent version of the BOM. The default version is '1'.",
45
+
"minimum": 1,
45
46
"default": 1,
46
47
"examples": [1]
47
48
},
@@ -121,20 +122,28 @@
121
122
},
122
123
"definitions": {
123
124
"refType": {
124
-
"$comment": "Identifier-DataType for interlinked elements.",
125
-
"type": "string"
125
+
"description": "Identifier for referable and therefore interlink-able elements.",
126
+
"type": "string",
127
+
"minLength": 1,
128
+
"$comment": "value SHOULD not start with the BOM-Link intro 'urn:cdx:'"
129
+
},
130
+
"refLinkType": {
131
+
"description": "Descriptor for an element identified by the attribute 'bom-ref' in the same BOM document.\nIn contrast to `bomLinkElementType`.",
132
+
"allOf": [{"$ref": "#/definitions/refType"}]
126
133
},
127
134
"bomLinkDocumentType": {
128
135
"title": "BOM-Link document",
129
136
"description": "Descriptor for another BOM document. See https://cyclonedx.org/capabilities/bomlink/",
"$comment": "part of the pattern is based on `bom.serialNumber`'s pattern"
140
149
},
@@ -1125,10 +1134,17 @@
1125
1134
"additionalProperties": false,
1126
1135
"properties": {
1127
1136
"url": {
1128
-
"type": "string",
1137
+
"anyOf": [
1138
+
{
1139
+
"type": "string",
1140
+
"format": "iri-reference"
1141
+
},
1142
+
{
1143
+
"$ref": "#/definitions/bomLink"
1144
+
}
1145
+
],
1129
1146
"title": "URL",
1130
-
"description": "The URI (URL or URN) to the external reference. External references are URIs and therefore can accept any URL scheme including https ([RFC-7230](https://www.ietf.org/rfc/rfc7230.txt)), mailto ([RFC-2368](https://www.ietf.org/rfc/rfc2368.txt)), tel ([RFC-3966](https://www.ietf.org/rfc/rfc3966.txt)), and dns ([RFC-4501](https://www.ietf.org/rfc/rfc4501.txt)). External references may also include formally registered URNs such as [CycloneDX BOM-Link](https://cyclonedx.org/capabilities/bomlink/) to reference CycloneDX BOMs or any object within a BOM. BOM-Link transforms applicable external references into relationships that can be expressed in a BOM or across BOMs.",
1131
-
"format": "iri-reference"
1147
+
"description": "The URI (URL or URN) to the external reference. External references are URIs and therefore can accept any URL scheme including https ([RFC-7230](https://www.ietf.org/rfc/rfc7230.txt)), mailto ([RFC-2368](https://www.ietf.org/rfc/rfc2368.txt)), tel ([RFC-3966](https://www.ietf.org/rfc/rfc3966.txt)), and dns ([RFC-4501](https://www.ietf.org/rfc/rfc4501.txt)). External references may also include formally registered URNs such as [CycloneDX BOM-Link](https://cyclonedx.org/capabilities/bomlink/) to reference CycloneDX BOMs or any object within a BOM. BOM-Link transforms applicable external references into relationships that can be expressed in a BOM or across BOMs."
1132
1148
},
1133
1149
"comment": {
1134
1150
"type": "string",
@@ -1199,15 +1215,15 @@
1199
1215
"additionalProperties": false,
1200
1216
"properties": {
1201
1217
"ref": {
1202
-
"$ref": "#/definitions/refType",
1218
+
"$ref": "#/definitions/refLinkType",
1203
1219
"title": "Reference",
1204
1220
"description": "References a component by the components bom-ref attribute"
1205
1221
},
1206
1222
"dependsOn": {
1207
1223
"type": "array",
1208
1224
"uniqueItems": true,
1209
1225
"items": {
1210
-
"$ref": "#/definitions/refType"
1226
+
"$ref": "#/definitions/refLinkType"
1211
1227
},
1212
1228
"title": "Depends On",
1213
1229
"description": "The bom-ref identifiers of the components that are dependencies of this dependency object."
@@ -1362,17 +1378,31 @@
1362
1378
"source": {
1363
1379
"type": "array",
1364
1380
"items": {
1365
-
"type": "string",
1366
-
"format": "iri-reference"
1381
+
"anyOf": [
1382
+
{
1383
+
"type": "string",
1384
+
"format": "iri-reference"
1385
+
},
1386
+
{
1387
+
"$ref": "#/definitions/bomLinkElementType"
1388
+
}
1389
+
]
1367
1390
},
1368
1391
"title": "Source",
1369
1392
"description": "The URI, URL, or BOM-Link of the components or services the data came in from"
1370
1393
},
1371
1394
"destination": {
1372
1395
"type": "array",
1373
1396
"items": {
1374
-
"type": "string",
1375
-
"format": "iri-reference"
1397
+
"anyOf": [
1398
+
{
1399
+
"type": "string",
1400
+
"format": "iri-reference"
1401
+
},
1402
+
{
1403
+
"$ref": "#/definitions/bomLinkElementType"
1404
+
}
1405
+
]
1376
1406
},
1377
1407
"title": "Destination",
1378
1408
"description": "The URI, URL, or BOM-Link of the components or services the data is sent to"
@@ -1480,7 +1510,10 @@
1480
1510
"type": "array",
1481
1511
"uniqueItems": true,
1482
1512
"items": {
1483
-
"$ref": "#/definitions/refType"
1513
+
"anyOf": [
1514
+
{"$ref": "#/definitions/refLinkType"},
1515
+
{"$ref": "#/definitions/bomLinkElementType"}
1516
+
]
1484
1517
},
1485
1518
"title": "BOM References",
1486
1519
"description": "The object in the BOM identified by its bom-ref. This is often a component or service, but may be any object type supporting bom-refs. Tools used for analysis should already be defined in the BOM, either in the metadata/tools, components, or formulation."
@@ -1600,7 +1633,10 @@
1600
1633
"type": "array",
1601
1634
"uniqueItems": true,
1602
1635
"items": {
1603
-
"$ref": "#/definitions/refType"
1636
+
"anyOf": [
1637
+
{"$ref": "#/definitions/refLinkType"},
1638
+
{"$ref": "#/definitions/bomLinkElementType"}
1639
+
]
1604
1640
},
1605
1641
"title": "BOM references",
1606
1642
"description": "The bom-ref identifiers of the components or services being described. Assemblies refer to nested relationships whereby a constituent part may include other constituent parts. References do not cascade to child parts. References are explicit for the specified constituent part only."
@@ -2182,7 +2218,10 @@
2182
2218
"additionalProperties": false,
2183
2219
"properties": {
2184
2220
"ref": {
2185
-
"$ref": "#/definitions/refType",
2221
+
"anyOf": [
2222
+
{"$ref": "#/definitions/refLinkType"},
2223
+
{"$ref": "#/definitions/bomLinkElementType"}
2224
+
],
2186
2225
"title": "Reference",
2187
2226
"description": "References a component or service by the objects bom-ref"
2188
2227
},
@@ -2275,7 +2314,10 @@
2275
2314
"type": "array",
2276
2315
"uniqueItems": true,
2277
2316
"items": {
2278
-
"$ref": "#/definitions/refType"
2317
+
"anyOf": [
2318
+
{"$ref": "#/definitions/refLinkType"},
2319
+
{"$ref": "#/definitions/bomLinkElementType"}
2320
+
]
2279
2321
},
2280
2322
"title": "BOM References",
2281
2323
"description": "The object in the BOM identified by its bom-ref. This is often a component or service, but may be any object type supporting bom-refs."
@@ -2413,7 +2455,10 @@
2413
2455
"additionalProperties": false,
2414
2456
"properties": {
2415
2457
"ref": {
2416
-
"$ref": "#/definitions/refType",
2458
+
"anyOf": [
2459
+
{"$ref": "#/definitions/refLinkType"},
2460
+
{"$ref": "#/definitions/bomLinkElementType"}
2461
+
],
2417
2462
"title": "Reference",
2418
2463
"description": "References a data component by the components bom-ref attribute"
0 commit comments