{
  "title": "ContainerDiagram",
  "type": "object",
  "properties": {
    "type": {
      "const": "ContainerDiagram",
      "description": "Type of the diagram.",
      "title": "Type",
      "type": "string"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional diagram title.",
      "title": "Title"
    },
    "layouts": {
      "description": "Relative layout constraints between elements.",
      "items": {
        "$ref": "#/$defs/LayoutSchema"
      },
      "title": "Layouts",
      "type": "array"
    },
    "render_options": {
      "anyOf": [
        {
          "$ref": "#/$defs/RenderOptionsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional renderer-specific options"
    },
    "elements": {
      "description": "Top-level elements.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/PersonSchema"
          },
          {
            "$ref": "#/$defs/PersonExtSchema"
          },
          {
            "$ref": "#/$defs/SystemSchema"
          },
          {
            "$ref": "#/$defs/SystemExtSchema"
          },
          {
            "$ref": "#/$defs/SystemDbSchema"
          },
          {
            "$ref": "#/$defs/SystemDbExtSchema"
          },
          {
            "$ref": "#/$defs/SystemQueueSchema"
          },
          {
            "$ref": "#/$defs/SystemQueueExtSchema"
          },
          {
            "$ref": "#/$defs/ContainerSchema"
          },
          {
            "$ref": "#/$defs/ContainerExtSchema"
          },
          {
            "$ref": "#/$defs/ContainerDbSchema"
          },
          {
            "$ref": "#/$defs/ContainerDbExtSchema"
          },
          {
            "$ref": "#/$defs/ContainerQueueSchema"
          },
          {
            "$ref": "#/$defs/ContainerQueueExtSchema"
          }
        ]
      },
      "title": "Elements",
      "type": "array"
    },
    "boundaries": {
      "description": "Top-level boundaries.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/BoundarySchema"
          },
          {
            "$ref": "#/$defs/EnterpriseBoundarySchema"
          },
          {
            "$ref": "#/$defs/SystemBoundarySchema"
          },
          {
            "$ref": "#/$defs/ContainerBoundarySchema"
          }
        ]
      },
      "title": "Boundaries",
      "type": "array"
    },
    "relationships": {
      "description": "Top-level relationships.",
      "items": {
        "$ref": "#/$defs/RelationshipSchema"
      },
      "title": "Relationships",
      "type": "array"
    }
  },
  "required": [
    "type"
  ],
  "examples": [
    {
      "type": "ContainerDiagram",
      "title": "Web App",
      "elements": [
        {
          "alias": "user",
          "label": "User",
          "tags": [
            "User"
          ],
          "type": "Person"
        }
      ],
      "boundaries": [
        {
          "alias": "system",
          "boundaries": [],
          "elements": [
            {
              "alias": "web",
              "label": "Web App",
              "tags": [
                "Frontend"
              ],
              "technology": "React",
              "type": "Container"
            },
            {
              "alias": "api",
              "label": "API",
              "tags": [
                "Backend"
              ],
              "technology": "Python",
              "type": "Container"
            },
            {
              "alias": "db",
              "label": "Database",
              "tags": [
                "Database"
              ],
              "technology": "PostgreSQL",
              "type": "ContainerDb"
            }
          ],
          "label": "Simple System",
          "relationships": [],
          "tags": [
            "SystemBoundary"
          ],
          "type": "SystemBoundary"
        }
      ],
      "relationships": [
        {
          "from": "user",
          "label": "Uses",
          "tags": [
            "Sync"
          ],
          "to": "web",
          "type": "REL"
        },
        {
          "from": "web",
          "label": "Calls",
          "tags": [
            "Sync"
          ],
          "to": "api",
          "type": "REL"
        },
        {
          "from": "api",
          "label": "Reads/Writes",
          "tags": [
            "Data"
          ],
          "to": "db",
          "type": "REL"
        }
      ],
      "render_options": {
        "plantuml": {
          "layout": "LAYOUT_LEFT_RIGHT",
          "styles": [
            {
              "bg_color": "#eeeeff",
              "element_name": "container",
              "type": "ElementStyle"
            }
          ],
          "tags": [
            {
              "tag_stereo": "User",
              "type": "PersonTag"
            },
            {
              "tag_stereo": "Frontend",
              "type": "ContainerTag"
            },
            {
              "tag_stereo": "Backend",
              "type": "ContainerTag"
            },
            {
              "tag_stereo": "Database",
              "type": "ContainerTag"
            },
            {
              "tag_stereo": "SystemBoundary",
              "type": "BoundaryTag"
            },
            {
              "tag_stereo": "Sync",
              "type": "RelTag"
            },
            {
              "tag_stereo": "Data",
              "type": "RelTag"
            }
          ]
        }
      }
    },
    {
      "type": "ContainerDiagram",
      "title": "Online Shop - Container Diagram",
      "elements": [
        {
          "alias": "customer",
          "description": "Browses products and places orders.",
          "label": "Customer",
          "properties": {
            "properties": [
              [
                "Channel",
                "Web / Mobile"
              ]
            ]
          },
          "sprite": "user",
          "stereotype": "Primary User",
          "tags": [
            "Customer"
          ],
          "type": "Person"
        },
        {
          "alias": "support_agent",
          "description": "Investigates customer issues from an external support tool.",
          "label": "Support Agent",
          "properties": {
            "properties": [
              [
                "Organization",
                "Support Vendor"
              ]
            ]
          },
          "sprite": "user",
          "stereotype": "External User",
          "tags": [
            "ExternalSupport"
          ],
          "type": "PersonExt"
        },
        {
          "alias": "payment_provider",
          "description": "Processes card payments and payment webhooks.",
          "label": "Payment Provider",
          "sprite": "cloud",
          "stereotype": "External System",
          "tags": [
            "ExternalSystem"
          ],
          "type": "SystemExt"
        },
        {
          "alias": "recommendation_api",
          "description": "Returns personalized product recommendations.",
          "label": "Recommendation API",
          "sprite": "cloud",
          "tags": [
            "ExternalContainer"
          ],
          "technology": "REST API",
          "type": "ContainerExt"
        },
        {
          "alias": "fraud_db",
          "description": "External datastore containing fraud intelligence.",
          "label": "Fraud Signals DB",
          "sprite": "database",
          "tags": [
            "ExternalDataStore"
          ],
          "technology": "Vendor DB",
          "type": "ContainerDbExt"
        },
        {
          "alias": "shipping_events",
          "description": "External topic used by logistics partner.",
          "label": "Shipping Events Topic",
          "sprite": "queue",
          "tags": [
            "ExternalAsyncChannel"
          ],
          "technology": "Kafka",
          "type": "ContainerQueueExt"
        }
      ],
      "boundaries": [
        {
          "alias": "acme",
          "boundaries": [
            {
              "alias": "shop_boundary",
              "boundaries": [
                {
                  "alias": "checkout_boundary",
                  "boundaries": [],
                  "description": "Groups checkout-related containers.",
                  "elements": [
                    {
                      "alias": "checkout_api",
                      "description": "Handles checkout and payment orchestration.",
                      "label": "Checkout API",
                      "tags": [
                        "Backend"
                      ],
                      "technology": "Python / FastAPI",
                      "type": "Container"
                    },
                    {
                      "alias": "checkout_db",
                      "description": "Stores checkout sessions.",
                      "label": "Checkout DB",
                      "tags": [
                        "DataStore"
                      ],
                      "technology": "PostgreSQL",
                      "type": "ContainerDb"
                    }
                  ],
                  "label": "Checkout Subsystem",
                  "properties": {
                    "properties": [
                      [
                        "Owner",
                        "Checkout Team"
                      ],
                      [
                        "Criticality",
                        "High"
                      ]
                    ]
                  },
                  "relationships": [
                    {
                      "from": "checkout_api",
                      "label": "Reads and writes",
                      "tags": [
                        "DataAccess"
                      ],
                      "technology": "SQL",
                      "to": "checkout_db",
                      "type": "REL"
                    }
                  ],
                  "tags": [
                    "ContainerBoundary"
                  ],
                  "type": "ContainerBoundary"
                }
              ],
              "description": "Main system boundary for the commerce platform.",
              "elements": [
                {
                  "alias": "web_app",
                  "description": "Serves the storefront and checkout UI.",
                  "label": "Web Application",
                  "properties": {
                    "properties": [
                      [
                        "Runtime",
                        "Node.js"
                      ],
                      [
                        "Team",
                        "Storefront"
                      ]
                    ]
                  },
                  "sprite": "browser",
                  "tags": [
                    "Frontend"
                  ],
                  "technology": "React + Next.js",
                  "type": "Container"
                },
                {
                  "alias": "backend_api",
                  "description": "Handles catalog, carts, checkout, and order APIs.",
                  "label": "Backend API",
                  "properties": {
                    "properties": [
                      [
                        "Runtime",
                        "Python 3.12"
                      ],
                      [
                        "Team",
                        "Platform"
                      ]
                    ]
                  },
                  "sprite": "server",
                  "tags": [
                    "Backend",
                    "CoreRuntime"
                  ],
                  "technology": "Python / FastAPI",
                  "type": "Container"
                },
                {
                  "alias": "orders_db",
                  "description": "Stores orders, payments, and status transitions.",
                  "label": "Orders Database",
                  "properties": {
                    "properties": [
                      [
                        "Engine",
                        "PostgreSQL 16"
                      ],
                      [
                        "HA",
                        "Primary / Replica"
                      ]
                    ]
                  },
                  "sprite": "database",
                  "tags": [
                    "DataStore"
                  ],
                  "technology": "PostgreSQL",
                  "type": "ContainerDb"
                },
                {
                  "alias": "order_events",
                  "description": "Publishes asynchronous order lifecycle events.",
                  "label": "Order Events Queue",
                  "properties": {
                    "properties": [
                      [
                        "Retention",
                        "7 days"
                      ],
                      [
                        "Format",
                        "JSON"
                      ]
                    ]
                  },
                  "sprite": "queue",
                  "tags": [
                    "AsyncChannel"
                  ],
                  "technology": "Kafka",
                  "type": "ContainerQueue"
                }
              ],
              "label": "Online Shop Platform",
              "properties": {
                "properties": [
                  [
                    "Owner",
                    "Commerce Team"
                  ],
                  [
                    "Environment",
                    "Production"
                  ]
                ]
              },
              "relationships": [],
              "tags": [
                "SystemBoundary"
              ],
              "type": "SystemBoundary"
            }
          ],
          "description": "Enterprise boundary for internal platforms.",
          "elements": [],
          "label": "Acme Corp",
          "properties": {
            "properties": [
              [
                "Region",
                "EU"
              ],
              [
                "Business Unit",
                "Digital Commerce"
              ]
            ]
          },
          "relationships": [],
          "tags": [
            "EnterpriseBoundary"
          ],
          "type": "EnterpriseBoundary"
        }
      ],
      "relationships": [
        {
          "from": "customer",
          "label": "Uses",
          "tags": [
            "SyncRequest"
          ],
          "technology": "HTTPS",
          "to": "web_app",
          "type": "REL"
        },
        {
          "from": "web_app",
          "label": "Calls",
          "tags": [
            "SyncRequest"
          ],
          "technology": "HTTPS/JSON",
          "to": "backend_api",
          "type": "REL"
        },
        {
          "from": "backend_api",
          "label": "Reads and writes",
          "tags": [
            "DataAccess"
          ],
          "technology": "SQL",
          "to": "orders_db",
          "type": "REL"
        },
        {
          "from": "backend_api",
          "label": "Publishes order events",
          "tags": [
            "AsyncRequest"
          ],
          "technology": "Kafka",
          "to": "order_events",
          "type": "REL"
        },
        {
          "from": "backend_api",
          "label": "Creates payment intents",
          "tags": [
            "ExternalCall"
          ],
          "technology": "REST API",
          "to": "payment_provider",
          "type": "REL"
        },
        {
          "from": "backend_api",
          "label": "Fetches recommendations",
          "tags": [
            "ExternalCall"
          ],
          "technology": "REST API",
          "to": "recommendation_api",
          "type": "REL"
        },
        {
          "from": "backend_api",
          "label": "Checks fraud signals",
          "tags": [
            "ExternalCall"
          ],
          "technology": "JDBC",
          "to": "fraud_db",
          "type": "REL"
        },
        {
          "from": "shipping_events",
          "label": "Delivers shipping updates",
          "tags": [
            "AsyncRequest"
          ],
          "technology": "Kafka",
          "to": "backend_api",
          "type": "REL"
        },
        {
          "from": "support_agent",
          "label": "Queries order state",
          "tags": [
            "SupportFlow"
          ],
          "technology": "HTTPS",
          "to": "backend_api",
          "type": "REL"
        }
      ],
      "layouts": [
        {
          "from": "customer",
          "to": "web_app",
          "type": "LAY_R"
        },
        {
          "from": "web_app",
          "to": "backend_api",
          "type": "LAY_R"
        },
        {
          "from": "backend_api",
          "to": "orders_db",
          "type": "LAY_D"
        },
        {
          "from": "backend_api",
          "to": "order_events",
          "type": "LAY_D"
        },
        {
          "from": "backend_api",
          "to": "payment_provider",
          "type": "LAY_R"
        }
      ],
      "render_options": {
        "plantuml": {
          "hide_person_sprite": false,
          "hide_stereotype": false,
          "layout": "LAYOUT_LEFT_RIGHT",
          "layout_as_sketch": false,
          "layout_with_legend": true,
          "legend_title": "Container Diagram Legend",
          "set_sketch_style": {
            "bg_color": "#ffffff",
            "font_color": "#222222",
            "font_name": "Inter",
            "footer_text": "Container view",
            "footer_warning": "Architecture draft",
            "warning_color": "#cc3300"
          },
          "show_floating_legend": {
            "alias": "legend_box",
            "details": "Small",
            "hide_stereotype": true
          },
          "show_legend": {
            "details": "Normal",
            "hide_stereotype": false
          },
          "show_person_outline": true,
          "show_person_portrait": false,
          "show_person_sprite": {
            "alias": "person"
          },
          "styles": [
            {
              "bg_color": "#ede7f6",
              "border_color": "#673ab7",
              "border_style": "SolidLine",
              "border_thickness": "2",
              "element_name": "container",
              "font_color": "#311b92",
              "legend_sprite": "server",
              "legend_text": "Application container",
              "shadowing": true,
              "shape": "RoundedBoxShape",
              "type": "ElementStyle"
            },
            {
              "bg_color": "#fff8e1",
              "border_color": "#ffb300",
              "border_style": "SolidLine",
              "border_thickness": "2",
              "element_name": "systemboundary",
              "font_color": "#5d4037",
              "legend_text": "System boundary",
              "shadowing": false,
              "shape": "RoundedBoxShape",
              "type": "SystemBoundaryStyle"
            },
            {
              "bg_color": "#f1f8e9",
              "border_color": "#8bc34a",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "element_name": "containerboundary",
              "font_color": "#33691e",
              "legend_text": "Container boundary",
              "shadowing": false,
              "shape": "RoundedBoxShape",
              "type": "ContainerBoundaryStyle"
            },
            {
              "line_color": "#546e7a",
              "text_color": "#37474f",
              "type": "RelStyle"
            }
          ],
          "tags": [
            {
              "bg_color": "#e8f5e9",
              "border_color": "#66bb6a",
              "border_style": "SolidLine",
              "border_thickness": "1",
              "font_color": "#1b5e20",
              "legend_sprite": "user",
              "legend_text": "Primary customer actor",
              "shadowing": false,
              "sprite": "user",
              "tag_stereo": "Customer",
              "type": "PersonTag"
            },
            {
              "bg_color": "#f5f5f5",
              "border_color": "#9e9e9e",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "font_color": "#424242",
              "legend_sprite": "user",
              "legend_text": "External support user",
              "shadowing": false,
              "sprite": "user",
              "tag_stereo": "ExternalSupport",
              "type": "ExternalPersonTag"
            },
            {
              "bg_color": "#f5f5f5",
              "border_color": "#9e9e9e",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "font_color": "#424242",
              "legend_sprite": "cloud",
              "legend_text": "External system dependency",
              "shadowing": false,
              "shape": "RoundedBoxShape",
              "sprite": "cloud",
              "tag_stereo": "ExternalSystem",
              "type": "ExternalSystemTag"
            },
            {
              "bg_color": "#e3f2fd",
              "border_color": "#64b5f6",
              "border_style": "SolidLine",
              "border_thickness": "2",
              "font_color": "#0d47a1",
              "legend_sprite": "browser",
              "legend_text": "User-facing frontend container",
              "shadowing": true,
              "sprite": "browser",
              "tag_stereo": "Frontend",
              "technology": "Web UI",
              "type": "ContainerTag"
            },
            {
              "bg_color": "#ede7f6",
              "border_color": "#673ab7",
              "border_style": "SolidLine",
              "border_thickness": "2",
              "font_color": "#311b92",
              "legend_sprite": "server",
              "legend_text": "Backend application container",
              "shadowing": true,
              "sprite": "server",
              "tag_stereo": "Backend",
              "technology": "Python / FastAPI",
              "type": "ContainerTag"
            },
            {
              "bg_color": "#ede7f6",
              "border_color": "#7e57c2",
              "border_style": "BoldLine",
              "border_thickness": "2",
              "font_color": "#4527a0",
              "legend_sprite": "server",
              "legend_text": "Core runtime container",
              "shadowing": true,
              "sprite": "server",
              "tag_stereo": "CoreRuntime",
              "technology": "Python 3.12",
              "type": "ContainerTag"
            },
            {
              "bg_color": "#fff8e1",
              "border_color": "#ffb300",
              "border_style": "SolidLine",
              "border_thickness": "1",
              "font_color": "#5d4037",
              "legend_sprite": "database",
              "legend_text": "Internal data store",
              "shadowing": false,
              "sprite": "database",
              "tag_stereo": "DataStore",
              "technology": "PostgreSQL",
              "type": "ContainerTag"
            },
            {
              "bg_color": "#fff3e0",
              "border_color": "#fb8c00",
              "border_style": "SolidLine",
              "border_thickness": "1",
              "font_color": "#e65100",
              "legend_sprite": "queue",
              "legend_text": "Internal asynchronous channel",
              "shadowing": false,
              "sprite": "queue",
              "tag_stereo": "AsyncChannel",
              "technology": "Kafka",
              "type": "ContainerTag"
            },
            {
              "bg_color": "#f5f5f5",
              "border_color": "#9e9e9e",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "font_color": "#424242",
              "legend_sprite": "cloud",
              "legend_text": "External container dependency",
              "shadowing": false,
              "shape": "RoundedBoxShape",
              "sprite": "cloud",
              "tag_stereo": "ExternalContainer",
              "technology": "REST API",
              "type": "ExternalContainerTag"
            },
            {
              "bg_color": "#f5f5f5",
              "border_color": "#9e9e9e",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "font_color": "#424242",
              "legend_sprite": "database",
              "legend_text": "External data store",
              "shadowing": false,
              "sprite": "database",
              "tag_stereo": "ExternalDataStore",
              "technology": "Vendor DB",
              "type": "ExternalContainerTag"
            },
            {
              "bg_color": "#f3e5f5",
              "border_color": "#ab47bc",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "font_color": "#6a1b9a",
              "legend_sprite": "queue",
              "legend_text": "External asynchronous channel",
              "shadowing": false,
              "sprite": "queue",
              "tag_stereo": "ExternalAsyncChannel",
              "technology": "Kafka",
              "type": "ExternalContainerTag"
            },
            {
              "bg_color": "#fafafa",
              "border_color": "#9e9e9e",
              "border_style": "SolidLine",
              "border_thickness": "1",
              "font_color": "#424242",
              "legend_text": "Enterprise boundary",
              "shadowing": false,
              "tag_stereo": "EnterpriseBoundary",
              "type": "BoundaryTag"
            },
            {
              "bg_color": "#fff8e1",
              "border_color": "#ffb300",
              "border_style": "SolidLine",
              "border_thickness": "2",
              "font_color": "#5d4037",
              "legend_text": "System boundary",
              "shadowing": false,
              "tag_stereo": "SystemBoundary",
              "type": "BoundaryTag"
            },
            {
              "bg_color": "#f1f8e9",
              "border_color": "#8bc34a",
              "border_style": "DashedLine",
              "border_thickness": "1",
              "font_color": "#33691e",
              "legend_text": "Container boundary",
              "shadowing": false,
              "tag_stereo": "ContainerBoundary",
              "type": "BoundaryTag"
            },
            {
              "legend_text": "Synchronous request/response flow",
              "line_color": "#1e88e5",
              "line_style": "SolidLine",
              "line_thickness": "1",
              "tag_stereo": "SyncRequest",
              "technology": "HTTPS/JSON",
              "text_color": "#1565c0",
              "type": "RelTag"
            },
            {
              "legend_text": "Database access",
              "line_color": "#8d6e63",
              "line_style": "DashedLine",
              "line_thickness": "1",
              "tag_stereo": "DataAccess",
              "technology": "SQL",
              "text_color": "#6d4c41",
              "type": "RelTag"
            },
            {
              "legend_sprite": "queue",
              "legend_text": "Asynchronous messaging flow",
              "line_color": "#8e24aa",
              "line_style": "DottedLine",
              "line_thickness": "2",
              "sprite": "queue",
              "tag_stereo": "AsyncRequest",
              "technology": "Kafka",
              "text_color": "#6a1b9a",
              "type": "RelTag"
            },
            {
              "legend_text": "External service/data call",
              "line_color": "#78909c",
              "line_style": "DashedLine",
              "line_thickness": "1",
              "tag_stereo": "ExternalCall",
              "technology": "REST API / JDBC",
              "text_color": "#455a64",
              "type": "RelTag"
            },
            {
              "legend_text": "Support access flow",
              "line_color": "#43a047",
              "line_style": "SolidLine",
              "line_thickness": "1",
              "tag_stereo": "SupportFlow",
              "technology": "HTTPS",
              "text_color": "#2e7d32",
              "type": "RelTag"
            }
          ],
          "without_property_header": false
        }
      }
    }
  ],
  "$defs": {
    "BoundarySchema": {
      "examples": [
        {
          "alias": "commerce_platform",
          "boundaries": [],
          "description": "Boundary for the commerce system and its internal components.",
          "elements": [
            {
              "alias": "web_storefront",
              "description": "Frontend for browsing and checkout.",
              "label": "Web Storefront",
              "type": "System"
            },
            {
              "alias": "orders_db",
              "description": "Stores orders and payment state.",
              "label": "Orders DB",
              "type": "SystemDb"
            }
          ],
          "label": "Commerce Platform",
          "link": "https://docs.example.com/commerce",
          "properties": {
            "properties": [
              [
                "Owner",
                "Commerce Team"
              ],
              [
                "Environment",
                "Production"
              ]
            ]
          },
          "relationships": [
            {
              "from": "web_storefront",
              "label": "Reads and writes orders",
              "technology": "SQL",
              "to": "orders_db",
              "type": "REL"
            }
          ],
          "stereotype": "boundary",
          "tags": [
            "system_boundary"
          ],
          "type": "Boundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/RelationshipSchema"
          },
          "title": "Relationships",
          "type": "array"
        },
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "Boundary",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        },
        "elements": {
          "description": "Elements may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/PersonSchema"
              },
              {
                "$ref": "#/$defs/PersonExtSchema"
              },
              {
                "$ref": "#/$defs/SystemSchema"
              },
              {
                "$ref": "#/$defs/SystemExtSchema"
              },
              {
                "$ref": "#/$defs/SystemDbSchema"
              },
              {
                "$ref": "#/$defs/SystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerSchema"
              },
              {
                "$ref": "#/$defs/ContainerExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/BoundarySchema"
              },
              {
                "$ref": "#/$defs/EnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/SystemBoundarySchema"
              },
              {
                "$ref": "#/$defs/ContainerBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "Boundary",
      "type": "object"
    },
    "BoundaryStyleSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "BoundaryStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "element_name": {
          "description": "C4 element type to style (e.g. 'person', 'system', 'container'). This applies to all elements of the given type, not a specific instance.",
          "title": "Element Name",
          "type": "string"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font/text color.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line color.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shape macro used for rendering."
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon applied to the element.",
          "title": "Sprite"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend label for this styled element.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend sprite for this styled element.",
          "title": "Legend Sprite"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "element_name"
      ],
      "title": "BoundaryStyleSchema",
      "type": "object"
    },
    "BoundaryTagSchema": {
      "properties": {
        "type": {
          "const": "BoundaryTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "BoundaryTagSchema",
      "type": "object"
    },
    "ComponentTagSchema": {
      "properties": {
        "type": {
          "const": "ComponentTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ComponentTagSchema",
      "type": "object"
    },
    "ContainerBoundarySchema": {
      "examples": [
        {
          "alias": "checkout_boundary",
          "boundaries": [],
          "description": "Groups checkout-related containers.",
          "elements": [
            {
              "alias": "checkout_api",
              "description": "Handles cart and checkout operations.",
              "label": "Checkout API",
              "technology": "FastAPI",
              "type": "Container"
            },
            {
              "alias": "checkout_db",
              "description": "Stores carts and checkout sessions.",
              "label": "Checkout DB",
              "technology": "PostgreSQL",
              "type": "ContainerDb"
            }
          ],
          "label": "Checkout Subsystem",
          "link": "https://docs.example.com/checkout",
          "properties": {
            "properties": [
              [
                "Owner",
                "Checkout Team"
              ],
              [
                "Domain",
                "Commerce"
              ]
            ]
          },
          "relationships": [
            {
              "from": "checkout_api",
              "label": "Reads and writes",
              "technology": "SQL",
              "to": "checkout_db",
              "type": "REL"
            }
          ],
          "tags": [
            "container_boundary"
          ],
          "type": "ContainerBoundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/RelationshipSchema"
          },
          "title": "Relationships",
          "type": "array"
        },
        "type": {
          "const": "ContainerBoundary",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        },
        "elements": {
          "description": "Elements may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/PersonSchema"
              },
              {
                "$ref": "#/$defs/PersonExtSchema"
              },
              {
                "$ref": "#/$defs/SystemSchema"
              },
              {
                "$ref": "#/$defs/SystemExtSchema"
              },
              {
                "$ref": "#/$defs/SystemDbSchema"
              },
              {
                "$ref": "#/$defs/SystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerSchema"
              },
              {
                "$ref": "#/$defs/ContainerExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/BoundarySchema"
              },
              {
                "$ref": "#/$defs/EnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/SystemBoundarySchema"
              },
              {
                "$ref": "#/$defs/ContainerBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "ContainerBoundary",
      "type": "object"
    },
    "ContainerBoundaryStyleSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "ContainerBoundaryStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "element_name": {
          "description": "C4 element type to style (e.g. 'person', 'system', 'container'). This applies to all elements of the given type, not a specific instance.",
          "title": "Element Name",
          "type": "string"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font/text color.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line color.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shape macro used for rendering."
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon applied to the element.",
          "title": "Sprite"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend label for this styled element.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend sprite for this styled element.",
          "title": "Legend Sprite"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "element_name"
      ],
      "title": "ContainerBoundaryStyleSchema",
      "type": "object"
    },
    "ContainerDbExtSchema": {
      "examples": [
        {
          "alias": "fraud_vendor_db",
          "description": "External datastore used to look up fraud signals.",
          "label": "Fraud Vendor Database",
          "link": "https://vendor.example.com",
          "properties": {
            "properties": [
              [
                "Provider",
                "FraudCo"
              ],
              [
                "Access",
                "Read-only"
              ]
            ]
          },
          "sprite": "database",
          "tags": [
            "container",
            "database",
            "external"
          ],
          "technology": "Vendor DB",
          "type": "ContainerDbExt"
        }
      ],
      "properties": {
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional technology.",
          "title": "Technology"
        },
        "type": {
          "const": "ContainerDbExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "ContainerDbExt",
      "type": "object"
    },
    "ContainerDbSchema": {
      "examples": [
        {
          "alias": "catalog_db",
          "description": "Stores products, categories, and pricing data.",
          "label": "Catalog Database",
          "link": "https://db-admin.example.com/catalog",
          "properties": {
            "properties": [
              [
                "Engine",
                "PostgreSQL 16"
              ],
              [
                "Replication",
                "Streaming"
              ]
            ]
          },
          "sprite": "database",
          "tags": [
            "container",
            "database",
            "internal"
          ],
          "technology": "PostgreSQL",
          "type": "ContainerDb"
        }
      ],
      "properties": {
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional technology.",
          "title": "Technology"
        },
        "type": {
          "const": "ContainerDb",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "ContainerDb",
      "type": "object"
    },
    "ContainerExtSchema": {
      "examples": [
        {
          "alias": "recommendation_api",
          "base_shape": "RoundedBox",
          "description": "External API that returns personalized product recommendations.",
          "label": "Recommendation Engine API",
          "link": "https://partner.example.com/recommendations",
          "properties": {
            "properties": [
              [
                "SLA",
                "99.9%"
              ],
              [
                "Owner",
                "Partner"
              ]
            ]
          },
          "sprite": "cloud",
          "tags": [
            "container",
            "external",
            "api"
          ],
          "technology": "REST API",
          "type": "ContainerExt"
        }
      ],
      "properties": {
        "base_shape": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional base shape override (supported by some element classes).",
          "title": "Base Shape"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional technology.",
          "title": "Technology"
        },
        "type": {
          "const": "ContainerExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "ContainerExt",
      "type": "object"
    },
    "ContainerQueueExtSchema": {
      "examples": [
        {
          "alias": "partner_fulfillment_topic",
          "description": "External topic with fulfillment status updates.",
          "label": "Partner Fulfillment Topic",
          "link": "https://partner.example.com/events",
          "properties": {
            "properties": [
              [
                "Broker",
                "Managed Kafka"
              ],
              [
                "Format",
                "Avro"
              ]
            ]
          },
          "sprite": "queue",
          "tags": [
            "container",
            "queue",
            "external"
          ],
          "technology": "Kafka",
          "type": "ContainerQueueExt"
        }
      ],
      "properties": {
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional technology.",
          "title": "Technology"
        },
        "type": {
          "const": "ContainerQueueExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "ContainerQueueExt",
      "type": "object"
    },
    "ContainerQueueSchema": {
      "examples": [
        {
          "alias": "payment_events_queue",
          "description": "Carries asynchronous payment status updates.",
          "label": "Payment Events Queue",
          "link": "https://ops.example.com/rabbitmq",
          "properties": {
            "properties": [
              [
                "Durable",
                "true"
              ],
              [
                "DLQ",
                "payment_events_dlq"
              ]
            ]
          },
          "sprite": "queue",
          "tags": [
            "container",
            "queue",
            "internal"
          ],
          "technology": "RabbitMQ",
          "type": "ContainerQueue"
        }
      ],
      "properties": {
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional technology.",
          "title": "Technology"
        },
        "type": {
          "const": "ContainerQueue",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "ContainerQueue",
      "type": "object"
    },
    "ContainerSchema": {
      "examples": [
        {
          "alias": "backend_api",
          "base_shape": "RoundedBox",
          "description": "Main backend API serving web and mobile clients.",
          "label": "Backend API",
          "link": "https://api.example.com",
          "properties": {
            "properties": [
              [
                "Runtime",
                "Python 3.12"
              ],
              [
                "Team",
                "Platform"
              ]
            ]
          },
          "sprite": "server",
          "tags": [
            "container",
            "api",
            "core"
          ],
          "technology": "Python / FastAPI",
          "type": "Container"
        }
      ],
      "properties": {
        "base_shape": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional base shape override (supported by some element classes).",
          "title": "Base Shape"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional technology.",
          "title": "Technology"
        },
        "type": {
          "const": "Container",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "Container",
      "type": "object"
    },
    "ContainerTagSchema": {
      "properties": {
        "type": {
          "const": "ContainerTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ContainerTagSchema",
      "type": "object"
    },
    "Details": {
      "description": "Defines PlantUML legend details.",
      "enum": [
        "Small",
        "Normal",
        "None"
      ],
      "title": "Details",
      "type": "string"
    },
    "DiagramElementPropertiesSchema": {
      "properties": {
        "show_header": {
          "default": true,
          "description": "Whether to display the header row.",
          "title": "Show Header",
          "type": "boolean"
        },
        "header": {
          "default": [
            "Property",
            "Value"
          ],
          "description": "Header columns.",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "title": "Header",
          "type": "array"
        },
        "properties": {
          "type": "array",
          "items": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "List of rows (each row is a list of string values).",
          "title": "Properties"
        }
      },
      "required": [
        "properties"
      ],
      "title": "DiagramElementPropertiesSchema",
      "type": "object"
    },
    "DiagramLayout": {
      "description": "Defines layout direction options for a PlantUML diagram.\n\nThis enum controls how diagram elements are arranged visually using\npredefined PlantUML layout macros.",
      "enum": [
        "LAYOUT_TOP_DOWN",
        "LAYOUT_LEFT_RIGHT",
        "LAYOUT_LANDSCAPE"
      ],
      "title": "DiagramLayout",
      "type": "string"
    },
    "ElementStyleSchema": {
      "properties": {
        "type": {
          "const": "ElementStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "element_name": {
          "description": "C4 element type to style (e.g. 'person', 'system', 'container'). This applies to all elements of the given type, not a specific instance.",
          "title": "Element Name",
          "type": "string"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font/text color.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line color.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shape macro used for rendering."
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon applied to the element.",
          "title": "Sprite"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend label for this styled element.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend sprite for this styled element.",
          "title": "Legend Sprite"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "element_name"
      ],
      "title": "ElementStyleSchema",
      "type": "object"
    },
    "ElementTagSchema": {
      "properties": {
        "type": {
          "const": "ElementTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ElementTagSchema",
      "type": "object"
    },
    "EnterpriseBoundarySchema": {
      "examples": [
        {
          "alias": "acme",
          "boundaries": [
            {
              "alias": "commerce_domain",
              "boundaries": [],
              "elements": [],
              "label": "Commerce Domain",
              "relationships": [],
              "type": "SystemBoundary"
            }
          ],
          "description": "Enterprise boundary containing internal platforms.",
          "elements": [
            {
              "alias": "customer_portal",
              "description": "Entry point for customers.",
              "label": "Customer Portal",
              "type": "System"
            },
            {
              "alias": "shared_identity",
              "description": "Central authentication service.",
              "label": "Shared Identity",
              "type": "System"
            }
          ],
          "label": "Acme Corp",
          "link": "https://acme.example.com",
          "properties": {
            "properties": [
              [
                "Region",
                "EU"
              ],
              [
                "Department",
                "Digital"
              ]
            ]
          },
          "relationships": [
            {
              "from": "customer_portal",
              "label": "Authenticates via",
              "technology": "OIDC",
              "to": "shared_identity",
              "type": "REL"
            }
          ],
          "tags": [
            "enterprise"
          ],
          "type": "EnterpriseBoundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/RelationshipSchema"
          },
          "title": "Relationships",
          "type": "array"
        },
        "type": {
          "const": "EnterpriseBoundary",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        },
        "elements": {
          "description": "Elements may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/PersonSchema"
              },
              {
                "$ref": "#/$defs/PersonExtSchema"
              },
              {
                "$ref": "#/$defs/SystemSchema"
              },
              {
                "$ref": "#/$defs/SystemExtSchema"
              },
              {
                "$ref": "#/$defs/SystemDbSchema"
              },
              {
                "$ref": "#/$defs/SystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerSchema"
              },
              {
                "$ref": "#/$defs/ContainerExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/BoundarySchema"
              },
              {
                "$ref": "#/$defs/EnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/SystemBoundarySchema"
              },
              {
                "$ref": "#/$defs/ContainerBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "EnterpriseBoundary",
      "type": "object"
    },
    "EnterpriseBoundaryStyleSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "EnterpriseBoundaryStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "element_name": {
          "description": "C4 element type to style (e.g. 'person', 'system', 'container'). This applies to all elements of the given type, not a specific instance.",
          "title": "Element Name",
          "type": "string"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font/text color.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line color.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shape macro used for rendering."
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon applied to the element.",
          "title": "Sprite"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend label for this styled element.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend sprite for this styled element.",
          "title": "Legend Sprite"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "element_name"
      ],
      "title": "EnterpriseBoundaryStyleSchema",
      "type": "object"
    },
    "ExternalComponentTagSchema": {
      "properties": {
        "type": {
          "const": "ExternalComponentTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ExternalComponentTagSchema",
      "type": "object"
    },
    "ExternalContainerTagSchema": {
      "properties": {
        "type": {
          "const": "ExternalContainerTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ExternalContainerTagSchema",
      "type": "object"
    },
    "ExternalPersonTagSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "ExternalPersonTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the person symbol.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used in the label.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border color of the person symbol.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the person border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ExternalPersonTagSchema",
      "type": "object"
    },
    "ExternalSystemTagSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "ExternalSystemTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the system element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used in system labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border color of the system element.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the system border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "ExternalSystemTagSchema",
      "type": "object"
    },
    "LayoutSchema": {
      "properties": {
        "type": {
          "$ref": "#/$defs/LayoutType",
          "description": "Type of the layout."
        },
        "from": {
          "description": "The source element alias (or unique label).",
          "minLength": 1,
          "title": "From",
          "type": "string"
        },
        "to": {
          "description": "The destination element alias (or unique label).",
          "minLength": 1,
          "title": "To",
          "type": "string"
        }
      },
      "required": [
        "type",
        "from",
        "to"
      ],
      "title": "Layout",
      "type": "object"
    },
    "LayoutType": {
      "description": "Enum representing layout modifiers for diagram elements.",
      "enum": [
        "LAY_D",
        "LAY_DOWN",
        "LAY_U",
        "LAY_UP",
        "LAY_R",
        "LAY_RIGHT",
        "LAY_L",
        "LAY_LEFT"
      ],
      "title": "LayoutType",
      "type": "string"
    },
    "LineStyle": {
      "description": "Defines PlantUML line style.",
      "enum": [
        "DashedLine",
        "DottedLine",
        "BoldLine",
        "SolidLine"
      ],
      "title": "LineStyle",
      "type": "string"
    },
    "MermaidElementStyleSchema": {
      "properties": {
        "type": {
          "const": "ElementStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "element": {
          "description": "Alias of the element to style.",
          "title": "Element",
          "type": "string"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font/text color.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line color.",
          "title": "Border Color"
        }
      },
      "required": [
        "type",
        "element"
      ],
      "title": "MermaidElementStyleSchema",
      "type": "object"
    },
    "MermaidRelStyleSchema": {
      "properties": {
        "type": {
          "const": "RelStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "from_element": {
          "description": "Alias of the source element to style.",
          "title": "From Element",
          "type": "string"
        },
        "to_element": {
          "description": "Alias of the target element to style.",
          "title": "To Element",
          "type": "string"
        },
        "text_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the relationship label text.",
          "title": "Text Color"
        },
        "line_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the relationship line.",
          "title": "Line Color"
        },
        "offset_x": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional horizontal offset for the label position.",
          "title": "Offset X"
        },
        "offset_y": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional horizontal offset for the label position.",
          "title": "Offset Y"
        }
      },
      "required": [
        "type",
        "from_element",
        "to_element"
      ],
      "title": "MermaidRelStyleSchema",
      "type": "object"
    },
    "MermaidRenderOptionsSchema": {
      "properties": {
        "styles": {
          "description": "List of style update macro configurations.",
          "items": {
            "discriminator": {
              "mapping": {
                "ElementStyle": "#/$defs/MermaidElementStyleSchema",
                "RelStyle": "#/$defs/MermaidRelStyleSchema"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/MermaidElementStyleSchema"
              },
              {
                "$ref": "#/$defs/MermaidRelStyleSchema"
              }
            ]
          },
          "title": "Styles",
          "type": "array"
        },
        "update_layout_config": {
          "anyOf": [
            {
              "$ref": "#/$defs/UpdateLayoutConfigSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Configuration for updating default layout behavior."
        }
      },
      "title": "MermaidRenderOptionsSchema",
      "type": "object"
    },
    "NodeTagSchema": {
      "properties": {
        "type": {
          "const": "NodeTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used for labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the element border.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the element border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "NodeTagSchema",
      "type": "object"
    },
    "PersonExtSchema": {
      "examples": [
        {
          "alias": "auditor",
          "description": "External compliance reviewer.",
          "label": "Auditor",
          "link": "https://partner.example.com",
          "properties": {
            "properties": [
              [
                "Organization",
                "Compliance Partner"
              ],
              [
                "Access",
                "Read-only"
              ]
            ]
          },
          "sprite": "user",
          "stereotype": "External User",
          "tags": [
            "person",
            "external"
          ],
          "type": "PersonExt"
        }
      ],
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "PersonExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "PersonExt",
      "type": "object"
    },
    "PersonSchema": {
      "examples": [
        {
          "alias": "store_manager",
          "description": "Manages product catalog and promotions.",
          "label": "Store Manager",
          "link": "https://intranet.example.com",
          "properties": {
            "properties": [
              [
                "Department",
                "Retail Ops"
              ],
              [
                "Role",
                "Manager"
              ]
            ]
          },
          "sprite": "user",
          "stereotype": "Business User",
          "tags": [
            "person",
            "internal"
          ],
          "type": "Person"
        }
      ],
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "Person",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "Person",
      "type": "object"
    },
    "PersonTagSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "PersonTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the person symbol.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used in the label.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border color of the person symbol.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the person border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "PersonTagSchema",
      "type": "object"
    },
    "PlantUMLRenderOptionsSchema": {
      "properties": {
        "includes": {
          "description": "A list of PlantUML `!include` directives to be injected at the beginning of the diagram.",
          "items": {
            "type": "string"
          },
          "title": "Includes",
          "type": "array"
        },
        "layout": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramLayout"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Layout direction."
        },
        "layout_with_legend": {
          "default": false,
          "description": "Whether to apply the LAYOUT_WITH_LEGEND macro.",
          "title": "Layout With Legend",
          "type": "boolean"
        },
        "layout_as_sketch": {
          "default": false,
          "description": "Whether to apply the LAYOUT_AS_SKETCH macro.",
          "title": "Layout As Sketch",
          "type": "boolean"
        },
        "set_sketch_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/SetSketchStyleSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sketch-style visual customization."
        },
        "show_legend": {
          "anyOf": [
            {
              "$ref": "#/$defs/ShowLegendSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Configuration for the SHOW_LEGEND macro."
        },
        "show_floating_legend": {
          "anyOf": [
            {
              "$ref": "#/$defs/ShowFloatingLegendSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Configuration for the SHOW_FLOATING_LEGEND macro."
        },
        "hide_stereotype": {
          "default": false,
          "description": "Whether to hide stereotype labels globally.",
          "title": "Hide Stereotype",
          "type": "boolean"
        },
        "hide_person_sprite": {
          "default": false,
          "description": "Whether to hide person sprites globally.",
          "title": "Hide Person Sprite",
          "type": "boolean"
        },
        "show_person_sprite": {
          "anyOf": [
            {
              "$ref": "#/$defs/ShowPersonSpriteSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Configuration for the SHOW_PERSON_SPRITE macro."
        },
        "show_person_portrait": {
          "default": false,
          "description": "Whether to enable person portraits.",
          "title": "Show Person Portrait",
          "type": "boolean"
        },
        "show_person_outline": {
          "default": false,
          "description": "Whether to enable person outlines.",
          "title": "Show Person Outline",
          "type": "boolean"
        },
        "without_property_header": {
          "default": false,
          "description": "If true, omit the header row and render the second column in bold.",
          "title": "Without Property Header",
          "type": "boolean"
        },
        "legend_title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional title displayed above the legend.",
          "title": "Legend Title"
        },
        "tags": {
          "description": "List of tag macro configurations.",
          "items": {
            "discriminator": {
              "mapping": {
                "BoundaryTag": "#/$defs/BoundaryTagSchema",
                "ComponentTag": "#/$defs/ComponentTagSchema",
                "ContainerTag": "#/$defs/ContainerTagSchema",
                "ElementTag": "#/$defs/ElementTagSchema",
                "ExternalComponentTag": "#/$defs/ExternalComponentTagSchema",
                "ExternalContainerTag": "#/$defs/ExternalContainerTagSchema",
                "ExternalPersonTag": "#/$defs/ExternalPersonTagSchema",
                "ExternalSystemTag": "#/$defs/ExternalSystemTagSchema",
                "NodeTag": "#/$defs/NodeTagSchema",
                "PersonTag": "#/$defs/PersonTagSchema",
                "RelTag": "#/$defs/RelTagSchema",
                "SystemTag": "#/$defs/SystemTagSchema"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/ElementTagSchema"
              },
              {
                "$ref": "#/$defs/BoundaryTagSchema"
              },
              {
                "$ref": "#/$defs/ComponentTagSchema"
              },
              {
                "$ref": "#/$defs/ExternalComponentTagSchema"
              },
              {
                "$ref": "#/$defs/ContainerTagSchema"
              },
              {
                "$ref": "#/$defs/ExternalContainerTagSchema"
              },
              {
                "$ref": "#/$defs/NodeTagSchema"
              },
              {
                "$ref": "#/$defs/RelTagSchema"
              },
              {
                "$ref": "#/$defs/PersonTagSchema"
              },
              {
                "$ref": "#/$defs/ExternalPersonTagSchema"
              },
              {
                "$ref": "#/$defs/SystemTagSchema"
              },
              {
                "$ref": "#/$defs/ExternalSystemTagSchema"
              }
            ]
          },
          "title": "Tags",
          "type": "array"
        },
        "styles": {
          "description": "List of style update macro configurations.",
          "items": {
            "discriminator": {
              "mapping": {
                "BoundaryStyle": "#/$defs/BoundaryStyleSchema",
                "ContainerBoundaryStyle": "#/$defs/ContainerBoundaryStyleSchema",
                "ElementStyle": "#/$defs/ElementStyleSchema",
                "EnterpriseBoundaryStyle": "#/$defs/EnterpriseBoundaryStyleSchema",
                "RelStyle": "#/$defs/RelStyleSchema",
                "SystemBoundaryStyle": "#/$defs/SystemBoundaryStyleSchema"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/ElementStyleSchema"
              },
              {
                "$ref": "#/$defs/BoundaryStyleSchema"
              },
              {
                "$ref": "#/$defs/ContainerBoundaryStyleSchema"
              },
              {
                "$ref": "#/$defs/SystemBoundaryStyleSchema"
              },
              {
                "$ref": "#/$defs/EnterpriseBoundaryStyleSchema"
              },
              {
                "$ref": "#/$defs/RelStyleSchema"
              }
            ]
          },
          "title": "Styles",
          "type": "array"
        }
      },
      "title": "PlantUMLRenderOptionsSchema",
      "type": "object"
    },
    "RelStyleSchema": {
      "properties": {
        "type": {
          "const": "RelStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "text_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the relationship label text.",
          "title": "Text Color"
        },
        "line_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the relationship line.",
          "title": "Line Color"
        }
      },
      "required": [
        "type"
      ],
      "title": "RelStyleSchema",
      "type": "object"
    },
    "RelTagSchema": {
      "properties": {
        "type": {
          "const": "RelTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "text_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the relationship label text.",
          "title": "Text Color"
        },
        "line_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color of the relationship line.",
          "title": "Line Color"
        },
        "line_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Relationship line style macro."
        },
        "line_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the relationship line.",
          "title": "Line Thickness"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label associated with the relationship.",
          "title": "Technology"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "RelTagSchema",
      "type": "object"
    },
    "RelationshipSchema": {
      "properties": {
        "type": {
          "$ref": "#/$defs/RelationshipType",
          "description": "Type of the relationship."
        },
        "from": {
          "description": "The source element alias (or unique label).",
          "minLength": 1,
          "title": "From",
          "type": "string"
        },
        "to": {
          "description": "The destination element alias (or unique label).",
          "minLength": 1,
          "title": "To",
          "type": "string"
        },
        "label": {
          "description": "The label shown on the relationship edge.",
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Additional details about the relationship.",
          "title": "Description"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The technology used in the communication.",
          "title": "Technology"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon to represent the relationship.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL link associated with the relationship.",
          "title": "Link"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "from",
        "to",
        "label"
      ],
      "title": "Relationship",
      "type": "object"
    },
    "RelationshipType": {
      "description": "Enum representing different types of relationships between\ndiagram elements.",
      "enum": [
        "REL",
        "BI_REL",
        "REL_BACK",
        "REL_NEIGHBOR",
        "BI_REL_NEIGHBOR",
        "REL_BACK_NEIGHBOR",
        "REL_D",
        "REL_DOWN",
        "BI_REL_D",
        "BI_REL_DOWN",
        "REL_U",
        "REL_UP",
        "BI_REL_U",
        "BI_REL_UP",
        "REL_L",
        "REL_LEFT",
        "BI_REL_L",
        "BI_REL_LEFT",
        "REL_R",
        "REL_RIGHT",
        "BI_REL_R",
        "BI_REL_RIGHT"
      ],
      "title": "RelationshipType",
      "type": "string"
    },
    "RenderOptionsSchema": {
      "properties": {
        "plantuml": {
          "anyOf": [
            {
              "$ref": "#/$defs/PlantUMLRenderOptionsSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "PlantUML-specific render options."
        },
        "mermaid": {
          "anyOf": [
            {
              "$ref": "#/$defs/MermaidRenderOptionsSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Mermaid-specific render options."
        }
      },
      "title": "RenderOptionsSchema",
      "type": "object"
    },
    "SetSketchStyleSchema": {
      "properties": {
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the diagram.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color for all diagram text.",
          "title": "Font Color"
        },
        "warning_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Color used for warning messages in the footer.",
          "title": "Warning Color"
        },
        "font_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font family name to use.",
          "title": "Font Name"
        },
        "footer_warning": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional warning message shown in the footer.",
          "title": "Footer Warning"
        },
        "footer_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional footer text message.",
          "title": "Footer Text"
        }
      },
      "title": "SetSketchStyleSchema",
      "type": "object"
    },
    "ShowFloatingLegendSchema": {
      "properties": {
        "hide_stereotype": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to hide stereotype labels in the legend.",
          "title": "Hide Stereotype"
        },
        "details": {
          "$ref": "#/$defs/Details",
          "default": "Small",
          "description": "Legend detail level."
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional alias for the floating legend box.",
          "title": "Alias"
        }
      },
      "title": "ShowFloatingLegendSchema",
      "type": "object"
    },
    "ShowLegendSchema": {
      "properties": {
        "hide_stereotype": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Whether to hide stereotype labels in the legend.",
          "title": "Hide Stereotype"
        },
        "details": {
          "$ref": "#/$defs/Details",
          "default": "Small",
          "description": "Legend detail level."
        }
      },
      "title": "ShowLegendSchema",
      "type": "object"
    },
    "ShowPersonSpriteSchema": {
      "properties": {
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite alias used for the person icon.",
          "title": "Alias"
        }
      },
      "title": "ShowPersonSpriteSchema",
      "type": "object"
    },
    "SystemBoundarySchema": {
      "examples": [
        {
          "alias": "commerce_platform",
          "boundaries": [],
          "description": "Boundary for the commerce system and its internal components.",
          "elements": [
            {
              "alias": "web_storefront",
              "description": "Frontend for browsing and checkout.",
              "label": "Web Storefront",
              "type": "System"
            },
            {
              "alias": "orders_db",
              "description": "Stores orders and payment state.",
              "label": "Orders DB",
              "type": "SystemDb"
            }
          ],
          "label": "Commerce Platform",
          "link": "https://docs.example.com/commerce",
          "properties": {
            "properties": [
              [
                "Owner",
                "Commerce Team"
              ],
              [
                "Environment",
                "Production"
              ]
            ]
          },
          "relationships": [
            {
              "from": "web_storefront",
              "label": "Reads and writes orders",
              "technology": "SQL",
              "to": "orders_db",
              "type": "REL"
            }
          ],
          "tags": [
            "system_boundary"
          ],
          "type": "SystemBoundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/RelationshipSchema"
          },
          "title": "Relationships",
          "type": "array"
        },
        "type": {
          "const": "SystemBoundary",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        },
        "elements": {
          "description": "Elements may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/PersonSchema"
              },
              {
                "$ref": "#/$defs/PersonExtSchema"
              },
              {
                "$ref": "#/$defs/SystemSchema"
              },
              {
                "$ref": "#/$defs/SystemExtSchema"
              },
              {
                "$ref": "#/$defs/SystemDbSchema"
              },
              {
                "$ref": "#/$defs/SystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueSchema"
              },
              {
                "$ref": "#/$defs/SystemQueueExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerSchema"
              },
              {
                "$ref": "#/$defs/ContainerExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbSchema"
              },
              {
                "$ref": "#/$defs/ContainerDbExtSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueSchema"
              },
              {
                "$ref": "#/$defs/ContainerQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/BoundarySchema"
              },
              {
                "$ref": "#/$defs/EnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/SystemBoundarySchema"
              },
              {
                "$ref": "#/$defs/ContainerBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemBoundary",
      "type": "object"
    },
    "SystemBoundaryStyleSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemBoundaryStyle",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "element_name": {
          "description": "C4 element type to style (e.g. 'person', 'system', 'container'). This applies to all elements of the given type, not a specific instance.",
          "title": "Element Name",
          "type": "string"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font/text color.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line color.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Shape macro used for rendering."
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon applied to the element.",
          "title": "Sprite"
        },
        "technology": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Technology label shown on the element.",
          "title": "Technology"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend label for this styled element.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Legend sprite for this styled element.",
          "title": "Legend Sprite"
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "element_name"
      ],
      "title": "SystemBoundaryStyleSchema",
      "type": "object"
    },
    "SystemDbExtSchema": {
      "examples": [
        {
          "alias": "credit_bureau_db",
          "description": "External database with risk assessment data.",
          "label": "Credit Bureau DB",
          "link": "https://partner.example.com/risk",
          "properties": {
            "properties": [
              [
                "Provider",
                "RiskCo"
              ],
              [
                "Access",
                "Read-only"
              ]
            ]
          },
          "sprite": "database",
          "stereotype": "External Database",
          "tags": [
            "database",
            "external"
          ],
          "type": "SystemDbExt"
        }
      ],
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemDbExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemDbExt",
      "type": "object"
    },
    "SystemDbSchema": {
      "examples": [
        {
          "alias": "customer_profile_db",
          "description": "Stores customer preferences and account metadata.",
          "label": "Customer Profile DB",
          "link": "https://db.example.com/customer-profile",
          "properties": {
            "properties": [
              [
                "Engine",
                "PostgreSQL"
              ],
              [
                "Backup",
                "Daily"
              ]
            ]
          },
          "sprite": "database",
          "stereotype": "Database",
          "tags": [
            "database",
            "internal"
          ],
          "type": "SystemDb"
        }
      ],
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemDb",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemDb",
      "type": "object"
    },
    "SystemExtSchema": {
      "examples": [
        {
          "alias": "shipping_provider",
          "description": "External logistics platform for shipment booking and tracking.",
          "label": "Shipping Provider",
          "link": "https://shipping.example.com",
          "properties": {
            "properties": [
              [
                "Protocol",
                "REST"
              ],
              [
                "SLA",
                "99.9%"
              ]
            ]
          },
          "sprite": "truck",
          "stereotype": "External System",
          "tags": [
            "system",
            "external"
          ],
          "type": "SystemExt"
        }
      ],
      "properties": {
        "base_shape": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional base shape override (supported by some element classes).",
          "title": "Base Shape"
        },
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemExt",
      "type": "object"
    },
    "SystemQueueExtSchema": {
      "examples": [
        {
          "alias": "partner_events_topic",
          "description": "External event topic carrying delivery status updates.",
          "label": "Partner Events Topic",
          "link": "https://partner.example.com/events",
          "properties": {
            "properties": [
              [
                "Broker",
                "Kafka"
              ],
              [
                "Format",
                "Avro"
              ]
            ]
          },
          "sprite": "queue",
          "stereotype": "External Queue",
          "tags": [
            "queue",
            "external"
          ],
          "type": "SystemQueueExt"
        }
      ],
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemQueueExt",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemQueueExt",
      "type": "object"
    },
    "SystemQueueSchema": {
      "examples": [
        {
          "alias": "order_events_stream",
          "description": "Internal stream of order lifecycle events.",
          "label": "Order Events Stream",
          "link": "https://kafka.example.com/topics/order-events",
          "properties": {
            "properties": [
              [
                "Retention",
                "7 days"
              ],
              [
                "Partitions",
                "12"
              ]
            ]
          },
          "sprite": "queue",
          "stereotype": "Queue",
          "tags": [
            "queue",
            "internal"
          ],
          "type": "SystemQueue"
        }
      ],
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemQueue",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemQueue",
      "type": "object"
    },
    "SystemSchema": {
      "examples": [
        {
          "alias": "inventory_service",
          "description": "Tracks stock levels and reservation state.",
          "label": "Inventory Service",
          "link": "https://inventory.example.com",
          "properties": {
            "properties": [
              [
                "Language",
                "Python"
              ],
              [
                "Team",
                "Supply Chain"
              ]
            ]
          },
          "sprite": "server",
          "stereotype": "Software System",
          "tags": [
            "system",
            "internal"
          ],
          "type": "System"
        }
      ],
      "properties": {
        "base_shape": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional base shape override (supported by some element classes).",
          "title": "Base Shape"
        },
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "System",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "Display name for the element.",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional description text.",
          "title": "Description"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional sprite/icon reference.",
          "title": "Sprite"
        },
        "tags": {
          "description": "Optional tags for grouping/styling. These tags can be referenced by `tag_stereo` in tag definitions.",
          "items": {
            "type": "string"
          },
          "title": "Tags",
          "type": "array"
        },
        "link": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional URL associated with the element.",
          "title": "Link"
        },
        "alias": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Unique identifier for the element. If not provided, it is autogenerated from the label.",
          "title": "Alias"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "System",
      "type": "object"
    },
    "SystemTagSchema": {
      "properties": {
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional custom type/stereotype label.",
          "title": "Stereotype"
        },
        "type": {
          "const": "SystemTag",
          "description": "Discriminator identifying the element type.",
          "title": "Type",
          "type": "string"
        },
        "tag_stereo": {
          "description": "Stereotype name of the tag. Must match one of the tags declared in the `tags` field of a diagram component.",
          "title": "Tag Stereo",
          "type": "string"
        },
        "legend_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Text shown in the diagram legend for this tag.",
          "title": "Legend Text"
        },
        "legend_sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite displayed in the legend for this tag.",
          "title": "Legend Sprite"
        },
        "sprite": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Sprite icon associated with the element or relationship.",
          "title": "Sprite"
        },
        "bg_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Background color of the system element.",
          "title": "Bg Color"
        },
        "font_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Font color used in system labels.",
          "title": "Font Color"
        },
        "border_color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border color of the system element.",
          "title": "Border Color"
        },
        "shadowing": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": false,
          "description": "Shadow style/toggle.",
          "title": "Shadowing"
        },
        "shape": {
          "anyOf": [
            {
              "$ref": "#/$defs/TagShape"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional shape macro used for rendering."
        },
        "border_style": {
          "anyOf": [
            {
              "$ref": "#/$defs/LineStyle"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Border line style macro."
        },
        "border_thickness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Thickness of the system border line.",
          "title": "Border Thickness"
        }
      },
      "required": [
        "type",
        "tag_stereo"
      ],
      "title": "SystemTagSchema",
      "type": "object"
    },
    "TagShape": {
      "description": "Defines PlantUML tag shape.",
      "enum": [
        "EightSidedShape",
        "RoundedBoxShape"
      ],
      "title": "TagShape",
      "type": "string"
    },
    "UpdateLayoutConfigSchema": {
      "properties": {
        "c4_shape_in_row": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Maximum number of non-boundary elements (e.g. systems, containers, components) per row.",
          "title": "C4 Shape In Row"
        },
        "c4_boundary_in_row": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Maximum number of boundaries per row.",
          "title": "C4 Boundary In Row"
        }
      },
      "title": "UpdateLayoutConfigSchema",
      "type": "object"
    }
  }
}
