{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/oss-review-toolkit-resolutions/latest.json",
  "title": "ORT resolutions",
  "description": "The OSS-Review-Toolkit (ORT) provides a possibility to resolve issues, rule violations and security vulnerabilities in a resolutions file. A full list of all available options can be found at <https://oss-review-toolkit.org/ort/docs/configuration/resolutions>.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/oss-review-toolkit/ort/main/integrations/schemas/resolutions-schema.json",
    "sourceSha256": "8c0813bbea06a4e544c50fd776eb0158c17dae5670270e8ae757bdab82c3d0a6",
    "fileMatch": [
      "resolutions.yml",
      "resolutions.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "issues": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/$defs/issueResolutionReason"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "reason"
        ]
      }
    },
    "rule_violations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/$defs/ruleViolationResolutionReason"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "reason"
        ]
      }
    },
    "vulnerabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/$defs/vulnerabilityResolutionReason"
          },
          "comment": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "reason"
        ]
      }
    }
  },
  "anyOf": [
    {
      "required": [
        "issues"
      ]
    },
    {
      "required": [
        "rule_violations"
      ]
    },
    {
      "required": [
        "vulnerabilities"
      ]
    }
  ],
  "$defs": {
    "issueResolutionReason": {
      "enum": [
        "BUILD_TOOL_ISSUE",
        "CANT_FIX_ISSUE",
        "SCANNER_ISSUE"
      ]
    },
    "ruleViolationResolutionReason": {
      "enum": [
        "CANT_FIX_EXCEPTION",
        "DYNAMIC_LINKAGE_EXCEPTION",
        "EXAMPLE_OF_EXCEPTION",
        "LICENSE_ACQUIRED_EXCEPTION",
        "NOT_MODIFIED_EXCEPTION",
        "PATENT_GRANT_EXCEPTION"
      ]
    },
    "vulnerabilityResolutionReason": {
      "enum": [
        "CANT_FIX_VULNERABILITY",
        "INEFFECTIVE_VULNERABILITY",
        "INVALID_MATCH_VULNERABILITY",
        "MITIGATED_VULNERABILITY",
        "NOT_A_VULNERABILITY",
        "WILL_NOT_FIX_VULNERABILITY",
        "WORKAROUND_FOR_VULNERABILITY"
      ]
    }
  }
}
