Skip to content

Commit 561c8dd

Browse files
committed
docs
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 7701a10 commit 561c8dd

File tree

3 files changed

+38
-15
lines changed

3 files changed

+38
-15
lines changed

schema/bom-1.7.proto

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,14 @@ message LicenseChoice {
384384
oneof choice {
385385
// A license
386386
License license = 1;
387-
// A valid SPDX license expression. Refer to https://spdx.org/specifications for syntax requirements
387+
// A valid SPDX license expression. Refer to https://spdx.org/specifications for syntax requirements.
388388
string expression = 2;
389389
// TODO
390390
ExpressionDetailed expression_detailed = 5;
391391
}
392-
// This field must only be used when "expression" is chosen as the License object has its own acknowledgement.
392+
// This field must only be used when `expression` is chosen as the other options have their own acknowledgement.
393393
optional LicenseAcknowledgementEnumeration acknowledgement = 3;
394-
// This field must only be used when "expression" is chosen as the License object has its own bom_ref.
394+
// This field must only be used when `expression` is chosen as the other options have their own bom_ref.
395395
optional string bom_ref = 4;
396396
}
397397

@@ -417,22 +417,31 @@ message License {
417417
optional LicenseAcknowledgementEnumeration acknowledgement = 8;
418418
}
419419

420+
// Specifies the details and attributes related to a software license. It must be a valid SPDX license expression, along with additional properties such as license acknowledgment.
420421
message ExpressionDetailed {
421-
// TODO
422+
423+
// Specifies the details and attributes related to a software license identifier.
424+
// (An SPDX expression may be a compound of license identifiers.)
422425
message ExpressionDetails {
423-
// TODO
426+
// A valid SPDX license identifier. Refer to https://spdx.org/specifications for syntax requirements.
427+
// Example values:
428+
// - "Apache-2.0",
429+
// - "GPL-3.0-only WITH Classpath-exception-2.0"
424430
string license_identifier = 1;
425431
// Specifies the optional full text of the attachment
426432
optional AttachedText text = 2;
427433
}
428434

429-
// A valid SPDX license expression. Refer to https://spdx.org/specifications for syntax requirements
435+
// A valid SPDX license expression. Refer to https://spdx.org/specifications for syntax requirements.
436+
// Example values:
437+
// - "Apache-2.0 AND (MIT OR GPL-2.0-only)",
438+
// - "GPL-3.0-only WITH Classpath-exception-2.0"
430439
string expression = 1;
431440
// An optional identifier which can be used to reference the license elsewhere in the BOM. Uniqueness is enforced within all elements and children of the root-level bom element.
432441
optional string bom_ref = 2;
433442
// Declared licenses and concluded licenses represent two different stages in the licensing process within software development. Declared licenses refer to the initial intention of the software authors regarding the licensing terms under which their code is released. On the other hand, concluded licenses are the result of a comprehensive analysis of the project's codebase to identify and confirm the actual licenses of the components used, which may differ from the initially declared licenses. While declared licenses provide an upfront indication of the licensing intentions, concluded licenses offer a more thorough understanding of the actual licensing within a project, facilitating proper compliance and risk management. Observed licenses are defined in `@.evidence.licenses`. Observed licenses form the evidence necessary to substantiate a concluded license.
434443
optional LicenseAcknowledgementEnumeration acknowledgement = 3;
435-
// TODO
444+
// Details for parts of the `expression`.
436445
repeated ExpressionDetails details = 4;
437446
}
438447

schema/bom-1.7.schema.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,24 +1486,26 @@
14861486
"expression": {
14871487
"type": "string",
14881488
"title": "SPDX License Expression",
1489-
"description": "A valid SPDX license expression.\nRefer to https://spdx.org/specifications for syntax requirements",
1489+
"description": "A valid SPDX license expression.\nRefer to https://spdx.org/specifications for syntax requirements.",
14901490
"examples": [
14911491
"Apache-2.0 AND (MIT OR GPL-2.0-only)",
14921492
"GPL-3.0-only WITH Classpath-exception-2.0"
14931493
]
14941494
},
14951495
"expressionDetails": {
1496-
"title": "expression details",
1496+
"title": "Expression Details",
1497+
"description": "Details for parts of the `expression`.",
14971498
"type": "array",
14981499
"items": {
14991500
"type": "object",
1501+
"description": "Specifies the details and attributes related to a software license identifier.\n(An SPDX expression may be a compound of license identifiers.)",
15001502
"required": [
15011503
"licenseIdentifier"
15021504
],
15031505
"properties": {
15041506
"licenseIdentifier": {
15051507
"title": "License Identifier",
1506-
"description": "TODO",
1508+
"description": "A valid SPDX license identifier. Refer to https://spdx.org/specifications for syntax requirements.",
15071509
"type": "string",
15081510
"examples": [
15091511
"Apache-2.0",

schema/bom-1.7.xsd

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ limitations under the License.
971971
<xs:extension base="xs:normalizedString">
972972
<xs:annotation>
973973
<xs:documentation>A valid SPDX license expression.
974-
Refer to https://spdx.org/specifications for syntax requirements
974+
Refer to https://spdx.org/specifications for syntax requirements.
975975

976976
Example values:
977977
- Apache-2.0 AND (MIT OR GPL-2.0-only)
@@ -984,9 +984,21 @@ limitations under the License.
984984
</xs:complexType>
985985

986986
<xs:complexType name="expressionDetailedType">
987+
<xs:annotation>
988+
<xs:documentation>Specifies the details and attributes related to a software license. It must be a valid SPDX license expression, along with additional properties such as license acknowledgment.</xs:documentation>
989+
</xs:annotation>
987990
<xs:sequence>
988991
<xs:element name="details" minOccurs="0" maxOccurs="unbounded">
992+
<xs:annotation>
993+
<xs:documentation>Details for parts of the `expression`.</xs:documentation>
994+
</xs:annotation>
989995
<xs:complexType>
996+
<xs:annotation>
997+
<xs:documentation>
998+
Specifies the details and attributes related to a software license identifier.
999+
(An SPDX expression may be a compound of license identifiers.)
1000+
</xs:documentation>
1001+
</xs:annotation>
9901002
<xs:sequence>
9911003
<xs:element name="text" type="bom:attachedTextType" minOccurs="0" maxOccurs="1">
9921004
<xs:annotation>
@@ -1004,10 +1016,10 @@ limitations under the License.
10041016
<xs:attribute name="license-identifier" type="xs:normalizedString" use="required">
10051017
<xs:annotation>
10061018
<xs:documentation>
1007-
TODO
1019+
A valid SPDX license identifier. Refer to https://spdx.org/specifications for syntax requirements.
10081020

1009-
Examples:
1010-
- Apache-2.0
1021+
Example values:
1022+
- Apache-2.0"
10111023
- GPL-3.0-only WITH Classpath-exception-2.0
10121024
</xs:documentation>
10131025
</xs:annotation>
@@ -1026,7 +1038,7 @@ limitations under the License.
10261038
<xs:attribute name="expression" type="xs:normalizedString" use="required">
10271039
<xs:annotation>
10281040
<xs:documentation>A valid SPDX license expression.
1029-
Refer to https://spdx.org/specifications for syntax requirements
1041+
Refer to https://spdx.org/specifications for syntax requirements.
10301042

10311043
Example values:
10321044
- Apache-2.0 AND (MIT OR GPL-2.0-only)

0 commit comments

Comments
 (0)