diff --git a/schema/bom-1.6.xsd b/schema/bom-1.6.xsd index 8d1ded1e..c3c9b230 100644 --- a/schema/bom-1.6.xsd +++ b/schema/bom-1.6.xsd @@ -690,12 +690,12 @@ limitations under the License. - + A valid SPDX license ID - + If SPDX does not define the license used, this field may be used to provide the license name diff --git a/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.json b/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.json new file mode 100644 index 00000000..65b72d31 --- /dev/null +++ b/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.json @@ -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": {} + } + ] + } + ] +} diff --git a/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto b/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto new file mode 100644 index 00000000..14f6a657 --- /dev/null +++ b/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.textproto @@ -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 {} + } +} \ No newline at end of file diff --git a/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.xml b/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.xml new file mode 100644 index 00000000..34fff4ec --- /dev/null +++ b/tools/src/test/resources/1.6/invalid-license-missing-id-and-name-1.6.xml @@ -0,0 +1,13 @@ + + + + + license-with-no-id-nor-name + 23 + testcase for issue#288 + + + + + + \ No newline at end of file