{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/oss-review-toolkit-curation/latest.json",
  "title": "ORT curations",
  "description": "The OSS-Review-Toolkit (ORT) provides a possibility to correct metadata and set the concluded license for a specific packages (dependencies) in curation files. A full list of all available options can be found at <https://oss-review-toolkit.org/ort/docs/configuration/package-curations>.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/curations-schema.json",
    "sourceSha256": "154da9e42e62f9aa72136e897aa4ada36245a6430b4778073eb2d720152fd5ea",
    "fileMatch": [
      "**/curations/**/*.yml",
      "**/curations/**/*.yaml",
      "curations.yml",
      "curations.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string"
      },
      "curations": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string"
          },
          "authors": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              }
            ]
          },
          "concluded_license": {
            "type": "string"
          },
          "cpe": {
            "type": "string"
          },
          "declared_license_mapping": {
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "homepage_url": {
            "type": "string"
          },
          "purl": {
            "type": "string"
          },
          "binary_artifact": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "hash": {
                "$ref": "#/$defs/hash"
              }
            },
            "required": [
              "hash",
              "url"
            ]
          },
          "source_artifact": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "hash": {
                "$ref": "#/$defs/hash"
              }
            },
            "required": [
              "hash",
              "url"
            ]
          },
          "vcs": {
            "$ref": "#/$defs/vcsMatcher"
          },
          "is_metadata_only": {
            "type": "boolean"
          },
          "is_modified": {
            "type": "boolean"
          },
          "source_code_origins": {
            "type": "array",
            "items": {
              "enum": [
                "ARTIFACT",
                "VCS"
              ]
            }
          },
          "labels": {
            "type": "object"
          }
        }
      }
    },
    "required": [
      "id",
      "curations"
    ]
  },
  "$defs": {
    "vcsMatcher": {
      "anyOf": [
        {
          "required": [
            "type"
          ]
        },
        {
          "required": [
            "url"
          ]
        },
        {
          "required": [
            "revision"
          ]
        },
        {
          "required": [
            "path"
          ]
        }
      ],
      "properties": {
        "path": {
          "type": "string"
        },
        "revision": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "hash": {
      "type": [
        "object"
      ],
      "properties": {
        "value": {
          "type": "string"
        },
        "algorithm": {
          "type": "string"
        }
      },
      "required": [
        "value",
        "algorithm"
      ]
    }
  }
}
