{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://manuel.friedli.info/labyrinth-1/labyrinth.schema.json",
  "javaType": "ch.fritteli.labyrinth.generator.json.JsonLabyrinth",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "width",
    "height",
    "grid"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "64 bit precision signed integer value. Transmitted as string, because ECMAScript (browsers) don't normally handle 64 bit integers well, as the ECMAScript 'number' type is a 64 bit signed double value, leaving only 53 bits for the integer part, thus losing precision."
    },
    "width": {
      "type": "integer",
      "minimum": 1
    },
    "height": {
      "type": "integer",
      "minimum": 1
    },
    "grid": {
      "$ref": "#/$defs/grid"
    }
  },
  "$defs": {
    "grid": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/row"
      },
      "minItems": 1
    },
    "row": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/cell"
      },
      "minItems": 1
    },
    "cell": {
      "type": "object",
      "javaType": "ch.fritteli.labyrinth.generator.json.JsonCell",
      "additionalProperties": false,
      "required": [],
      "properties": {
        "top": {
          "type": "boolean"
        },
        "right": {
          "type": "boolean"
        },
        "bottom": {
          "type": "boolean"
        },
        "left": {
          "type": "boolean"
        },
        "solution": {
          "type": "boolean"
        }
      }
    }
  }
}