{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.2/commands/level.delete.schema.json",
  "$comment": "Written by hand from Part V and the member names of the reference vocabulary; tools/generate-schemas.mjs does not make it yet (schemas/commands/README.md).",
  "title": "level.delete",
  "description": "Removes a level with its plans; refused while anything stands on it or reaches up to it, unless moveTo names the level they move to (Part V, 5.4). A member the kind does not define is refused, not dropped (Part V, 1.4).",
  "type": "object",
  "properties": {
    "kind": {
      "const": "level.delete"
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "x-eik-ref": "level"
    },
    "expectedLevel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "elevation": {
          "type": "number"
        }
      },
      "required": [
        "id",
        "name",
        "elevation"
      ]
    },
    "moveTo": {
      "type": "string",
      "minLength": 1,
      "x-eik-ref": "level"
    }
  },
  "required": [
    "kind",
    "id",
    "expectedLevel"
  ],
  "additionalProperties": false
}
