{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgGraphMetamodelVM",
  "components": {
    "schemas": {
      "PkgGraphMetamodelVM": {
        "required": [
          "key",
          "name",
          "viewTypeKey"
        ],
        "type": "object",
        "properties": {
          "defaultDisableAutoLayout": {
            "type": "boolean",
            "nullable": true
          },
          "defaultDisableShowAllPaths": {
            "type": "boolean",
            "nullable": true
          },
          "defaultLabels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgGraphDefaultLabelsVM"
            },
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "diagramGenerationPrompt": {
            "type": "string",
            "nullable": true
          },
          "displayLevels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgGraphDisplayLevelVM"
            },
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "relationTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgGraphRelationTypesVM"
            },
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          },
          "userRelationTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgGraphUserRelationTypeVM"
            },
            "nullable": true
          },
          "viewTypeKey": {
            "minLength": 1,
            "enum": [
              "data_lineage",
              "entity_relation",
              "relation",
              "conceptual_model"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgGraphUserRelationTypeVM": {
        "required": [
          "key",
          "lineDisplayTypeKey"
        ],
        "type": "object",
        "properties": {
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "lineDisplayTypeKey": {
            "minLength": 1,
            "enum": [
              "data_lineage",
              "foreign_key",
              "knowledge_relation",
              "knowledge_parent",
              "indirect_flow",
              "specialization",
              "verbal_concept",
              "association",
              "standard",
              "crows_foot"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgEntityTranslationVM": {
        "required": [
          "languageKey"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "languageKey": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "shortcut": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgGraphRelationTypesVM": {
        "required": [
          "key",
          "lineDisplayTypeKey"
        ],
        "type": "object",
        "properties": {
          "isDefault": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "lineDisplayTypeKey": {
            "minLength": 1,
            "enum": [
              "data_lineage",
              "foreign_key",
              "knowledge_relation",
              "knowledge_parent",
              "indirect_flow",
              "specialization",
              "verbal_concept",
              "association",
              "standard",
              "crows_foot"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgGraphDisplayLevelVM": {
        "required": [
          "displayTypeKey",
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "displayTypeKey": {
            "minLength": 1,
            "enum": [
              "folder",
              "object",
              "column",
              "er_object",
              "er_column",
              "knowledge_object",
              "simple",
              "nonagon",
              "circle",
              "cylinder",
              "rhombus",
              "diamond",
              "hexagon",
              "rightwards_step",
              "conceptual_folder"
            ],
            "type": "string"
          },
          "isSelfTargeting": {
            "type": "boolean",
            "nullable": true
          },
          "isSingleHideable": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "objectTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgGraphObjectTypeVM"
            },
            "nullable": true
          },
          "parentKey": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "enum": [
              "active",
              "inactive",
              "in-validation",
              "hidden"
            ],
            "type": "string",
            "nullable": true
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgGraphObjectTypeVM": {
        "required": [
          "objectTypeKey"
        ],
        "type": "object",
        "properties": {
          "objectTypeKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PkgGraphDefaultLabelsVM": {
        "required": [
          "type",
          "value"
        ],
        "type": "object",
        "properties": {
          "type": {
            "minLength": 1,
            "enum": [
              "attributeTypeKey",
              "relationTypeKey",
              "userObjectRelationTypeKey"
            ],
            "type": "string"
          },
          "value": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}