Skip to content

protobuf Metadata licenses should be repeated #264

@b-grooters-byte

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions