{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "edge"
    },
    "id": {
      "type": "string"
    },
    "sourceId": {
      "type": "string"
    },
    "targetId": {
      "type": "string"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "weight": {
      "type": "number"
    },
    "sourcePort": {
      "type": "string"
    },
    "targetPort": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "directed",
        "undirected",
        "bidirectional"
      ]
    },
    "points": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          }
        },
        "required": [
          "x",
          "y"
        ],
        "additionalProperties": false
      }
    },
    "routing": {
      "type": "string",
      "enum": [
        "polyline",
        "orthogonal",
        "splines"
      ]
    },
    "data": {},
    "x": {
      "type": "number"
    },
    "y": {
      "type": "number"
    },
    "width": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "color": {
      "type": "string"
    },
    "style": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    }
  },
  "required": [
    "type",
    "id",
    "sourceId",
    "targetId",
    "data"
  ],
  "additionalProperties": false
}
