Skip to content

Testcase: Need test for new complex "licenseChoice" schema defn. #49

Open
@mrutkows

Description

@mrutkows

Need a testcase to validate the change of the "licenseChoice" schema defn.

Note: license "expression" is no longer a "string" type, but an "object" now with a "bom-ref".

    "licenseChoice": {
      "title": "License Choice",
      "description": "EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression)",
      "type": "array",
      "oneOf": [
        {
          "title": "Multiple licenses",
          "description": "A list of SPDX licenses and/or named licenses.",
          "type": "array",
          "items": {
            "type": "object",
            "required": ["license"],
            "additionalProperties": false,
            "properties": {
              "license": {"$ref": "#/definitions/license"}
            }
          }
        },
        {
          "title": "SPDX License Expression",
          "description": "A tuple of exactly one SPDX License Expression.",
          "type": "array",
          "additionalItems": false,
          "minItems": 1,
          "maxItems": 1,
          "items": [{
            "type": "object",
            "additionalProperties": false,
            "required": ["expression"],
            "properties": {
              "expression": {
                "type": "string",
                "title": "SPDX License Expression",
                "examples": [
                  "Apache-2.0 AND (MIT OR GPL-2.0-only)",
                  "GPL-3.0-only WITH Classpath-exception-2.0"
                ]
              },
              "bom-ref": {
                "$ref": "#/definitions/refType",
                "title": "BOM Reference",
                "description": "An optional identifier which can be used to reference the license elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
              }
            }
          }]
        }
      ]
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions