{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://paulkov.github.io/dpone/schemas/gitops/airflow-authoring-migration-plan.schema.json",
  "title": "dpone GitOps Airflow authoring migration plan",
  "type": "object",
  "required": [
    "kind",
    "schema",
    "mode",
    "apply",
    "source_path",
    "summary",
    "changes"
  ],
  "additionalProperties": true,
  "properties": {
    "kind": {
      "const": "dpone.airflow-authoring-migration-plan.v1"
    },
    "schema": {
      "const": "dpone.airflow-authoring-migration-plan.v1"
    },
    "mode": {
      "const": "plan"
    },
    "apply": {
      "const": false
    },
    "source_path": {
      "type": "string"
    },
    "summary": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "legacy_sections",
        "manual_review_required",
        "apply_supported"
      ],
      "properties": {
        "legacy_sections": {
          "type": "integer"
        },
        "manual_review_required": {
          "type": "boolean"
        },
        "apply_supported": {
          "type": "boolean"
        }
      }
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "action",
          "path",
          "suggested_connection_ref",
          "detected",
          "proposed_section",
          "manual_review_required",
          "unified_diff"
        ],
        "properties": {
          "action": {
            "const": "replace_legacy_connection_config"
          },
          "path": {
            "type": "string"
          },
          "suggested_connection_ref": {
            "type": "string"
          },
          "detected": {
            "type": "object",
            "additionalProperties": true
          },
          "proposed_section": {
            "type": "object",
            "additionalProperties": true
          },
          "manual_review_required": {
            "type": "boolean"
          },
          "unified_diff": {
            "type": "string"
          }
        }
      }
    }
  }
}
