{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://paulkov.github.io/dpone/schemas/gitops/airflow-pod-doctor.schema.json",
  "title": "dpone GitOps Airflow pod doctor contract",
  "type": "object",
  "required": [
    "kind",
    "schema_version",
    "producer",
    "artifact_dir",
    "pod_contract_path",
    "pod_spec_path",
    "kpo_kwargs_path",
    "runner_policy",
    "checks"
  ],
  "properties": {
    "kind": {
      "const": "gitops.airflow_pod_doctor"
    },
    "schema_version": {
      "type": "string"
    },
    "producer": {
      "type": "string"
    },
    "artifact_dir": {
      "type": "string"
    },
    "pod_contract_path": {
      "type": "string"
    },
    "pod_spec_path": {
      "type": "string"
    },
    "kpo_kwargs_path": {
      "type": "string"
    },
    "runner_policy": {
      "type": "string"
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "name",
          "passed",
          "severity",
          "message",
          "path",
          "source"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "passed": {
            "type": "boolean"
          },
          "severity": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/issue"
      }
    },
    "blockers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/issue"
      }
    }
  },
  "$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
}
