{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.6/storeProtocol/ref-moved.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, answered",
  "description": "The answer to POST …/refs/{name} (Part VI, 6.8.5, rule 3): whether the ref moved, and the version it names now, with the status 200 either way.",
  "type": "object",
  "properties": {
    "ok": {
      "const": true,
      "description": "The call was answered as asked (Part VI, 6.8.1, rule 4)."
    },
    "moved": {
      "type": "boolean",
      "description": "Whether the ref named expected, and so moved."
    },
    "current": {
      "description": "The version the ref names now: hash where it moved, the one it names where it did not.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "ok",
    "moved",
    "current"
  ]
}
