{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.5/commands/image.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": "image.upsert",
  "description": "Writes an image whole, as it is given, an application record with no revision (Part V, 2.3.1, rule 19). Its precondition, where given and in an envelope, is its record's hash as read, null for a new one (Part XVII, 9.2).",
  "type": "object",
  "properties": {
    "kind": {
      "const": "image.upsert"
    },
    "image": {
      "$ref": "../application-record.schema.json"
    },
    "expectedHash": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "description": "The hash (Part III, 6) of the image's record as read; null for a new image."
    }
  },
  "required": [
    "kind",
    "image"
  ],
  "additionalProperties": false
}
