Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: protobuf Metadata.licenses repeated #401

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schema/bom-1.6.proto
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ message Metadata {
// The organization that supplied the component that the BOM describes. The supplier may often be the manufacture, but may also be a distributor or repackager.
optional OrganizationalEntity supplier = 6;
// The license information for the BOM document. This may be different from the license(s) of the component(s) that the BOM describes.
optional LicenseChoice licenses = 7;
repeated LicenseChoice licenses = 7;
// Specifies optional, custom, properties
repeated Property properties = 8;
// Lifecycles communicate the stage(s) in which data in the BOM was captured. Different types of data may be available at various phases of a lifecycle, such as the Software Development Lifecycle (SDLC), IT Asset Management (ITAM), and Software Asset Management (SAM). Thus, a BOM may include data specific to or only obtainable in a given lifecycle.
Expand Down
8 changes: 8 additions & 0 deletions tools/src/test/resources/1.6/valid-metadata-license-1.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
"license": {
"id": "Apache-2.0"
}
},
{
"license": {
"name": "My License",
"text": {
"content": "My License Text"
}
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ metadata {
id: "Apache-2.0"
}
}
licenses {
license {
name: "My License"
text {
value: "My License Text"
}
}
}
}
10 changes: 8 additions & 2 deletions tools/src/test/resources/1.6/valid-metadata-license-1.6.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<?xml version="1.0"?>
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6">
<bom xmlns="http://cyclonedx.org/schema/bom/1.6"
serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1"
>
<metadata>
<licenses>
<license>
<id>Apache-2.0</id>
</license>
<license>
<name>My License</name>
<text>My License Text</text>
</license>
</licenses>
</metadata>
<components />
<components/>
</bom>