{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://paulkov.github.io/dpone/schemas/gitops/airflow-render.schema.json",
  "title": "dpone GitOps Airflow render contract",
  "type": "object",
  "required": [
    "kind",
    "bundle_path",
    "output_dir",
    "image",
    "artifacts",
    "commands"
  ],
  "properties": {
    "kind": {
      "const": "gitops.airflow_render"
    },
    "bundle_path": {
      "type": "string"
    },
    "output_dir": {
      "type": "string"
    },
    "image": {
      "type": "string"
    },
    "artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "path",
          "kind",
          "required",
          "exists",
          "reason"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "exists": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          }
        }
      }
    },
    "commands": {
      "type": "array",
      "items": {
        "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
}
