{
  "$id": "https://dpone.dev/schemas/dpone.dbt-promotion-verification.v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "properties": {
        "code": {
          "const": "DPONE_DBT_PROMOTION_SOURCE_VERIFIED"
        },
        "passed": {
          "const": true
        },
        "status": {
          "const": "passed"
        }
      },
      "required": [
        "status",
        "passed",
        "code"
      ]
    },
    {
      "properties": {
        "code": {
          "const": "DPONE_DBT_PROMOTION_SOURCE_DRIFT"
        },
        "passed": {
          "const": false
        },
        "status": {
          "const": "failed"
        }
      },
      "required": [
        "status",
        "passed",
        "code"
      ]
    }
  ],
  "properties": {
    "code": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string"
    },
    "expected_project_bundle_sha256": {
      "anyOf": [
        {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "observed_project_bundle_sha256": {
      "anyOf": [
        {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "passed": {
      "type": "boolean"
    },
    "release_id": {
      "anyOf": [
        {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "schema": {
      "const": "dpone.dbt-promotion-verification.v1"
    },
    "source_snapshot_sha256": {
      "anyOf": [
        {
          "pattern": "^sha256:[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "enum": [
        "passed",
        "failed"
      ]
    }
  },
  "required": [
    "schema",
    "status",
    "passed",
    "code",
    "release_id",
    "source_snapshot_sha256",
    "expected_project_bundle_sha256",
    "observed_project_bundle_sha256"
  ],
  "type": "object"
}
