EntityTemporal.json 1.92 KB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "$schema": "http://json-schema.org/schema#",
  "id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporal.json",
canterafonsj's avatar
canterafonsj committed
  "title": "NGSI-LD Entity",
  "description": "NGSI-LD Temporal Representation of an Entity",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uri"
    },
    "type": {
      "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
canterafonsj's avatar
canterafonsj committed
    },
    "@context": {
      "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
    },
    "location": {
      "type": "array",
      "items": {
        "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoProperty"
      },
      "minItems": 1
    },
    "createdAt": {
      "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
    },
    "modifiedAt": {
      "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt"
    }
  },
  "required": [
    "id",
    "type"
  ],
  "additionalProperties": {
    "anyOf": [
      {
        "type": "array",
        "items": {
          "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Property"
        },
        "minItems": 1
      },
      {
        "type": "array",
        "items": {
          "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Relationship"
        },
        "minItems": 1
      },
      {
        "type": "array",
        "items": {
          "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoProperty"
        },
        "minItems": 1
      }
    ]
canterafonsj's avatar
canterafonsj committed
  },
   "propertyNames": {
    "type": "string",
    "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
canterafonsj's avatar
canterafonsj committed
  }
}