{
  "title": "SystemLandscapeDiagram",
  "type": "object",
  "properties": {
    "elements": {
      "description": "Top-level elements.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/MermaidPersonSchema"
          },
          {
            "$ref": "#/$defs/MermaidPersonExtSchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemSchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemExtSchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemDbSchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemDbExtSchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemQueueSchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemQueueExtSchema"
          }
        ]
      },
      "title": "Elements",
      "type": "array"
    },
    "boundaries": {
      "description": "Top-level boundaries.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/MermaidBoundarySchema"
          },
          {
            "$ref": "#/$defs/MermaidEnterpriseBoundarySchema"
          },
          {
            "$ref": "#/$defs/MermaidSystemBoundarySchema"
          }
        ]
      },
      "title": "Boundaries",
      "type": "array"
    },
    "relationships": {
      "description": "Top-level relationships.",
      "items": {
        "$ref": "#/$defs/MermaidRelationshipSchema"
      },
      "title": "Relationships",
      "type": "array"
    },
    "type": {
      "const": "SystemLandscapeDiagram",
      "description": "Type of the diagram.",
      "title": "Type",
      "type": "string"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional diagram title.",
      "title": "Title"
    },
    "backend": {
      "const": "mermaid",
      "description": "JSON schema backend.",
      "title": "Backend",
      "type": "string"
    },
    "render_options": {
      "anyOf": [
        {
          "$ref": "#/$defs/MermaidRenderOptionsSchema"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Mermaid-specific render options."
    }
  },
  "required": [
    "type",
    "backend"
  ],
  "additionalProperties": false,
  "$defs": {
    "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"
    },
    "MermaidBoundarySchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "commerce_platform",
          "boundaries": [],
          "description": "Boundary for the commerce system.",
          "elements": [
            {
              "alias": "web_storefront",
              "label": "Web Storefront",
              "type": "System"
            },
            {
              "alias": "orders_db",
              "label": "Orders DB",
              "type": "SystemDb"
            }
          ],
          "label": "Commerce Platform",
          "relationships": [
            {
              "from": "orders_db",
              "label": "Returns order history",
              "technology": "SQL",
              "to": "web_storefront",
              "type": "REL_BACK"
            }
          ],
          "stereotype": "enterprise",
          "type": "Boundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/MermaidRelationshipSchema"
          },
          "title": "Relationships",
          "type": "array"
        },
        "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"
        },
        "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/MermaidPersonSchema"
              },
              {
                "$ref": "#/$defs/MermaidPersonExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemDbSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemQueueSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/MermaidBoundarySchema"
              },
              {
                "$ref": "#/$defs/MermaidEnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        },
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional Mermaid boundary type/stereotype label.",
          "title": "Stereotype"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "Boundary",
      "type": "object"
    },
    "MermaidElementStyleSchema": {
      "additionalProperties": false,
      "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"
    },
    "MermaidEnterpriseBoundarySchema": {
      "additionalProperties": false,
      "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",
          "properties": {
            "properties": [
              [
                "Region",
                "EU"
              ],
              [
                "Department",
                "Digital"
              ]
            ]
          },
          "relationships": [
            {
              "from": "customer_portal",
              "label": "Authenticates via",
              "technology": "OIDC",
              "to": "shared_identity",
              "type": "REL"
            }
          ],
          "type": "EnterpriseBoundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/MermaidRelationshipSchema"
          },
          "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"
        },
        "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/MermaidPersonSchema"
              },
              {
                "$ref": "#/$defs/MermaidPersonExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemDbSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemQueueSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/MermaidBoundarySchema"
              },
              {
                "$ref": "#/$defs/MermaidEnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        },
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional Mermaid boundary type/stereotype label.",
          "title": "Stereotype"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "EnterpriseBoundary",
      "type": "object"
    },
    "MermaidPersonExtSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "auditor",
          "description": "External compliance reviewer.",
          "label": "Auditor",
          "properties": {
            "properties": [
              [
                "Organization",
                "Compliance Partner"
              ],
              [
                "Access",
                "Read-only"
              ]
            ]
          },
          "type": "PersonExt"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidPersonSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "store_manager",
          "description": "Manages product catalog and promotions.",
          "label": "Store Manager",
          "properties": {
            "properties": [
              [
                "Department",
                "Retail Ops"
              ],
              [
                "Role",
                "Manager"
              ]
            ]
          },
          "type": "Person"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidRelStyleSchema": {
      "additionalProperties": false,
      "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 vertical offset for the label position.",
          "title": "Offset Y"
        }
      },
      "required": [
        "type",
        "from_element",
        "to_element"
      ],
      "title": "MermaidRelStyleSchema",
      "type": "object"
    },
    "MermaidRelationshipSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "from": "idp",
          "label": "Returns identity token",
          "technology": "OIDC",
          "to": "web_app",
          "type": "REL_BACK"
        }
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/MermaidRelationshipType",
          "description": "Type of the relationship."
        },
        "from": {
          "description": "The source element alias (or unique label). For Mermaid, this must resolve to a concrete element, not a boundary.",
          "minLength": 1,
          "title": "From",
          "type": "string"
        },
        "to": {
          "description": "The destination element alias (or unique label). For Mermaid, this must resolve to a concrete element, not a boundary.",
          "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"
        },
        "properties": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiagramElementPropertiesSchema"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional property table metadata."
        }
      },
      "required": [
        "type",
        "from",
        "to",
        "label"
      ],
      "title": "Relationship",
      "type": "object"
    },
    "MermaidRelationshipType": {
      "description": "Relationship types supported by Mermaid C4 diagrams.",
      "enum": [
        "REL",
        "BI_REL",
        "REL_BACK",
        "REL_D",
        "REL_DOWN",
        "REL_U",
        "REL_UP",
        "REL_L",
        "REL_LEFT",
        "REL_R",
        "REL_RIGHT"
      ],
      "title": "RelationshipType",
      "type": "string"
    },
    "MermaidRenderOptionsSchema": {
      "additionalProperties": false,
      "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"
    },
    "MermaidSystemBoundarySchema": {
      "additionalProperties": false,
      "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",
          "properties": {
            "properties": [
              [
                "Owner",
                "Commerce Team"
              ],
              [
                "Environment",
                "Production"
              ]
            ]
          },
          "relationships": [
            {
              "from": "web_storefront",
              "label": "Reads and writes orders",
              "technology": "SQL",
              "to": "orders_db",
              "type": "REL"
            }
          ],
          "type": "SystemBoundary"
        }
      ],
      "properties": {
        "relationships": {
          "description": "Relationships declared inside the boundary.",
          "items": {
            "$ref": "#/$defs/MermaidRelationshipSchema"
          },
          "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"
        },
        "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/MermaidPersonSchema"
              },
              {
                "$ref": "#/$defs/MermaidPersonExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemDbSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemDbExtSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemQueueSchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemQueueExtSchema"
              }
            ]
          },
          "title": "Elements",
          "type": "array"
        },
        "boundaries": {
          "description": "Boundaries may be nested arbitrarily.",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/MermaidBoundarySchema"
              },
              {
                "$ref": "#/$defs/MermaidEnterpriseBoundarySchema"
              },
              {
                "$ref": "#/$defs/MermaidSystemBoundarySchema"
              }
            ]
          },
          "title": "Boundaries",
          "type": "array"
        },
        "stereotype": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional Mermaid boundary type/stereotype label.",
          "title": "Stereotype"
        }
      },
      "required": [
        "type",
        "label"
      ],
      "title": "SystemBoundary",
      "type": "object"
    },
    "MermaidSystemDbExtSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "credit_bureau_db",
          "description": "External database with risk assessment data.",
          "label": "Credit Bureau DB",
          "properties": {
            "properties": [
              [
                "Provider",
                "RiskCo"
              ],
              [
                "Access",
                "Read-only"
              ]
            ]
          },
          "type": "SystemDbExt"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidSystemDbSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "customer_profile_db",
          "description": "Stores customer preferences and account metadata.",
          "label": "Customer Profile DB",
          "properties": {
            "properties": [
              [
                "Engine",
                "PostgreSQL"
              ],
              [
                "Backup",
                "Daily"
              ]
            ]
          },
          "type": "SystemDb"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidSystemExtSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "shipping_provider",
          "description": "External logistics platform for shipment booking and tracking.",
          "label": "Shipping Provider",
          "properties": {
            "properties": [
              [
                "Protocol",
                "REST"
              ],
              [
                "SLA",
                "99.9%"
              ]
            ]
          },
          "type": "SystemExt"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidSystemQueueExtSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "partner_events_topic",
          "description": "External event topic carrying delivery status updates.",
          "label": "Partner Events Topic",
          "properties": {
            "properties": [
              [
                "Broker",
                "Kafka"
              ],
              [
                "Format",
                "Avro"
              ]
            ]
          },
          "type": "SystemQueueExt"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidSystemQueueSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "order_events_stream",
          "description": "Internal stream of order lifecycle events.",
          "label": "Order Events Stream",
          "properties": {
            "properties": [
              [
                "Retention",
                "7 days"
              ],
              [
                "Partitions",
                "12"
              ]
            ]
          },
          "type": "SystemQueue"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "MermaidSystemSchema": {
      "additionalProperties": false,
      "examples": [
        {
          "alias": "inventory_service",
          "description": "Tracks stock levels and reservation state.",
          "label": "Inventory Service",
          "properties": {
            "properties": [
              [
                "Language",
                "Python"
              ],
              [
                "Team",
                "Supply Chain"
              ]
            ]
          },
          "type": "System"
        }
      ],
      "properties": {
        "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"
        },
        "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"
    },
    "UpdateLayoutConfigSchema": {
      "additionalProperties": false,
      "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"
    }
  }
}
