common.json 1.95 KB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "$schema": "http://json-schema.org/schema#",
canterafonsj's avatar
canterafonsj committed
  "id": "https://uri.etsi.org/ngsi-ld/schema/common.json",
canterafonsj's avatar
canterafonsj committed
  "title": "NGSI-LD Common Definitions",
  "description": "NGSI-LD Common",
canterafonsj's avatar
canterafonsj committed
  "definitions": {
    "LdContext": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "string",
          "format": "uri"
        },
        {
          "type": "array",
canterafonsj's avatar
canterafonsj committed
          "minItems": 1,
canterafonsj's avatar
canterafonsj committed
          "items": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "object"
              }
            ]
          }
        }
      ]
    },
    "Dates": {
      "type": "object",
      "properties": {
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "modifiedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "Endpoint": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        },
        "accept": {
          "type": "string",
          "enum": [
            "application/json",
            "application/ld+json"
          ]
        }
      }
canterafonsj's avatar
canterafonsj committed
    },
    "EntityInfo": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "string"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "idPattern"
          ],
          "properties": {
            "idPattern": {
              "type": "string"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "type": "string"
            }
          }
        }
      ]