Skip to content

Commit 4442724

Browse files
committed
json schema
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent e762bca commit 4442724

File tree

1 file changed

+50
-14
lines changed

1 file changed

+50
-14
lines changed

schema/bom-1.5.schema.json

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,10 +1117,17 @@
11171117
"additionalProperties": false,
11181118
"properties": {
11191119
"url": {
1120-
"type": "string",
1120+
"anyOf": [
1121+
{
1122+
"type": "string",
1123+
"format": "iri-reference"
1124+
},
1125+
{
1126+
"$ref": "#/definitions/bomLink"
1127+
}
1128+
],
11211129
"title": "URL",
1122-
"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.",
1123-
"format": "iri-reference"
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."
11241131
},
11251132
"comment": {
11261133
"type": "string",
@@ -1186,15 +1193,15 @@
11861193
"additionalProperties": false,
11871194
"properties": {
11881195
"ref": {
1189-
"$ref": "#/definitions/refType",
1196+
"$ref": "#/definitions/refLinkType",
11901197
"title": "Reference",
11911198
"description": "References a component by the components bom-ref attribute"
11921199
},
11931200
"dependsOn": {
11941201
"type": "array",
11951202
"uniqueItems": true,
11961203
"items": {
1197-
"$ref": "#/definitions/refType"
1204+
"$ref": "#/definitions/refLinkType"
11981205
},
11991206
"title": "Depends On",
12001207
"description": "The bom-ref identifiers of the components that are dependencies of this dependency object."
@@ -1349,17 +1356,31 @@
13491356
"source": {
13501357
"type": "array",
13511358
"items": {
1352-
"type": "string",
1353-
"format": "iri-reference"
1359+
"anyOf": [
1360+
{
1361+
"type": "string",
1362+
"format": "iri-reference"
1363+
},
1364+
{
1365+
"$ref": "#/definitions/bomLinkElementType"
1366+
}
1367+
]
13541368
},
13551369
"title": "Source",
13561370
"description": "The URI, URL, or BOM-Link of the components or services the data came in from"
13571371
},
13581372
"destination": {
13591373
"type": "array",
13601374
"items": {
1361-
"type": "string",
1362-
"format": "iri-reference"
1375+
"anyOf": [
1376+
{
1377+
"type": "string",
1378+
"format": "iri-reference"
1379+
},
1380+
{
1381+
"$ref": "#/definitions/bomLinkElementType"
1382+
}
1383+
]
13631384
},
13641385
"title": "Destination",
13651386
"description": "The URI, URL, or BOM-Link of the components or services the data is sent to"
@@ -1467,7 +1488,10 @@
14671488
"type": "array",
14681489
"uniqueItems": true,
14691490
"items": {
1470-
"$ref": "#/definitions/refType"
1491+
"anyOf": [
1492+
{"$ref": "#/definitions/refLinkType"},
1493+
{"$ref": "#/definitions/bomLinkElementType"}
1494+
]
14711495
},
14721496
"title": "BOM References",
14731497
"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."
@@ -1587,7 +1611,10 @@
15871611
"type": "array",
15881612
"uniqueItems": true,
15891613
"items": {
1590-
"$ref": "#/definitions/refType"
1614+
"anyOf": [
1615+
{"$ref": "#/definitions/refLinkType"},
1616+
{"$ref": "#/definitions/bomLinkElementType"}
1617+
]
15911618
},
15921619
"title": "BOM references",
15931620
"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."
@@ -2167,7 +2194,10 @@
21672194
"additionalProperties": false,
21682195
"properties": {
21692196
"ref": {
2170-
"$ref": "#/definitions/refType",
2197+
"anyOf": [
2198+
{"$ref": "#/definitions/refLinkType"},
2199+
{"$ref": "#/definitions/bomLinkElementType"}
2200+
],
21712201
"title": "Reference",
21722202
"description": "References a component or service by the objects bom-ref"
21732203
},
@@ -2260,7 +2290,10 @@
22602290
"type": "array",
22612291
"uniqueItems": true,
22622292
"items": {
2263-
"$ref": "#/definitions/refType"
2293+
"anyOf": [
2294+
{"$ref": "#/definitions/refLinkType"},
2295+
{"$ref": "#/definitions/bomLinkElementType"}
2296+
]
22642297
},
22652298
"title": "BOM References",
22662299
"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."
@@ -2398,7 +2431,10 @@
23982431
"additionalProperties": false,
23992432
"properties": {
24002433
"ref": {
2401-
"$ref": "#/definitions/refType",
2434+
"anyOf": [
2435+
{"$ref": "#/definitions/refLinkType"},
2436+
{"$ref": "#/definitions/bomLinkElementType"}
2437+
],
24022438
"title": "Reference",
24032439
"description": "References a data component by the components bom-ref attribute"
24042440
}

0 commit comments

Comments
 (0)