{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "O3D3xx Logic Layer format",
    "definitions": {
        "block": {
            "type": "object",
            "properties": {
                "type": {
                    "type": "string"
                },
                "properties": {
                    "type": "object"
                }
            }
        },
        "connector": {
            "type": "object",
            "properties": {
                "src": {
                    "type": "string"
                },
                "srcEP": {
                    "type": "number"
                },
                "dst": {
                    "type": "string"
                },
                "dstEP": {
                    "type": "number"
                }
            },
            "required": [
                "src",
                "srcEP",
                "dst",
                "dstEP"
            ]
        }
    },
    "type": "object",
    "properties": {
        "blocks": {
            "type": "object",
            "minProperties": 1,
            "additionalProperties": false,
            "patternProperties": {
                "^B[0-9]+$": {
                    "$ref": "#/definitions/block"
                }
            }
        },
        "connectors": {
            "type": "object",
            "minProperties": 1,
            "additionalProperties": false,
            "patternProperties": {
                "^C[0-9]+$": {
                    "$ref": "#/definitions/connector"
                }
            }
        },
        "IOMap": {
            "type": "object",
            "patternProperties": {
                "^(OUT1|OUT2|OUT3|IO1|IO2)$": {
                    "type": "string",
                    "pattern": "^(NONE|ERRPIN|RFT|AQUFIN|EVAFIN|USEROUT|ANALOG|PCIC|USERIN)$"
                }
            },
            "additionalProperties": false
        }
    },
    "required": [
        "blocks"
    ]
}