maze-generator/src/main/resources/maze.schema.json
Manuel Friedli ae7dfe7c3c
All checks were successful
continuous-integration/drone/push Build is passing
Updating tons of dependencies.
2026-01-23 23:31:30 +01:00

101 lines
2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://manuel.friedli.info/maze/maze.schema.json",
"javaType": "ch.fritteli.maze.generator.json.JsonMaze",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"algorithm",
"width",
"height",
"start",
"end",
"grid"
],
"properties": {
"id": {
"type": "string",
"description": "64 bit precision unsigned integer value. Transmitted as a hexadecimal string."
},
"algorithm": {
"type": "string",
"description": "The name of the algorithm used to generate the maze."
},
"width": {
"type": "integer",
"minimum": 1
},
"height": {
"type": "integer",
"minimum": 1
},
"start": {
"$ref": "#/$defs/coordinates"
},
"end": {
"$ref": "#/$defs/coordinates"
},
"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.maze.generator.json.JsonCell",
"additionalProperties": false,
"required": [],
"properties": {
"top": {
"type": "boolean"
},
"right": {
"type": "boolean"
},
"bottom": {
"type": "boolean"
},
"left": {
"type": "boolean"
},
"solution": {
"type": "boolean"
}
}
},
"coordinates": {
"type": "object",
"javaType": "ch.fritteli.maze.generator.json.JsonCoordinates",
"additionalProperties": false,
"required": [
"x",
"y"
],
"properties": {
"x": {
"type": "integer",
"minimum": 0
},
"y": {
"type": "integer",
"minimum": 0
}
}
}
}
}