{
    "$schema": "http://json-schema.org/draft-04/schema",
    "definitions": {
        "graph": {
            "additionalProperties": false,
            "properties": {
                "directed": {
                    "default": true,
                    "type": [
                        "boolean",
                        "null"
                    ]
                },
                "edges": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "directed": {
                                "default": true,
                                "type": [
                                    "boolean",
                                    "null"
                                ]
                            },
                            "id": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "metadata": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            },
                            "relation": {
                                "type": "string"
                            },
                            "source": {
                                "type": "string"
                            },
                            "target": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "source",
                            "target"
                        ],
                        "type": "object"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "label": {
                    "type": "string"
                },
                "metadata": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "nodes": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "metadata": {
                                "type": [
                                    "object",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id"
                        ],
                        "type": "object"
                    },
                    "type": [
                        "array",
                        "null"
                    ]
                },
                "type": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    },
    "oneOf": [
        {
            "additionalProperties": false,
            "properties": {
                "graph": {
                    "$ref": "#/definitions/graph"
                }
            },
            "required": [
                "graph"
            ],
            "type": "object"
        },
        {
            "additionalProperties": false,
            "properties": {
                "graphs": {
                    "items": {
                        "$ref": "#/definitions/graph"
                    },
                    "type": "array"
                },
                "label": {
                    "type": "string"
                },
                "metadata": {
                    "type": [
                        "object",
                        "null"
                    ]
                },
                "type": {
                    "type": "string"
                }
            },
            "type": "object"
        }
    ]
}