Update seating plan schema

This commit is contained in:
Raphael Michel
2019-07-27 16:48:41 +02:00
parent 34d1fcf077
commit 26726043c2

View File

@@ -34,16 +34,12 @@
"definitions": { "definitions": {
"zone": { "zone": {
"type": "object", "type": "object",
"description": "Zone represents the parent entity that groups all other entities. The zone itself can be hidden or displayed. Examples of different zones would be 'main area', 'balcony', etc.", "description": "Zone represents the parent entity that groups all other entities. Examples of different zones would be 'main area', 'balcony', etc.",
"properties": { "properties": {
"name": { "name": {
"type": "string", "type": "string",
"description": "Name of the zone" "description": "Name of the zone"
}, },
"displayed": {
"type": "boolean",
"description": "Should the zone outlines be displayed or not?"
},
"position": { "$ref": "#/definitions/position" }, "position": { "$ref": "#/definitions/position" },
"rows": { "rows": {
"type": "array", "type": "array",
@@ -58,7 +54,8 @@
"row_number_position": { "row_number_position": {
"type": ["string", "null"], "type": ["string", "null"],
"enum": ["left", "right", null], "enum": ["left", "right", null],
"description": "Should the row numbers be hidden?" "description": "Should the row numbers be hidden?",
"$comment": "Currently not implemented."
} }
}, },
"required": ["position", "rows"], "required": ["position", "rows"],
@@ -67,7 +64,6 @@
"row": { "row": {
"type": "object", "type": "object",
"description": "Row is simply a collection of seats with some additional information that simplifies working with seats.", "description": "Row is simply a collection of seats with some additional information that simplifies working with seats.",
"$comment": "Might need more (editor) infromation like direction, angle, curvature",
"properties": { "properties": {
"row_number": { "row_number": {
"type": "string", "type": "string",
@@ -78,13 +74,9 @@
"description": "List of seats in this row", "description": "List of seats in this row",
"items": { "$ref": "#/definitions/seat" } "items": { "$ref": "#/definitions/seat" }
}, },
"number_of_seats": {
"type": "integer",
"$comment": "This property might be redundant. Since the seats are nested within the row, it's easy to just count them."
},
"seats_spacing": { "seats_spacing": {
"type": "integer", "type": "integer",
"description": "How far apart should the seats be positioned?" "description": "How far apart should the seats be positioned? This value is ignored for rendering, it is just useful to keep to modify the row later."
}, },
"row_number_position": { "row_number_position": {
"type": ["string", "null"], "type": ["string", "null"],
@@ -110,6 +102,10 @@
"type": "string", "type": "string",
"description": "Human-readable seat number." "description": "Human-readable seat number."
}, },
"radius": {
"type": "integer",
"description": "Defaults to 10"
},
"position": { "$ref": "#/definitions/position" }, "position": { "$ref": "#/definitions/position" },
"category": { "category": {
"type": "string", "type": "string",
@@ -122,11 +118,13 @@
"area": { "area": {
"type": "object", "type": "object",
"description": "Area can represent anything from general admission area, to stage, bar or even tables.", "description": "Area can represent anything from general admission area, to stage, bar or even tables.",
"$comment": "TODO needs a definition: should it be defined with parameters or with a free-form svg?",
"properties": { "properties": {
"color": { "type": "string" }, "color": { "type": "string" },
"border_color": { "type": "string" }, "border_color": { "type": "string" },
"rotation": { "type": "number" }, "rotation": {
"type": "number",
"description": "Rotation of the shape in degrees clockwise around the point specified in position."
},
"position": { "position": {
"$ref": "#/definitions/position" "$ref": "#/definitions/position"
}, },
@@ -181,6 +179,10 @@
"properties": { "properties": {
"text": { "type": "string" }, "text": { "type": "string" },
"color": { "type": "string" }, "color": { "type": "string" },
"size": {
"type": "integer",
"description": "Defaults to 16"
},
"position": { "position": {
"$ref": "#/definitions/position" "$ref": "#/definitions/position"
} }
@@ -196,10 +198,10 @@
"description": "Position of the element", "description": "Position of the element",
"properties": { "properties": {
"x": { "x": {
"type": "integer" "type": "number"
}, },
"y": { "y": {
"type": "integer" "type": "number"
} }
}, },
"required": ["x", "y"], "required": ["x", "y"],