123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "$id": "http://jsongraphformat.info/v2.1/json-graph-schema.json",
- "title": "JSON Graph Schema",
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "graph": { "$ref": "#/definitions/graph" }
- },
- "additionalProperties": false,
- "required": [
- "graph"
- ]
- },
- {
- "type": "object",
- "properties": {
- "graphs": {
- "type": "array",
- "items": { "$ref": "#/definitions/graph" }
- }
- },
- "additionalProperties": false
- }
- ],
- "definitions": {
- "graph": {
- "oneOf": [
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": { "type": "string" },
- "label": { "type": "string" },
- "directed": { "type": [ "boolean" ], "default": true },
- "type": { "type": "string" },
- "metadata": { "type": [ "object" ] },
- "nodes": {
- "type": "object",
- "additionalProperties": { "$ref": "#/definitions/node" }
- },
- "edges": {
- "type": [ "array" ],
- "items": { "$ref": "#/definitions/edge" }
- }
- }
- },
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": { "type": "string" },
- "label": { "type": "string" },
- "directed": { "type": [ "boolean" ], "default": true },
- "type": { "type": "string" },
- "metadata": { "type": [ "object" ] },
- "nodes": {
- "type": "object",
- "additionalProperties": { "$ref": "#/definitions/node" }
- },
- "hyperedges": {
- "type": [ "array" ],
- "items": { "$ref": "#/definitions/directedhyperedge" }
- }
- }
- },
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": { "type": "string" },
- "label": { "type": "string" },
- "directed": { "type": [ "boolean" ], "enum": [false] },
- "type": { "type": "string" },
- "metadata": { "type": [ "object" ] },
- "nodes": {
- "type": "object",
- "additionalProperties": { "$ref": "#/definitions/node" }
- },
- "hyperedges": {
- "type": [ "array" ],
- "items": { "$ref": "#/definitions/undirectedhyperedge" }
- }
- },
- "required": [ "directed" ]
- }
- ]
- },
- "node": {
- "type": "object",
- "properties": {
- "label": { "type": "string" },
- "metadata": { "type": "object" },
- "additionalProperties": false
- }
- },
- "edge": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": { "type": "string" },
- "source": { "type": "string" },
- "target": { "type": "string" },
- "relation": { "type": "string" },
- "directed": { "type": [ "boolean" ], "default": true },
- "label": { "type": "string" },
- "metadata": { "type": [ "object" ] }
- },
- "required": [ "source", "target" ]
- },
- "directedhyperedge": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": { "type": "string" },
- "source": { "type": "array", "items": { "type": "string" } },
- "target": { "type": "array", "items": { "type": "string" } },
- "relation": { "type": "string" },
- "label": { "type": "string" },
- "metadata": { "type": [ "object" ] }
- },
- "required": [ "source", "target" ]
- },
- "undirectedhyperedge": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "id": { "type": "string" },
- "nodes": { "type": "array", "items": { "type": "string" } },
- "relation": { "type": "string" },
- "label": { "type": "string" },
- "metadata": { "type": [ "object" ] }
- },
- "required": [ "nodes" ]
- }
- }
- }
|