{
  "$id": "https://schemas.opendd.eu/xtdproperty.1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "xtd Property Schema",
  "description": "According to SS-EN ISO 12006-3:2022",
  "type": "object",
  "allOf": [
    {
      "$ref": "/xtdroot.1.schema.json"
    },
    {
      "$ref": "/opendd-entity-meta.1.schema.json"
    },
    {
      "$ref": "/xtdobject.1.schema.json"
    },
    {
      "$ref": "/xtdconcept.1.schema.json"
    },
    {
      "$ref": "#/$defs/Property"
    }
  ],
  "$defs": {
    "Property": {
      "type": "object",
      "properties": {
        "Dimension": {
          "description": "Dimension of the property according to the ISO 80000 series.",
          "oneOf": [
            {
              "$ref": "/xtddimension.1.schema.json"
            },
            {
              "$ref": "/opendd-entityref.1.schema.json"
            }
          ]
        },
        "DataType": {
          "description": "Data type of the value of the property",
          "$ref": "#/$defs/xtdDataTypeEnum"
        },
        "DataFormat": {
          "description": "Pattern for the property values, the meaning of the pattern is implementation dependant.",
          "type": "string",
          "minLength": 1
        },
        "Symbols": {
          "description": "Symbols of the property.",
          "type": "array",
          "items": {
            "$ref": "/xtdsymbol.1.schema.json"
          },
          "minItems": 1
        },
        "PossibleValues": {
          "description": "List of the possible values that can be provided for the property. Several sets of possible values can be provided to allow providing them in different languages.",
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "/xtdvaluelist.1.schema.json"
              },
              {
                "$ref": "/opendd-entityref.1.schema.json"
              }
            ]
          },
          "minItems": 1
        },
        "BoundaryValues": {
          "description": "Intervals of possible values for the property.",
          "type": "array",
          "items": {
            "$ref": "/xtdinterval.1.schema.json"
          },
          "minItems": 1
        },
        "Units": {
          "description": "Intervals of possible values for the property.",
          "type": "array",
          "items": {
            "$ref": "/xtdunit.1.schema.json"
          }
        },
        "ConnectedProperties": {
          "description": "List of properties connected to the current property. The connection can be a specialization or a dependency.",
          "type": "array",
          "items": {
            "$ref": "/xtdrelationshiptoproperty.1.schema.json"
          }
        }
      },
      "required": [
        "Dimension",
        "DataType"
      ]
    },
    "xtdDataTypeEnum": {
      "title": "Data type enumeration",
      "description": "xtdDataTypeEnum is an enumeration type giving the range of possible simple data types from which a selection can be made",
      "type": "string",
      "enum": [
        "XTD_BOOLEAN",
        "XTD_INTEGER",
        "XTD_RATIONAL",
        "XTD_REAL",
        "XTD_COMPLEX",
        "XTD_STRING",
        "XTD_DATETIME"
      ]
    }
  },
  "unevaluatedProperties": false
}
