{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://revelation.microplatforms.com/app/reference/schema/revelation-model.schema.json",
  "title": "Revelation Model Schema",
  "description": "Schema for Revelation model JSON files (model, systems, interactions, optional layouts).",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "model",
    "systems",
    "interactions"
  ],
  "$comment": "Semantic checks like ID uniqueness and endpoint referential integrity must be enforced outside JSON Schema.",
  "properties": {
    "model": {
      "type": "object",
      "required": [
        "TITLE",
        "MODELTYPE",
        "LAYOUT"
      ],
      "properties": {
        "TITLE": {
          "$ref": "#/definitions/modelTitleEntry"
        },
        "MODELTYPE": {
          "$ref": "#/definitions/modelTypeEntry"
        },
        "LAYOUT": {
          "$ref": "#/definitions/layoutEntry"
        },
        "VIEW": {
          "$ref": "#/definitions/viewEntry"
        },
        "LAYOUTOPTION": {
          "$ref": "#/definitions/modelMetadataEntry"
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/modelMetadataEntry"
      }
    },
    "systems": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/systemBase"
      }
    },
    "interactions": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/interactionBase"
      }
    },
    "layouts": {
      "type": "object",
      "propertyNames": {
        "$ref": "#/definitions/nonEmptyString"
      },
      "additionalProperties": {
        "$ref": "#/definitions/savedLayout"
      }
    }
  },
  "definitions": {
    "nonEmptyString": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\S"
    },
    "metadataValue": {
      "type": "string"
    },
    "modelMetadataEntry": {
      "type": "object",
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "$ref": "#/definitions/metadataValue"
        },
        "inputType": {
          "type": "string",
          "enum": [
            "date",
            "datetime-local",
            "number",
            "select",
            "text",
            "textarea",
            "url"
          ]
        },
        "refData": {
          "type": "string",
          "enum": [
            "INPUTTYPE",
            "INTERACTIONTYPE",
            "LAYOUTTYPE",
            "MODELTYPE",
            "SYSTEMTYPE",
            "VIEWTYPE"
          ]
        },
        "readOnly": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          ]
        }
      },
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "required": [
              "inputType"
            ],
            "properties": {
              "inputType": {
                "const": "select"
              }
            }
          },
          "then": {
            "required": [
              "refData"
            ]
          }
        }
      ]
    },
    "modelTitleEntry": {
      "allOf": [
        {
          "$ref": "#/definitions/modelMetadataEntry"
        },
        {
          "properties": {
            "value": {
              "$ref": "#/definitions/nonEmptyString"
            }
          }
        }
      ]
    },
    "modelTypeEntry": {
      "type": "object",
      "required": [
        "value",
        "inputType",
        "refData"
      ],
      "properties": {
        "value": {
          "type": "string",
          "enum": [
            "C4",
            "ERD",
            "FLOWCHART",
            "BPMN_LITE",
            "ARCHIMATE",
            "SEQUENCE_DIAGRAM",
            "OTHER"
          ]
        },
        "inputType": {
          "const": "select"
        },
        "refData": {
          "const": "MODELTYPE"
        },
        "readOnly": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "layoutEntry": {
      "type": "object",
      "required": [
        "value",
        "inputType",
        "refData"
      ],
      "properties": {
        "value": {
          "type": "string",
          "enum": [
            "HorizontalFlow",
            "VerticalFlow",
            "Organic",
            "CenteredRectangle",
            "Dynamic",
            "SystemGrid",
            "Sequence"
          ]
        },
        "inputType": {
          "const": "select"
        },
        "refData": {
          "const": "LAYOUTTYPE"
        },
        "readOnly": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "viewEntry": {
      "type": "object",
      "required": [
        "value",
        "inputType",
        "refData"
      ],
      "properties": {
        "value": {
          "type": "string",
          "enum": [
            "Architecture",
            "Capability",
            "Transition"
          ]
        },
        "inputType": {
          "const": "select"
        },
        "refData": {
          "const": "VIEWTYPE"
        },
        "readOnly": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "systemExtraValue": {
      "$comment": "Property keys with the prefix `_src_` are reserved for the Mermaid / PlantUML migration importer (see src/migration/sentinel.js). Do not author these by hand.",
      "type": [
        "string",
        "number",
        "boolean",
        "null"
      ]
    },
    "interactionExtraValue": {
      "$comment": "Property keys with the prefix `_src_` are reserved for the Mermaid / PlantUML migration importer (see src/migration/sentinel.js). Do not author these by hand.",
      "type": [
        "string",
        "number",
        "boolean",
        "null"
      ]
    },
    "systemBase": {
      "type": "object",
      "required": [
        "ID",
        "TEXT",
        "TYPE"
      ],
      "properties": {
        "ID": {
          "$ref": "#/definitions/nonEmptyString"
        },
        "TEXT": {
          "type": "string"
        },
        "TYPE": {
          "$ref": "#/definitions/nonEmptyString"
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/systemExtraValue"
      }
    },
    "interactionBase": {
      "type": "object",
      "required": [
        "ID",
        "TYPE"
      ],
      "properties": {
        "ID": {
          "$ref": "#/definitions/nonEmptyString"
        },
        "FROMID": {
          "$ref": "#/definitions/nonEmptyString"
        },
        "TOID": {
          "$ref": "#/definitions/nonEmptyString"
        },
        "TEXT": {
          "type": "string"
        },
        "TYPE": {
          "$ref": "#/definitions/nonEmptyString"
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/interactionExtraValue"
      }
    },
    "interactionWithEndpoints": {
      "allOf": [
        {
          "$ref": "#/definitions/interactionBase"
        },
        {
          "required": [
            "FROMID",
            "TOID"
          ]
        }
      ]
    },
    "sequenceFragmentInteraction": {
      "allOf": [
        {
          "$ref": "#/definitions/interactionBase"
        },
        {
          "properties": {
            "TYPE": {
              "type": "string",
              "enum": [
                "SEQ_FRG_ALT",
                "SEQ_FRG_OPT",
                "SEQ_FRG_LOOP",
                "SEQ_FRG_BREAK",
                "SEQ_FRG_PAR",
                "SEQ_FRG_REF",
                "SEQ_FRG_END"
              ]
            }
          }
        },
        {
          "not": {
            "anyOf": [
              {
                "required": [
                  "FROMID"
                ]
              },
              {
                "required": [
                  "TOID"
                ]
              }
            ]
          }
        }
      ]
    },
    "sequenceMessageInteraction": {
      "allOf": [
        {
          "$ref": "#/definitions/interactionWithEndpoints"
        },
        {
          "properties": {
            "TYPE": {
              "type": "string",
              "enum": [
                "SEQ_SYNC_CALL",
                "SEQ_ASYNC_CALL",
                "SEQ_RETURN",
                "SEQ_CREATE",
                "SEQ_DESTROY",
                "SEQ_FOUND",
                "SEQ_LOST"
              ]
            }
          }
        }
      ]
    },
    "layoutGeometry": {
      "type": "object",
      "required": [
        "x",
        "y",
        "width",
        "height"
      ],
      "properties": {
        "x": {
          "type": "number"
        },
        "y": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "height": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "layoutSystemState": {
      "type": "object",
      "required": [
        "isSelected"
      ],
      "properties": {
        "isSelected": {
          "type": "boolean"
        },
        "geometry": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/definitions/layoutGeometry"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "layoutEdgeState": {
      "type": "object",
      "required": [
        "isSelected"
      ],
      "properties": {
        "isSelected": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "savedLayout": {
      "type": "object",
      "properties": {
        "systems": {
          "type": "object",
          "propertyNames": {
            "$ref": "#/definitions/nonEmptyString"
          },
          "additionalProperties": {
            "$ref": "#/definitions/layoutSystemState"
          }
        },
        "edges": {
          "type": "object",
          "propertyNames": {
            "$ref": "#/definitions/nonEmptyString"
          },
          "additionalProperties": {
            "$ref": "#/definitions/layoutEdgeState"
          }
        },
        "isHydrated": {
          "type": "boolean"
        }
      },
      "required": [
        "systems",
        "edges"
      ],
      "additionalProperties": false
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "C4"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "enum": [
                      "HorizontalFlow",
                      "VerticalFlow",
                      "Organic",
                      "CenteredRectangle",
                      "Dynamic",
                      "SystemGrid"
                    ]
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "SYSTEM",
                        "ACTOR",
                        "DATASTORE",
                        "GROUP"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/interactionWithEndpoints"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "->",
                        "->>",
                        "<->",
                        "<<->>",
                        "<<->"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "ERD"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "enum": [
                      "HorizontalFlow",
                      "VerticalFlow",
                      "Organic",
                      "CenteredRectangle",
                      "Dynamic",
                      "SystemGrid"
                    ]
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "ENTITY",
                        "GROUP"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/interactionWithEndpoints"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "|-|<",
                        ">-<",
                        "|-O|",
                        "|-O<",
                        "|-|",
                        "<|--",
                        "<>-",
                        "<><-",
                        "-|>"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "FLOWCHART"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "enum": [
                      "HorizontalFlow",
                      "VerticalFlow",
                      "Organic",
                      "CenteredRectangle",
                      "Dynamic",
                      "SystemGrid"
                    ]
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "START",
                        "END",
                        "DECISION",
                        "PROCESS",
                        "GROUP"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/interactionWithEndpoints"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "->"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "BPMN_LITE"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "enum": [
                      "HorizontalFlow",
                      "VerticalFlow",
                      "Organic",
                      "CenteredRectangle",
                      "Dynamic",
                      "SystemGrid"
                    ]
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "BPMN_START_EVENT",
                        "BPMN_TIMER_START_INTERRUPTING",
                        "BPMN_MESSAGE_START_INTERRUPTING",
                        "BPMN_INTERMEDIATE_EVENT",
                        "BPMN_END_EVENT",
                        "BPMN_TASK",
                        "BPMN_SUBPROCESS",
                        "BPMN_XOR_GATEWAY",
                        "BPMN_GATEWAY_EXCLUSIVE_PLAIN",
                        "BPMN_GATEWAY_INCLUSIVE",
                        "BPMN_AND_GATEWAY",
                        "BPMN_DATA_STORE",
                        "BPMN_DATA_OBJECT",
                        "GROUP",
                        "BPMN_SWIMLANE_HORIZONTAL",
                        "BPMN_SWIMLANE_VERTICAL"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/interactionWithEndpoints"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "->"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "ARCHIMATE"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "enum": [
                      "HorizontalFlow",
                      "VerticalFlow",
                      "Organic",
                      "CenteredRectangle",
                      "Dynamic",
                      "SystemGrid"
                    ]
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "ARCHI_BUSINESS_ACTOR",
                        "ARCHI_BUSINESS_ROLE",
                        "ARCHI_BUSINESS_COLLABORATION",
                        "ARCHI_BUSINESS_INTERFACE",
                        "ARCHI_BUSINESS_PROCESS",
                        "ARCHI_BUSINESS_FUNCTION",
                        "ARCHI_BUSINESS_INTERACTION",
                        "ARCHI_BUSINESS_EVENT",
                        "ARCHI_BUSINESS_SERVICE",
                        "ARCHI_BUSINESS_OBJECT",
                        "ARCHI_APPLICATION_COMPONENT",
                        "ARCHI_APPLICATION_COLLABORATION",
                        "ARCHI_APPLICATION_INTERFACE",
                        "ARCHI_APPLICATION_PROCESS",
                        "ARCHI_APPLICATION_FUNCTION",
                        "ARCHI_APPLICATION_INTERACTION",
                        "ARCHI_APPLICATION_EVENT",
                        "ARCHI_APPLICATION_SERVICE",
                        "ARCHI_DATA_OBJECT",
                        "ARCHI_TECH_NODE",
                        "ARCHI_TECH_DEVICE",
                        "ARCHI_SYSTEM_SOFTWARE",
                        "ARCHI_TECH_COLLABORATION",
                        "ARCHI_TECH_INTERFACE",
                        "ARCHI_TECH_PROCESS",
                        "ARCHI_TECH_FUNCTION",
                        "ARCHI_TECH_INTERACTION",
                        "ARCHI_TECH_EVENT",
                        "ARCHI_TECH_SERVICE",
                        "ARCHI_COMMUNICATION_NETWORK",
                        "ARCHI_ARTIFACT",
                        "ARCHI_EQUIPMENT",
                        "ARCHI_FACILITY",
                        "ARCHI_MATERIAL",
                        "ARCHI_PATH",
                        "ARCHI_LOCATION",
                        "ARCHI_CAPABILITY",
                        "ARCHI_RESOURCE",
                        "ARCHI_VALUE_STREAM",
                        "ARCHI_COURSE_OF_ACTION",
                        "ARCHI_WORK_PACKAGE",
                        "ARCHI_IMPLEMENTATION_EVENT",
                        "ARCHI_DELIVERABLE",
                        "ARCHI_OUTCOME",
                        "ARCHI_GOAL",
                        "ARCHI_REQUIREMENT",
                        "ARCHI_CONSTRAINT",
                        "ARCHI_PRINCIPLE",
                        "ARCHI_DRIVER",
                        "ARCHI_ASSESSMENT",
                        "ARCHI_GAP",
                        "ARCHI_PLATEAU",
                        "ARCHI_VALUE",
                        "ARCHI_MEANING",
                        "ARCHI_REPRESENTATION",
                        "ARCHI_PRODUCT",
                        "ARCHI_CONTRACT",
                        "ARCHI_STAKEHOLDER",
                        "GROUP"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/interactionWithEndpoints"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "ASSOCIATION",
                        "FLOW",
                        "TRIGGERING",
                        "SERVING",
                        "REALIZATION",
                        "ASSIGNMENT",
                        "AGGREGATION",
                        "COMPOSITION",
                        "ACCESS"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "SEQUENCE_DIAGRAM"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "const": "Sequence"
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "SEQ_ACTOR",
                        "SEQ_BOUNDARY",
                        "SEQ_CONTROL",
                        "SEQ_ENTITY",
                        "SEQ_DATABASE",
                        "SEQ_COMPONENT",
                        "SEQ_EXTERNAL",
                        "GROUP"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/definitions/sequenceFragmentInteraction"
                },
                {
                  "$ref": "#/definitions/sequenceMessageInteraction"
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "model": {
            "required": [
              "MODELTYPE"
            ],
            "properties": {
              "MODELTYPE": {
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "const": "OTHER"
                  }
                }
              }
            }
          }
        }
      },
      "then": {
        "properties": {
          "model": {
            "properties": {
              "LAYOUT": {
                "properties": {
                  "value": {
                    "enum": [
                      "HorizontalFlow",
                      "VerticalFlow",
                      "Organic",
                      "CenteredRectangle",
                      "Dynamic",
                      "SystemGrid"
                    ]
                  }
                }
              }
            }
          },
          "systems": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/systemBase"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "SYSTEM",
                        "ENTITY",
                        "ACTOR",
                        "DECISION",
                        "PROCESS",
                        "DATASTORE",
                        "START",
                        "END",
                        "ARCHI_BUSINESS_ACTOR",
                        "ARCHI_BUSINESS_COLLABORATION",
                        "ARCHI_BUSINESS_EVENT",
                        "ARCHI_BUSINESS_FUNCTION",
                        "ARCHI_BUSINESS_INTERACTION",
                        "ARCHI_BUSINESS_INTERFACE",
                        "ARCHI_BUSINESS_OBJECT",
                        "ARCHI_BUSINESS_PROCESS",
                        "ARCHI_BUSINESS_ROLE",
                        "ARCHI_BUSINESS_SERVICE",
                        "ARCHI_APPLICATION_COLLABORATION",
                        "ARCHI_APPLICATION_COMPONENT",
                        "ARCHI_APPLICATION_EVENT",
                        "ARCHI_APPLICATION_FUNCTION",
                        "ARCHI_APPLICATION_INTERACTION",
                        "ARCHI_APPLICATION_INTERFACE",
                        "ARCHI_APPLICATION_PROCESS",
                        "ARCHI_APPLICATION_SERVICE",
                        "ARCHI_DATA_OBJECT",
                        "ARCHI_TECH_NODE",
                        "ARCHI_TECH_DEVICE",
                        "ARCHI_SYSTEM_SOFTWARE",
                        "ARCHI_TECH_COLLABORATION",
                        "ARCHI_TECH_INTERFACE",
                        "ARCHI_TECH_PROCESS",
                        "ARCHI_TECH_FUNCTION",
                        "ARCHI_TECH_INTERACTION",
                        "ARCHI_TECH_EVENT",
                        "ARCHI_TECH_SERVICE",
                        "ARCHI_COMMUNICATION_NETWORK",
                        "ARCHI_ARTIFACT",
                        "ARCHI_EQUIPMENT",
                        "ARCHI_FACILITY",
                        "ARCHI_MATERIAL",
                        "ARCHI_PATH",
                        "ARCHI_LOCATION",
                        "ARCHI_CAPABILITY",
                        "ARCHI_RESOURCE",
                        "ARCHI_VALUE_STREAM",
                        "ARCHI_COURSE_OF_ACTION",
                        "ARCHI_WORK_PACKAGE",
                        "ARCHI_IMPLEMENTATION_EVENT",
                        "ARCHI_DELIVERABLE",
                        "ARCHI_OUTCOME",
                        "ARCHI_GOAL",
                        "ARCHI_REQUIREMENT",
                        "ARCHI_CONSTRAINT",
                        "ARCHI_PRINCIPLE",
                        "ARCHI_DRIVER",
                        "ARCHI_ASSESSMENT",
                        "ARCHI_GAP",
                        "ARCHI_PLATEAU",
                        "ARCHI_VALUE",
                        "ARCHI_MEANING",
                        "ARCHI_REPRESENTATION",
                        "ARCHI_PRODUCT",
                        "ARCHI_CONTRACT",
                        "ARCHI_STAKEHOLDER",
                        "BPMN_START_EVENT",
                        "BPMN_TIMER_START_INTERRUPTING",
                        "BPMN_MESSAGE_START_INTERRUPTING",
                        "BPMN_INTERMEDIATE_EVENT",
                        "BPMN_END_EVENT",
                        "BPMN_TASK",
                        "BPMN_SUBPROCESS",
                        "BPMN_XOR_GATEWAY",
                        "BPMN_GATEWAY_EXCLUSIVE_PLAIN",
                        "BPMN_GATEWAY_INCLUSIVE",
                        "BPMN_AND_GATEWAY",
                        "BPMN_DATA_STORE",
                        "BPMN_DATA_OBJECT",
                        "GROUP",
                        "BPMN_SWIMLANE_HORIZONTAL",
                        "BPMN_SWIMLANE_VERTICAL",
                        "SEQ_ACTOR",
                        "SEQ_BOUNDARY",
                        "SEQ_CONTROL",
                        "SEQ_ENTITY",
                        "SEQ_DATABASE",
                        "SEQ_COMPONENT",
                        "SEQ_EXTERNAL"
                      ]
                    }
                  }
                }
              ]
            }
          },
          "interactions": {
            "items": {
              "allOf": [
                {
                  "$ref": "#/definitions/interactionWithEndpoints"
                },
                {
                  "properties": {
                    "TYPE": {
                      "type": "string",
                      "enum": [
                        "->",
                        "->>",
                        "<->",
                        "<<->>",
                        "<<->",
                        "|-|<",
                        ">-<",
                        "|-O|",
                        "|-O<",
                        "|-|",
                        "<|--",
                        "<>-",
                        "<><-",
                        "-|>",
                        "ASSOCIATION",
                        "FLOW",
                        "TRIGGERING",
                        "SERVING",
                        "REALIZATION",
                        "ASSIGNMENT",
                        "AGGREGATION",
                        "COMPOSITION",
                        "ACCESS",
                        "SEQ_SYNC_CALL",
                        "SEQ_ASYNC_CALL",
                        "SEQ_RETURN",
                        "SEQ_CREATE",
                        "SEQ_DESTROY",
                        "SEQ_FOUND",
                        "SEQ_LOST",
                        "SEQ_FRG_ALT",
                        "SEQ_FRG_OPT",
                        "SEQ_FRG_LOOP",
                        "SEQ_FRG_BREAK",
                        "SEQ_FRG_PAR",
                        "SEQ_FRG_REF",
                        "SEQ_FRG_END"
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]
}
