{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "OpenAgentWorks migration",
  "type": "object",
  "properties": {
    "from_product_version": {
      "type": "string",
      "minLength": 1
    },
    "to_product_version": {
      "type": "string",
      "minLength": 1
    },
    "from_profile_version": {
      "type": "string",
      "minLength": 1
    },
    "to_profile_version": {
      "type": "string",
      "minLength": 1
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "record_id": {
            "type": "string",
            "minLength": 1
          },
          "change": {
            "enum": [
              "added",
              "changed",
              "retired"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "replacement_refs": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "record_id",
          "change",
          "reason",
          "replacement_refs"
        ],
        "additionalProperties": false
      }
    },
    "data_migration_obligations": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "rollback_rule": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "from_product_version",
    "to_product_version",
    "from_profile_version",
    "to_profile_version",
    "changes",
    "data_migration_obligations",
    "rollback_rule"
  ],
  "additionalProperties": false
}
