{ "$schema": "http://json-schema.org/draft-04/schema#", "id": "http://json-schema.org/automaticmagic/topolys.json#", "title": "Topolys Schema", "description": "Schema for the Topolys Model", "type": "object", "properties": { "vertices": { "type": "array", "items": { "$ref": "#/definitions/Vertex" }, "default": [] }, "edges": { "type": "array", "items": { "$ref": "#/definitions/Edge" }, "default": [] }, "directed_edges": { "type": "array", "items": { "$ref": "#/definitions/DirectedEdge" }, "default": [] }, "wires": { "type": "array", "items": { "$ref": "#/definitions/Wire" }, "default": [] }, "faces": { "type": "array", "items": { "$ref": "#/definitions/Face" }, "default": [] }, "shells": { "type": "array", "items": { "$ref": "#/definitions/Shell" }, "default": [] } }, "definitions": { "Point3D": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } }, "additionalProperties": false, "required": ["x", "y", "z"] }, "Vector3D": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } }, "additionalProperties": false, "required": ["x", "y", "z"] }, "Plane3D": { "type": "object", "properties": { "point": { "$ref": "#/definitions/Point3D" }, "normal": { "$ref": "#/definitions/Vector3D" } }, "additionalProperties": false, "required": ["x", "y", "z"] }, "Vertex": { "type": "object", "properties": { "id": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true }, "point": { "$ref": "#/definitions/Point3D" } }, "additionalProperties": false, "required": ["id", "point"] }, "Edge": { "type": "object", "properties": { "id": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true }, "v0": { "type": "string" }, "v1": { "type": "string" } }, "additionalProperties": false, "required": ["id", "v0", "v1"] }, "DirectedEdge": { "type": "object", "properties": { "id": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true }, "edge": { "type": "string" }, "inverted": { "type": "boolean" } }, "additionalProperties": false, "required": ["id", "edge", "inverted"] }, "Wire": { "type": "object", "properties": { "id": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true }, "directed_edges": { "type": "array", "contains": { "type": "string"} } }, "additionalProperties": false, "required": ["id", "directed_edges"] }, "Face": { "type": "object", "properties": { "id": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true }, "outer": { "type": "string" }, "holes": { "type": "array", "contains": { "type": "string"} } }, "additionalProperties": false, "required": ["id", "outer", "holes"] }, "Shell": { "type": "object", "properties": { "id": { "type": "string" }, "attributes": { "type": "object", "additionalProperties": true }, "faces": { "type": "array", "contains": { "type": "string"} } }, "additionalProperties": false, "required": ["id", "faces"] } } }