{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "geometries": {
            "$ref": "#/definitions/GeometriesType"
        },
        "version": {
            "type": "string"
        }
    },
    "definitions": {
        "GeometriesType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "geometry": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/GeometryType"
                    }
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "GeometryType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "directions": {
                    "$ref": "#/definitions/Directions"
                },
                "id": {
                    "type": "string"
                },
                "file": {
                    "type": "string",
                    "enum": [
                        "OK",
                        "NONE"
                    ]
                },
                "path": {
                    "type": "string"
                }
            }
        },
        "Directions": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "direction": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/DirectionType"
                    }
                }
            }
        },
        "DirectionType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "movements": {
                    "$ref": "#/definitions/Movements"
                },
                "id": {
                    "type": "string"
                },
                "bound": {
                    "type": "string",
                    "enum": [
                        "NORTH",
                        "SOUTH",
                        "EAST",
                        "WEST"
                    ]
                },
                "exitlanes": {
                    "type": "integer"
                },
                "speed": {
                    "type": "integer"
                },
                "next": {
                    "type": "string"
                },
                "distance": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "Movements": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "movement": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/MovementType"
                    }
                }
            }
        },
        "MovementType": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "value": {
                    "type": "string"
                },
                "dir": {
                    "type": "string",
                    "enum": [
                        "LT",
                        "ST",
                        "RT"
                    ]
                },
                "lanes": {
                    "type": "integer"
                },
                "faze": {
                    "type": "integer"
                },
                "overlap": {
                    "type": "string",
                    "enum": [
                        "E",
                        "F",
                        "A",
                        "G",
                        "B",
                        "C",
                        "H",
                        "D"
                    ]
                },
                "perm": {
                    "type": "integer"
                },
                "display": {
                    "type": "string",
                    "enum": [
                        "BALL",
                        "ARROW",
                        "STDLEFT"
                    ]
                }
            }
        }
    }
}