{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/visio/json-schema/visio-page-collection-schema.json",
  "title": "PageCollection",
  "description": "A collection of Visio pages",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/visio-pages-api-openapi.yml#/components/schemas/PageCollection",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Page"
      }
    }
  },
  "$defs": {
    "BoundingBox": {
      "type": "object",
      "description": "Bounding box coordinates of a shape",
      "properties": {
        "x": {
          "type": "number",
          "description": "X coordinate of the top-left corner"
        },
        "y": {
          "type": "number",
          "description": "Y coordinate of the top-left corner"
        },
        "width": {
          "type": "number",
          "description": "Width of the bounding box"
        },
        "height": {
          "type": "number",
          "description": "Height of the bounding box"
        }
      }
    },
    "Comment": {
      "type": "object",
      "description": "A comment associated with a Visio shape",
      "properties": {
        "author": {
          "type": "string",
          "description": "Name of the comment author"
        },
        "date": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the comment was created"
        },
        "text": {
          "type": "string",
          "description": "Content of the comment"
        }
      }
    },
    "CommentCollection": {
      "type": "object",
      "description": "Collection of comments on a shape",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Comment"
          }
        }
      }
    },
    "Highlight": {
      "type": "object",
      "description": "Highlight decoration applied to a shape",
      "properties": {
        "color": {
          "type": "string",
          "description": "CSS color string for the highlight (e.g."
        },
        "width": {
          "type": "integer",
          "description": "Width of the highlight border in points"
        }
      }
    },
    "Hyperlink": {
      "type": "object",
      "description": "A hyperlink attached to a Visio shape",
      "properties": {
        "address": {
          "type": "string",
          "description": "URL or file path the hyperlink points to"
        },
        "description": {
          "type": "string",
          "description": "Display description for the hyperlink"
        },
        "subAddress": {
          "type": "string",
          "description": "Sub-address within the target (e.g. page name)"
        },
        "extraInfo": {
          "type": "string",
          "description": "Additional information passed with the URL"
        }
      }
    },
    "HyperlinkCollection": {
      "type": "object",
      "description": "Collection of hyperlinks on a shape",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Hyperlink"
          }
        }
      }
    },
    "Page": {
      "type": "object",
      "description": "Represents a page in the Visio document",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Numeric page identifier"
        },
        "name": {
          "type": "string",
          "description": "Name of the page"
        },
        "index": {
          "type": "integer",
          "description": "Zero-based index of the page in the document"
        },
        "isBackground": {
          "type": "boolean",
          "description": "Whether this page is a background page"
        },
        "view": {
          "$ref": "#/$defs/PageView"
        },
        "shapes": {
          "$ref": "#/$defs/ShapeCollection"
        }
      }
    },
    "PageView": {
      "type": "object",
      "description": "View settings for a Visio page",
      "properties": {
        "zoom": {
          "type": "integer",
          "description": "Zoom level as a percentage (e.g. 100 for 100%)"
        }
      }
    },
    "Shape": {
      "type": "object",
      "description": "Represents a shape element on a Visio page",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Numeric shape identifier"
        },
        "name": {
          "type": "string",
          "description": "Name of the shape"
        },
        "text": {
          "type": "string",
          "description": "Text content displayed inside the shape"
        },
        "select": {
          "type": "boolean",
          "description": "Whether this shape is currently selected by the user"
        },
        "view": {
          "$ref": "#/$defs/ShapeView"
        },
        "shapeDataItems": {
          "$ref": "#/$defs/ShapeDataItemCollection"
        },
        "hyperlinks": {
          "$ref": "#/$defs/HyperlinkCollection"
        },
        "comments": {
          "$ref": "#/$defs/CommentCollection"
        },
        "boundingBox": {
          "$ref": "#/$defs/BoundingBox"
        }
      }
    },
    "ShapeCollection": {
      "type": "object",
      "description": "A collection of shapes on a Visio page",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Shape"
          }
        }
      }
    },
    "ShapeDataItem": {
      "type": "object",
      "description": "A structured data item (label-value pair) associated with a shape",
      "properties": {
        "label": {
          "type": "string",
          "description": "Label or key for the data item"
        },
        "value": {
          "type": "string",
          "description": "Value associated with the label"
        },
        "format": {
          "type": "string",
          "description": "Optional display format for the value"
        },
        "formattedValue": {
          "type": "string",
          "description": "Value after applying the format string"
        }
      }
    },
    "ShapeDataItemCollection": {
      "type": "object",
      "description": "Collection of data items associated with a shape",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShapeDataItem"
          }
        }
      }
    },
    "ShapeView": {
      "type": "object",
      "description": "Visual presentation settings for a shape",
      "properties": {
        "highlight": {
          "$ref": "#/$defs/Highlight"
        },
        "tooltip": {
          "type": "string",
          "description": "Tooltip text shown on hover"
        }
      }
    }
  }
}