Skip to content

Commit

Permalink
fix #288 (#292)
Browse files Browse the repository at this point in the history
proposed fix for #288 
and regression tests

in contrast to #289
  • Loading branch information
stevespringett committed Feb 5, 2024
2 parents abc03a5 + fe7512f commit 46ff114
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
4 changes: 2 additions & 2 deletions schema/bom-1.6.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -690,12 +690,12 @@ limitations under the License.
<xs:complexType name="licenseType">
<xs:sequence>
<xs:choice>
<xs:element name="id" type="spdx:licenseId" minOccurs="0" maxOccurs="1">
<xs:element name="id" type="spdx:licenseId" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>A valid SPDX license ID</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="name" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
<xs:element name="name" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:documentation>If SPDX does not define the license used, this field may be used to provide the license name</xs:documentation>
</xs:annotation>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"bomFormat": "CycloneDX",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
"version": 1,
"components": [
{
"name": "license-with-no-id-nor-name",
"version": "23",
"description": "testcase for issue#288",
"licenses": [
{
"license": {}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
spec_version: "1.6"
version: 1
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
components {
type: CLASSIFICATION_LIBRARY
name: "license-with-no-id-nor-name"
version: "23"
description: "testcase for issue#288"
licenses {
license {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6">
<components>
<component type="library">
<name>license-with-no-id-nor-name</name>
<version>23</version>
<description>testcase for issue#288</description>
<licenses>
<license />
</licenses>
</component>
</components>
</bom>

0 comments on commit 46ff114

Please sign in to comment.