CycloneDX/sbom-utility

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

Ouverte

#49 ouverte le 26 juil. 2023

 (1 commentaire) (0 réaction) (0 personne assignée)Go (20 forks)auto 404
enhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (155 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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."
              }
            }
          }]
        }
      ]
    },

Guide contributeur