{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.5/commands/reference.upsert.schema.json",
  "$comment": "OpenEik 0.5: folded by tools/fold-schemas-0.5.mjs from the proposal domainCommands, which 0.5 makes a rule (open questions, 139). Written by hand, not generated.",
  "title": "reference.upsert",
  "description": "Writes a linked reference whole, an application record (Part V, 2.3.1, rule 19): one that is there in its place at its revision plus one, a new one at the end at revision 0. The precondition is strict (Part V, 3, rule 2): expectedRevision is given exactly when the reference exists.",
  "type": "object",
  "properties": {
    "kind": {
      "const": "reference.upsert"
    },
    "reference": {
      "$ref": "../application-record.schema.json"
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "description": "The reference's revision as read; given exactly when it exists."
    }
  },
  "required": [
    "kind",
    "reference"
  ],
  "additionalProperties": false
}
