{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/clarivate/main/json-schema/clarivate-link-entity-data-schema.json",
  "title": "LinkEntityData",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarivate-data-link-entity-api-openapi.yml#/components/schemas/LinkEntityData",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "Converis ID of the link entity"
    },
    "linkName": {
      "type": "string",
      "description": "Link Entity name of this data"
    },
    "leftEntity": {
      "$ref": "#/$defs/BasicData"
    },
    "rightEntity": {
      "$ref": "#/$defs/BasicData"
    },
    "leftSeq": {
      "type": "integer",
      "description": "The left sequence of this linked data"
    },
    "rightSeq": {
      "type": "integer",
      "description": "The right sequence of this linked data"
    },
    "createdBy": {
      "type": "string",
      "description": "User who created this linked data"
    },
    "createdOn": {
      "type": "string",
      "description": "Creation date of this linked data",
      "format": "date-time"
    },
    "updatedBy": {
      "type": "string",
      "description": "User who last updated this linked data"
    },
    "updatedOn": {
      "type": "string",
      "description": "Last updation date of this linked data",
      "format": "date-time"
    },
    "attributes": {
      "type": "array",
      "description": "list of attributes data for this entity data",
      "items": {
        "$ref": "#/$defs/AttributeData"
      }
    }
  },
  "$defs": {
    "AttributeData": {
      "required": [
        "attributeName",
        "attributeType",
        "value"
      ],
      "type": "object",
      "properties": {
        "attributeName": {
          "type": "string",
          "description": "Attribute name"
        },
        "attributeType": {
          "type": "string",
          "description": "Data type of the Attribute",
          "enum": [
            "STRING",
            "TEXT",
            "CGV",
            "NUMBER",
            "DATE",
            "BOOLEAN"
          ]
        },
        "language": {
          "type": "string",
          "description": "language code of this attribute. Empty if not translatable"
        },
        "value": {
          "type": "string",
          "description": "The value of the attribute data"
        },
        "choiceGroupData": {
          "$ref": "#/$defs/ChoiceGroupData"
        }
      }
    },
    "BasicData": {
      "required": [
        "data",
        "entityName",
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "Converis ID of the data entity"
        },
        "entityName": {
          "type": "string",
          "description": "Entity name of this data"
        },
        "status": {
          "type": "integer",
          "description": "Status of the given data"
        },
        "data": {
          "type": "object",
          "$ref": "#/$defs/LinkReference"
        },
        "shortDescription": {
          "type": "array",
          "description": "list of short descriptions in different languages",
          "items": {
            "$ref": "#/$defs/LabelDefinition"
          }
        }
      }
    },
    "ChoiceGroupData": {
      "type": "object",
      "properties": {
        "choiceGroupName": {
          "type": "string",
          "description": "If the attribute is of type ChoiceGroup, then this should be filled."
        },
        "choiceGroupValue": {
          "type": "string",
          "description": "default value"
        },
        "choiceGroupValueLabels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LabelDefinition"
          }
        }
      }
    },
    "LabelDefinition": {
      "required": [
        "language",
        "value"
      ],
      "type": "object",
      "properties": {
        "language": {
          "type": "string",
          "description": "The system language abbreviation"
        },
        "value": {
          "type": "string",
          "description": "The value of the label"
        }
      }
    },
    "LinkReference": {
      "required": [
        "rel",
        "href"
      ],
      "type": "object",
      "properties": {
        "rel": {
          "type": "string",
          "description": "Describes the type of relationship."
        },
        "href": {
          "type": "string",
          "description": "is the complete endpoint path that uniquely defines the resource."
        }
      }
    }
  }
}