{
  "$id": "https://schemas.opendd.eu/xtdrelationshiptoproperty.1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "xtd Relationship To Property Schema",
  "description": "According to SS-EN ISO 12006-3:2022",
  "type": "object",
  "allOf": [
    {
      "$ref": "/xtdroot.1.schema.json"
    },
    {
      "$ref": "/xtdobject.1.schema.json"
    },
    {
      "$ref": "/xtdconcept.1.schema.json"
    },
    {
      "$ref": "#/$defs/RelationshipToProperty"
    }
  ],
  "$defs": {
    "RelationshipToProperty": {
      "type": "object",
      "properties": {
        "RelationshipType": {
          "title": "Relationship type",
          "description": "Definition of the type of relationships between two properties.",
          "$ref": "#/$defs/xtdPropertyRelationshipTypeEnum"
        },
        "TargetProperties": {
          "type": "array",
          "description": "List of properties to which the current property is connected.",
          "items": {
            "oneOf": [
              {
                "$ref": "/xtdproperty.1.schema.json"
              },
              {
                "$ref": "/opendd-entityref.1.schema.json"
              }
            ]
          },
          "minItems": 1
        }
      },
      "required": [
        "RelationshipType",
        "TargetProperties"
      ]
    },
    "xtdPropertyRelationshipTypeEnum": {
      "type": "string",
      "enum": [
        "XTD_DEPENDS",
        "XTD_SPECIALIZES"
      ]
    }
  },
  "unevaluatedProperties": false
}
