Skip to content

protobuf Metadata licenses should be repeated #264

Closed

Description

@b-grooters-byte

The protobuf specification for bom MetaData does not appear match the XML and JSON specifications. It seems that the licenses field should be a repeated, rather than optional, field in the MetaData to match the JSON and XML schema specification for the same field.
Proto:

message LicenseChoice {
  oneof choice {
    License license = 1;
    string expression = 2;
  }
}

message Metadata {
 ...
  // The license information for the BOM document
  optional LicenseChoice licenses = 7;
  // Specifies optional, custom, properties
  repeated Property properties = 8;
}

JSON:

"metadata": {
      "type": "object",
      "title": "BOM Metadata Object",

"licenses": {
          "type": "array",
          "title": "BOM License(s)",
          "additionalItems": false,
          "items": {"$ref": "#/definitions/licenseChoice"}
        },

A similar apparent discrepancy appears in the v1.5 specifications from proto to JSON.

Activity

  1. added
    CDX 1.5
    CDX 1.4
    CDX 1.3
    on Jul 12, 2023
  2. removed
    CDX 1.5
    CDX 1.4
    on Oct 15, 2023
  3. added this to the 1.6 milestone on Feb 28, 2024
  4. jkowalleck commented on Feb 28, 2024

    @jkowalleck
    Member

    looks like a low hanging fruit.
    i might work on this for 1.6, as soon as #385 is in

  5. self-assigned this
    on Mar 18, 2024
  6. linked a pull request that will close this issuefix: protobuf `Metadata.licenses` repeated #401on Mar 18, 2024
  7. added a commit that references this issue on Mar 23, 2024
    7a9208a
  8. added a commit that references this issue on Apr 9, 2024
  9. added a commit that references this issue on Jan 27, 2026
  10. added 2 commits that reference this issue on Feb 23, 2026
    8a72691
    1d5c493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions