{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/miro/json-schema/miro-connector-changes-data-schema.json",
  "title": "ConnectorChangesData",
  "description": "If both are provided, startItem.id must be different from endItem.id",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/miro-connectors-api-openapi.yml#/components/schemas/ConnectorChangesData",
  "type": "object",
  "properties": {
    "startItem": {
      "$ref": "#/$defs/ItemConnectionChangesData"
    },
    "endItem": {
      "$ref": "#/$defs/ItemConnectionChangesData"
    },
    "shape": {
      "type": "string",
      "description": "The path type of the connector line, defines curvature. Default: curved.",
      "enum": [
        "straight",
        "elbowed",
        "curved"
      ]
    },
    "captions": {
      "type": "array",
      "description": "Blocks of text you want to display on the connector.",
      "items": {
        "$ref": "#/$defs/Caption"
      },
      "maxItems": 20,
      "maxLength": 20,
      "minItems": 0
    },
    "style": {
      "$ref": "#/$defs/UpdateConnectorStyle"
    }
  },
  "$defs": {
    "Caption": {
      "type": "object",
      "description": "Contains the connector's caption data, such as content and its position.",
      "properties": {
        "content": {
          "type": "string",
          "description": "The text you want to display on the connector. Supports inline HTML tags.",
          "maxLength": 200,
          "minLength": 0
        },
        "position": {
          "type": "string",
          "description": "The relative position of the text on the connector, in percentage, minimum 0%, maximum 100%. With 50% value, the text will be placed in the middle of the connector line. Default: 50%"
        },
        "textAlignVertical": {
          "type": "string",
          "description": "The vertical position of the text on the connector. Default: middle",
          "enum": [
            "top",
            "middle",
            "bottom"
          ]
        }
      },
      "required": [
        "content"
      ]
    },
    "ItemConnectionChangesData": {
      "type": "object",
      "description": "The ending point of the connector. If startItem is also provided, endItem.id must be different from startItem.id",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier (ID) of the item to which you want to attach the connector. Note that Frames are not supported at the moment."
        },
        "position": {
          "$ref": "#/$defs/RelativeOffset"
        },
        "snapTo": {
          "type": "string",
          "description": "The side of the item connector should be attached to, the connection point will be placed in the middle of that side. Option `auto` allows to pick a connection point automatically. Only either `position` or `snapTo` parameter is allowed to be set, if neither provided `snapTo: auto` will be used by default.",
          "enum": [
            "auto",
            "top",
            "right",
            "bottom",
            "left"
          ]
        }
      }
    },
    "RelativeOffset": {
      "type": "object",
      "description": "The relative position of the point on an item where the connector is attached. Position with x=0% and y=0% correspond to the top-left corner of the item, x=100% and y=100% correspond to the right-bottom corner.",
      "properties": {
        "x": {
          "type": "string",
          "description": "X-axis relative coordinate of the location where the connector connects with an item, in percentage, minimum 0%, maximum 100%."
        },
        "y": {
          "type": "string",
          "description": "Y-axis relative coordinate of the location where the connector connects with an item, in percentage, minimum 0%, maximum 100%."
        }
      }
    },
    "UpdateConnectorStyle": {
      "type": "object",
      "description": "Contains information about the style of a connector, such as the color or caption font size",
      "properties": {
        "color": {
          "type": "string",
          "description": "Hex value representing the color for the captions on the connector."
        },
        "endStrokeCap": {
          "type": "string",
          "description": "The decoration cap of the connector end, like an arrow or circle.",
          "enum": [
            "none",
            "stealth",
            "rounded_stealth",
            "diamond",
            "filled_diamond",
            "oval",
            "filled_oval",
            "arrow",
            "triangle",
            "filled_triangle",
            "erd_one",
            "erd_many",
            "erd_only_one",
            "erd_zero_or_one",
            "erd_one_or_many",
            "erd_zero_or_many",
            "unknown"
          ]
        },
        "fontSize": {
          "type": "string",
          "description": "Defines the font size, in dp, for the captions on the connector.",
          "maximum": 288,
          "minimum": 10
        },
        "startStrokeCap": {
          "type": "string",
          "description": "The decoration cap of the connector end, like an arrow or circle.",
          "enum": [
            "none",
            "stealth",
            "rounded_stealth",
            "diamond",
            "filled_diamond",
            "oval",
            "filled_oval",
            "arrow",
            "triangle",
            "filled_triangle",
            "erd_one",
            "erd_many",
            "erd_only_one",
            "erd_zero_or_one",
            "erd_one_or_many",
            "erd_zero_or_many",
            "unknown"
          ]
        },
        "strokeColor": {
          "type": "string",
          "description": "Hex value of the color of the connector line."
        },
        "strokeStyle": {
          "type": "string",
          "description": "The stroke pattern of the connector line.",
          "enum": [
            "normal",
            "dotted",
            "dashed"
          ]
        },
        "strokeWidth": {
          "type": "string",
          "description": "The thickness of the connector line, in dp.",
          "maximum": 24,
          "minimum": 1
        },
        "textOrientation": {
          "type": "string",
          "description": "The captions orientation relatively to the connector line curvature.",
          "enum": [
            "horizontal",
            "aligned"
          ]
        }
      }
    }
  }
}