{
  "$id": "https://raw.githubusercontent.com/outfitter-dev/skillset/main/docs/reference/schemas/0.1.0/change-entry.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": true,
  "anyOf": [
    {
      "required": [
        "scope"
      ]
    },
    {
      "required": [
        "scopes"
      ]
    }
  ],
  "properties": {
    "bump": {
      "enum": [
        "major",
        "minor",
        "none",
        "patch"
      ],
      "type": "string"
    },
    "evidence": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "properties": {
              "currentHash": {
                "minLength": 1,
                "type": "string"
              },
              "hash": {
                "minLength": 1,
                "type": "string"
              },
              "scope": {
                "minLength": 1,
                "type": "string"
              },
              "sourceHash": {
                "minLength": 1,
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "additionalProperties": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "additionalProperties": true,
                "properties": {
                  "currentHash": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "hash": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "scope": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "sourceHash": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ]
          },
          "properties": {
            "currentHash": {
              "minLength": 1,
              "type": "string"
            },
            "hash": {
              "minLength": 1,
              "type": "string"
            },
            "sourceHash": {
              "minLength": 1,
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "external": {
      "description": "Unsupported legacy issue metadata; use group instead.",
      "type": [
        "array",
        "object",
        "string"
      ]
    },
    "group": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "additionalProperties": false,
          "properties": {
            "id": {
              "minLength": 1,
              "type": "string"
            },
            "provider": {
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "type": "object"
        }
      ]
    },
    "id": {
      "pattern": "^[0-9a-f]{12}$",
      "type": "string"
    },
    "ignored": {
      "type": "boolean"
    },
    "scope": {
      "minLength": 1,
      "type": "string"
    },
    "scopes": {
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "bump"
  ],
  "title": "Change Entry",
  "type": "object"
}
