Implement a JSON and a JSON-file renderer.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Manuel Friedli 2023-04-14 01:14:23 +02:00
parent 81b5d7adac
commit 715d89a57a
6 changed files with 296 additions and 3 deletions

View file

@ -0,0 +1,69 @@
{
"$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": "integer",
"existingJavaType": "java.lang.Long"
},
"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"
}
}
}
}
}