{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.7/storeProtocol/ref-move.schema.json",
  "$comment": "OpenEik 0.5: folded by tools/fold-schemas-0.5.mjs from the proposal storeProtocol, which 0.5 makes a rule (open questions, 28). Written by hand, not generated.",
  "title": "A ref's compare-and-swap",
  "description": "The body of POST …/refs/{name} (Part VI, 6.8.5, rule 3): the version to move the ref to, null to remove it, and the version the ref must name now, null for none.",
  "type": "object",
  "properties": {
    "hash": {
      "description": "The version to move the ref to; null removes the ref.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected": {
      "description": "The version the ref must name for the move to be made; null where it must name none.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "hash",
    "expected"
  ]
}
