CycloneDX / CycloneDX/sbom-utility

Testcase: Need test for new complex "licenseChoice" schema defn.

Open
#49 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
Go
Stars
163
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Need a testcase to validate the change of the "licenseChoice" schema defn.

*Note*: license "expression" is no longer a "string" type, but an "object" now with a "bom-ref".

```
"licenseChoice": {
"title": "License Choice",
"description": "EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression)",
"type": "array",
"oneOf": [
{
"title": "Multiple licenses",
"description": "A list of SPDX licenses and/or named licenses.",
"type": "array",
"items": {
"type": "object",
"required": ["license"],
"additionalProperties": false,
"properties": {
"license": {"$ref": "#/definitions/license"}
}
}
},
{
"title": "SPDX License Expression",
"description": "A tuple of exactly one SPDX License Expression.",
"type": "array",
"additionalItems": false,
"minItems": 1,
"maxItems": 1,
"items": [{
"type": "object",
"additionalProperties": false,
"required": ["expression"],
"properties": {
"expression": {
"type": "string",
"title": "SPDX License Expression",
"examples": [
"Apache-2.0 AND (MIT OR GPL-2.0-only)",
"GPL-3.0-only WITH Classpath-exception-2.0"
]
},
"bom-ref": {
"$ref": "#/definitions/refType",
"title": "BOM Reference",
"description": "An optional identifier which can be used to reference the license elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
}
}
}]
}
]
},

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.