{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "corpus identifier version mapping",
  "description": "Maps prior-version identifiers to their successors. Only ids whose form changed are listed; per 'default_resolution', any id absent from 'mappings' is unchanged and resolves to itself, so the mapping is total over the prior version's identifiers.",
  "type": "object",
  "required": [
    "from_version",
    "to_version",
    "default_resolution",
    "mappings"
  ],
  "properties": {
    "from_version": {
      "type": "string"
    },
    "to_version": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "default_resolution": {
      "enum": [
        "identity"
      ],
      "description": "How to resolve a prior-version id not present in 'mappings'. 'identity' means it is unchanged and maps to itself."
    },
    "default_resolution_note": {
      "type": "string"
    },
    "mappings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "from",
          "status"
        ],
        "properties": {
          "from": {
            "type": "string",
            "description": "prior-version id"
          },
          "status": {
            "enum": [
              "unchanged",
              "moved",
              "renamed",
              "split",
              "merged",
              "tombstone"
            ]
          },
          "to": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "successor id(s); empty for a tombstone"
          },
          "reason": {
            "type": "string"
          }
        }
      }
    }
  }
}
