{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/drupal-migration/latest.json",
  "title": "JSON schema for Drupal migration files",
  "x-lintel": {
    "source": "https://www.schemastore.org/drupal-migration.json",
    "sourceSha256": "5e296b9b65da6b6d0bf60fc8eba2482f5d0ca0f3c9490ba71a523d0befaff45a",
    "fileMatch": [
      "*.migration.*.yml",
      "**/migrations/*.yml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "id": {
      "title": "The migration ID (machine name)",
      "type": "string"
    },
    "label": {
      "title": "The human-readable label for the migration",
      "type": "string"
    },
    "audit": {
      "title": "Whether the migration is auditable",
      "type": "boolean"
    },
    "migration_tags": {
      "title": "List of tags, used by the plugin manager for filtering",
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "deriver": {
      "title": "Deriver class",
      "type": "string"
    },
    "source": {
      "title": "The source plugin configuration",
      "type": "object",
      "properties": {
        "plugin": {
          "title": "Source plugin ID",
          "type": "string"
        }
      },
      "required": [
        "plugin"
      ]
    },
    "process": {
      "title": "The configuration describing the process plugins",
      "type": "object"
    },
    "destination": {
      "title": "The destination plugin configuration",
      "type": [
        "object"
      ],
      "properties": {
        "plugin": {
          "title": "Destination plugin ID",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "plugin"
      ]
    },
    "migration_dependencies": {
      "title": "Migrations to run before this migration",
      "type": "object",
      "properties": {
        "required": {
          "title": "List of migration IDs that must be run before this migration",
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "optional": {
          "title": "List of migration IDs that, if they exist, must be run before",
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      }
    },
    "dependencies": {
      "title": "The migration's dependencies",
      "type": "object",
      "properties": {
        "config": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "module": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "theme": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "content": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "enforced": {
          "type": "object",
          "properties": {
            "config": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "uniqueItems": true
            },
            "module": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "uniqueItems": true
            },
            "theme": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "uniqueItems": true
            },
            "content": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "uniqueItems": true
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "provider": {
      "title": "List of plugin providers",
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "class": {
      "title": "Class for migration implementation",
      "type": [
        "string",
        "null"
      ]
    }
  }
}
