Skip to content

Commit c974a3c

Browse files
committed
feat: license url
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 41fc9b2 commit c974a3c

6 files changed

+19
-1
lines changed

schema/bom-1.7.proto

+2
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,8 @@ message LicenseExpressionDetailed {
435435
optional string bom_ref = 2;
436436
// An optional way to include the textual content of the license.
437437
optional AttachedText text = 3;
438+
// The URL to the license file. If specified, a 'license' externalReference should also be specified for completeness
439+
optional string url = 4;
438440
}
439441

440442
// A valid SPDX license expression. Refer to https://spdx.org/specifications for syntax requirements.

schema/bom-1.7.schema.json

+7
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,13 @@
15241524
"title": "License texts",
15251525
"description": "An optional way to include the textual content of the license.",
15261526
"$ref": "#/definitions/attachment"
1527+
},
1528+
"url": {
1529+
"type": "string",
1530+
"title": "License URL",
1531+
"description": "The URL to the license file. If specified, a 'license' externalReference should also be specified for completeness",
1532+
"examples": ["https://www.apache.org/licenses/LICENSE-2.0.txt"],
1533+
"format": "iri-reference"
15271534
}
15281535
},
15291536
"additionalProperties": false

schema/bom-1.7.xsd

+6
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,12 @@ limitations under the License.
10081008
<xs:documentation>An optional way to include the textual content of the license.</xs:documentation>
10091009
</xs:annotation>
10101010
</xs:element>
1011+
<xs:element name="url" type="xs:anyURI" minOccurs="0" maxOccurs="1">
1012+
<xs:annotation>
1013+
<xs:documentation>The URL to the attachment file. If the attachment is a license or BOM,
1014+
an externalReference should also be specified for completeness.</xs:documentation>
1015+
</xs:annotation>
1016+
</xs:element>
10111017
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
10121018
<xs:annotation>
10131019
<xs:documentation>

tools/src/test/resources/1.7/valid-license-expression-with-text-1.7.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"licenseIdentifier": "LicenseRef-my-custom-license",
2121
"text": {
2222
"content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
23-
}
23+
},
24+
"url": "https://my-application.example.com/license.txt"
2425
},
2526
{
2627
"licenseIdentifier": "EPL-2.0",

tools/src/test/resources/1.7/valid-license-expression-with-text-1.7.textproto

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ components {
1919
text {
2020
value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
2121
}
22+
url: "https://my-application.example.com/license.txt"
2223
}
2324
details {
2425
license_identifier: "EPL-2.0"

tools/src/test/resources/1.7/valid-license-expression-with-text-1.7.xml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
>
1818
<details license-identifier="LicenseRef-my-custom-license">
1919
<text>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</text>
20+
<url>https://my-application.example.com/license.txt</url>
2021
</details>
2122
<details license-identifier="EPL-2.0">
2223
<text><![CDATA[Eclipse Public License - v 2.0

0 commit comments

Comments
 (0)