{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$ref": "#/components/schemas/PkgRelationTypeVM",
  "components": {
    "schemas": {
      "PkgRelationTypeVM": {
        "required": [
          "key",
          "name"
        ],
        "type": "object",
        "properties": {
          "categoryKeys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "features": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "is_generated_by_keyword",
                        "is_searchable_attribute",
                        "is_self_targetable",
                        "is_generated_by_exact_match",
                        "force_comment",
                        "is_dependency",
                        "is_dependency_change",
                        "is_mandatory",
                        "is_implicit",
                        "is_relation_type_child_of",
                        "is_relation_type_parent_of",
                        "is_relation_type_referencing",
                        "is_relation_type_referenced_by",
                        "is_relation_type_in_diagram",
                        "is_relation_type_diagram_contains",
                        "is_relation_type_using_text_of",
                        "is_relation_type_used_text_in",
                        "is_relation_type_text_based_on",
                        "is_relation_type_text_based_in",
                        "is_relation_type_synonym_of",
                        "is_relation_type_acronym_of",
                        "is_relation_type_has_acronym",
                        "is_relation_type_has_domain",
                        "is_relation_type_domain_of",
                        "is_single_value",
                        "is_parent_inheritable",
                        "is_foreign_key",
                        "is_stereotype",
                        "include_in_ai_summary",
                        "is_creatable_on_child_add",
                        "is_not_presented_in_changes",
                        "can_be_shown_in_diagram",
                        "disable_excel_template_export",
                        "disable_excel_object_export",
                        "is_relation_type_contains",
                        "is_relation_type_has_data_source",
                        "is_relation_type_related",
                        "is_relation_space_of",
                        "is_relation_in_space",
                        "is_domain_of",
                        "is_lineage_parser_output",
                        "is_crows_foot_many",
                        "is_crows_foot_one_and_only_one",
                        "is_crows_foot_one_or_many",
                        "is_crows_foot_zero_or_many",
                        "is_crows_foot_zero_or_one",
                        "is_crows_foot_one",
                        "is_crows_foot_none",
                        "is_diagram_attribute_space_of",
                        "is_copy_of"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "boolean",
                      "nullable": true
                    }
                  }
                },
                {
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "properties": {
                    "key": {
                      "minLength": 1,
                      "enum": [
                        "fullness_score_value"
                      ],
                      "type": "string",
                      "readOnly": true
                    },
                    "value": {
                      "type": "number",
                      "format": "double",
                      "nullable": true
                    }
                  }
                }
              ]
            },
            "nullable": true
          },
          "graphLines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgRelationTypeGraphRelationTypeVM"
            },
            "nullable": true
          },
          "hasNoReverseRelation": {
            "type": "boolean",
            "nullable": true
          },
          "isOriented": {
            "type": "boolean",
            "nullable": true
          },
          "key": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgNotificationRelationTypeVM"
            },
            "nullable": true
          },
          "reverseKey": {
            "type": "string",
            "nullable": true
          },
          "translations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PkgEntityTranslationVM"
            },
            "nullable": true
          }
        },
        "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
      },
      "PkgNotificationRelationTypeVM": {
        "required": [
          "notificationTemplateKey",
          "recipientUserRelationTypeKey"
        ],
        "type": "object",
        "properties": {
          "applicationKey": {
            "type": "string",
            "nullable": true
          },
          "notificationTemplateKey": {
            "minLength": 1,
            "type": "string"
          },
          "objectTypeKey": {
            "type": "string",
            "nullable": true
          },
          "recipientUserRelationTypeKey": {
            "minLength": 1,
            "type": "string"
          },
          "spacePath": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PkgRelationTypeGraphRelationTypeVM": {
        "required": [
          "lineDisplayTypeKey",
          "metamodelKey"
        ],
        "type": "object",
        "properties": {
          "isDefault": {
            "type": "boolean",
            "nullable": true
          },
          "lineDisplayTypeKey": {
            "minLength": 1,
            "enum": [
              "data_lineage",
              "foreign_key",
              "knowledge_relation",
              "knowledge_parent",
              "indirect_flow",
              "specialization",
              "verbal_concept",
              "association",
              "standard",
              "crows_foot"
            ],
            "type": "string"
          },
          "metamodelKey": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}