{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.6/commands/wall.attach.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": "wall.attach",
  "description": "Attaches a wall's top to a face of a roof, a slab, a foundation or a ceiling (Part V, 2.3.1, rule 12; Part II, 6.4): its top.attach becomes {hostId, face, offset, mode}, offset and mode where given and offset not 0; hostId null or left out lets the top go. Run as an update.",
  "type": "object",
  "properties": {
    "kind": {
      "const": "wall.attach"
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "x-eik-ref": "element"
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "description": "The element's revision as read."
    },
    "hostId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        },
        {
          "type": "null"
        }
      ],
      "description": "The roof, slab, foundation or ceiling; null, or left out, lets the top go."
    },
    "expectedHostRevision": {
      "type": "integer",
      "minimum": 0,
      "description": "The host's revision as read; given with hostId."
    },
    "face": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "underside",
            "top"
          ]
        },
        {
          "type": "object",
          "properties": {
            "layerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "layerId"
          ],
          "additionalProperties": false
        }
      ],
      "description": "The host's underside, its top, or the underside of one of its layers; underside where it is left out."
    },
    "offset": {
      "type": "number",
      "minimum": -10000,
      "maximum": 10000,
      "description": "From the face, mm; 0 where it is left out."
    },
    "mode": {
      "type": "string",
      "enum": [
        "raking",
        "level"
      ]
    }
  },
  "required": [
    "kind",
    "id",
    "expectedRevision"
  ],
  "additionalProperties": false
}
