{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.4/commands/circuit.upsert.schema.json",
  "$comment": "OpenEik 0.2: folded by tools/fold-schemas.mjs from the proposal electrical, which 0.2 makes a rule (decision D5). Written by hand from the text, not generated.",
  "title": "circuit.upsert",
  "description": "Writes a circuit whole (Part XIII, 9). A new circuit gets revision 0, and a changed one its revision plus one. expectedRevision, when given, names an existing circuit's revision. A member the kind does not define is refused, not dropped (Part V, 1.4).",
  "type": "object",
  "properties": {
    "kind": {
      "const": "circuit.upsert"
    },
    "circuit": {
      "$ref": "../project/circuit.schema.json",
      "description": "The circuit, checked against circuit.schema.json (Part XIII, 3.1)."
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "description": "The circuit's revision as read; refused for a new circuit (Part XIII, 9)."
    }
  },
  "required": [
    "kind",
    "circuit"
  ],
  "additionalProperties": false
}
