{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://paulkov.github.io/dpone/schemas/gitops/airflow-reconcile.schema.json",
  "title": "dpone GitOps Airflow reconcile report",
  "type": "object",
  "required": [
    "kind",
    "schema_version",
    "producer",
    "workload_set",
    "env",
    "affected_workloads",
    "packs",
    "dag_specs",
    "warnings",
    "blockers"
  ],
  "properties": {
    "kind": {
      "const": "gitops.airflow_reconcile"
    },
    "schema_version": {
      "const": "1"
    },
    "producer": {
      "const": "dpone gitops airflow reconcile"
    },
    "workload_set": {
      "type": "string"
    },
    "env": {
      "type": "string"
    },
    "selection_mode": {
      "enum": [
        "affected",
        "all"
      ]
    },
    "affected_workloads": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "packs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "dag_specs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/issue"
      }
    },
    "blockers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/issue"
      }
    },
    "meta": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "$defs": {
    "issue": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "code",
        "message",
        "path",
        "source"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "source": {
          "type": "string"
        }
      }
    }
  },
  "additionalProperties": true
}
