Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions schema/bom-1.5.proto
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ message OrganizationalContact {
optional string email = 2;
// The phone number of the contact.
optional string phone = 3;
// An optional identifier which can be used to reference the object elsewhere in the BOM. Uniqueness is enforced within all elements and children of the root-level bom element.
optional string bom_ref = 4;
}

message OrganizationalEntity {
Expand All @@ -434,6 +436,8 @@ message OrganizationalEntity {
repeated string url = 2;
// A contact person at the organization. Multiple contacts are allowed.
repeated OrganizationalContact contact = 3;
// An optional identifier which can be used to reference the object elsewhere in the BOM. Uniqueness is enforced within all elements and children of the root-level bom element.
optional string bom_ref = 4;
}

enum PatchClassification {
Expand Down
10 changes: 10 additions & 0 deletions schema/bom-1.5.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
"description": "",
"additionalProperties": false,
"properties": {
"bom-ref": {
"$ref": "#/definitions/refType",
"title": "BOM Reference",
"description": "An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
},
"name": {
"type": "string",
"title": "Name",
Expand Down Expand Up @@ -284,6 +289,11 @@
"description": "",
"additionalProperties": false,
"properties": {
"bom-ref": {
"$ref": "#/definitions/refType",
"title": "BOM Reference",
"description": "An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
},
"name": {
"type": "string",
"title": "Name",
Expand Down
16 changes: 16 additions & 0 deletions schema/bom-1.5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ limitations under the License.
</xs:annotation>
</xs:any>
</xs:sequence>
<xs:attribute name="bom-ref" type="bom:refType">
<xs:annotation>
<xs:documentation>
An optional identifier which can be used to reference the object elsewhere in the BOM.
Uniqueness is enforced within all elements and children of the root-level bom element.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax">
<xs:annotation>
<xs:documentation>User-defined attributes may be used on this element as long as they
Expand Down Expand Up @@ -237,6 +245,14 @@ limitations under the License.
</xs:annotation>
</xs:any>
</xs:sequence>
<xs:attribute name="bom-ref" type="bom:refType">
<xs:annotation>
<xs:documentation>
An optional identifier which can be used to reference the object elsewhere in the BOM.
Uniqueness is enforced within all elements and children of the root-level bom element.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other" processContents="lax">
<xs:annotation>
<xs:documentation>User-defined attributes may be used on this element as long as they
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"version": 1,
"metadata": {
"manufacture": {
"bom-ref": "manufacturer-1",
"name": "Acme, Inc.",
"url": [
"https://example.com"
],
"contact": [
{
"bom-ref": "contact-1",
"name": "Acme Professional Services",
"email": "[email protected]"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata {
contact {
name: "Acme Professional Services"
email: "[email protected]"
bom_ref: "contact-1"
}
bom_ref: "manufacturer-1"
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.5">
<metadata>
<manufacture>
<manufacture bom-ref="manufacturer-1">
<name>Acme, Inc.</name>
<url>https://example.com</url>
<contact>
<contact bom-ref="contact-1">
<name>Acme Professional Services</name>
<email>[email protected]</email>
</contact>
Expand Down
2 changes: 2 additions & 0 deletions tools/src/test/resources/1.5/valid-metadata-supplier-1.5.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"version": 1,
"metadata": {
"supplier": {
"bom-ref": "supplier-1",
"name": "Acme, Inc.",
"url": [
"https://example.com"
],
"contact": [
{
"bom-ref": "contact-1",
"name": "Acme Distribution",
"email": "[email protected]"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata {
contact {
name: "Acme Distribution"
email: "[email protected]"
bom_ref: "contact-1"
}
bom_ref: "supplier-1"
}
}
4 changes: 2 additions & 2 deletions tools/src/test/resources/1.5/valid-metadata-supplier-1.5.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.5">
<metadata>
<supplier>
<supplier bom-ref="supplier-1">
<name>Acme, Inc.</name>
<url>https://example.com</url>
<contact>
<contact bom-ref="contact-1">
<name>Acme Distribution</name>
<email>[email protected]</email>
</contact>
Expand Down