Skip to content

Commit 36f47c6

Browse files
committed
tests: make medatada.distribution an object
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 318e65c commit 36f47c6

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

schema/bom-1.7.xsd

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,21 +256,23 @@ limitations under the License.
256256
Formal registration is optional.</xs:documentation>
257257
</xs:annotation>
258258
</xs:element>
259-
<xs:complexType name="distributionConstraints" minOccurs="0" maxOccurs="1">
259+
<xs:element name="distributionConstraints" minOccurs="0" maxOccurs="1">
260260
<xs:annotation>
261261
<xs:documentation>Constraints of sharing and distribution of the data that the BOM describes.</xs:documentation>
262262
</xs:annotation>
263-
<xs:sequence>
264-
<xs:element name="tlp" type="bom:tlpClassificationType" default="CLEAR" minOccurs="0" maxOccurs="1">
265-
<xs:annotation>
266-
<xs:documentation>
267-
The Traffic Light Protocol (TLP) classification that controls the sharing and
268-
distribution of the data that the BOM describes.
269-
</xs:documentation>
270-
</xs:annotation>
271-
</xs:element>
272-
</xs:sequence>
273-
</xs:complexType>
263+
<xs:complexType>
264+
<xs:sequence>
265+
<xs:element name="tlp" type="bom:tlpClassificationType" default="CLEAR" minOccurs="0" maxOccurs="1">
266+
<xs:annotation>
267+
<xs:documentation>
268+
The Traffic Light Protocol (TLP) classification that controls the sharing and
269+
distribution of the data that the BOM describes.
270+
</xs:documentation>
271+
</xs:annotation>
272+
</xs:element>
273+
</xs:sequence>
274+
</xs:complexType>
275+
</xs:element>
274276
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
275277
<xs:annotation>
276278
<xs:documentation>

tools/src/test/resources/1.7/valid-metadata-distribution-1.7.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
66
"version": 1,
77
"metadata": {
8-
"distribution": "RED"
8+
"distributionConstraints": {
9+
"tlp": "RED"
10+
}
911
},
1012
"components": []
1113
}

tools/src/test/resources/1.7/valid-metadata-distribution-1.7.textproto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ spec_version: "1.7"
55
version: 1
66
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
77
metadata {
8-
distribution: TLP_CLASSIFICATION_RED
8+
distributionConstraints {
9+
tlp: TLP_CLASSIFICATION_RED
10+
}
911
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?xml version="1.0"?>
22
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.7">
33
<metadata>
4-
<distribution>RED</distribution>
4+
<distributionConstraints>
5+
<tlp>RED</tlp>
6+
</distributionConstraints>
57
</metadata>
68
<components />
79
</bom>

0 commit comments

Comments
 (0)