32 lines
1.4 KiB
JSON
32 lines
1.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://entroia.local/schemas/poster-document-v1.json",
|
|
"title": "PosterDocument",
|
|
"type": "object",
|
|
"required": ["schema", "version", "id", "seed", "canvas", "layers"],
|
|
"properties": {
|
|
"schema": { "const": "entroia.poster-document" },
|
|
"version": { "const": 1 },
|
|
"id": { "type": "string", "minLength": 1 },
|
|
"seed": { "type": "string", "minLength": 1 },
|
|
"canvas": {
|
|
"type": "object", "required": ["width", "height"],
|
|
"properties": { "width": { "type": "number", "exclusiveMinimum": 0 }, "height": { "type": "number", "exclusiveMinimum": 0 }, "background": { "type": "string" } }
|
|
},
|
|
"layers": { "type": "array", "items": { "$ref": "#/$defs/layer" } },
|
|
"bindings": { "type": "object" }, "meta": { "type": "object" }
|
|
},
|
|
"$defs": {
|
|
"layer": {
|
|
"type": "object", "required": ["id", "type"],
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"type": { "enum": ["background", "group", "image", "vector", "text", "sticker", "brush"] },
|
|
"visible": { "type": "boolean" }, "locked": { "type": "boolean" }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
"tags": { "type": "array", "items": { "type": "string" } },
|
|
"children": { "type": "array", "items": { "$ref": "#/$defs/layer" } }
|
|
}, "additionalProperties": true
|
|
}
|
|
}
|
|
}
|