ContextSourceRegistration.json 3.49 KB
Newer Older
{
  "$schema": "http://json-schema.org/schema#",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
  "$id": "http://localhost:8090/schema/registrations/ContextSourceRegistration.json",
  "title": "NGSI-LD Context Source Registration",
  "description": "NGSI-LD Context Source Registration",
  "definitions": {
    "RegistrationInfo": {
      "type": "object",
      "properties": {
        "entities": {
          "type": "array",
          "minItems": 1,
          "items": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "http://localhost:8090/schema/common.json#/definitions/EntityInfo"
          }
        },
        "properties": {
          "type": "array",
          "minItems": 1,
          "items": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "http://localhost:8090/schema/common.json#/definitions/Name"
          },
          "uniqueItems": true
        },
        "relationships": {
          "type": "array",
          "minItems": 1,
          "items": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "http://localhost:8090/schema/common.json#/definitions/Name"
          },
          "uniqueItems": true
        }
      }
    },
    "TimeInterval": {
      "type": "object",
      "required": [
        "start"
      ],
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
canterafonsj's avatar
canterafonsj committed
    "ContextSourceRegistrationFragment": {
      "type": "object",
      "properties": {
        "@context": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          "$ref": "http://localhost:8090/schema/common.json#/definitions/LdContext"
canterafonsj's avatar
canterafonsj committed
        },
        "information": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/definitions/RegistrationInfo"
          }
        },
        "observationInterval": {
          "$ref": "#/definitions/TimeInterval"
        },
        "managementInterval": {
          "$ref": "#/definitions/TimeInterval"
canterafonsj's avatar
canterafonsj committed
        },
        "location": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          "$ref": "http://localhost:8090/schema/Geometry.json#/definitions/Geometry"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          "$ref": "http://localhost:8090/schema/Geometry.json#/definitions/Geometry"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          "$ref": "http://localhost:8090/schema/Geometry.json#/definitions/Geometry"
canterafonsj's avatar
canterafonsj committed
        },
        "expires": {
          "type": "string",
          "format": "date-time"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "endpoint": {
          "type": "string",
          "format": "uri"
        }
      },
Stefan Wiedemann's avatar
Stefan Wiedemann committed
      "additionalProperties": true
canterafonsj's avatar
canterafonsj committed
    "ContextSourceRegistration": {
      "allOf": [
        {
          "$ref": "#/definitions/ContextSourceRegistrationFragment"
        },
        {
          "type": "object",
          "properties": {
            "id": {
canterafonsj's avatar
canterafonsj committed
              "type": "string",
              "format": "uri"
            },
            "type": {
              "type": "string",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
              "enum": ["ContextSourceRegistration"]
canterafonsj's avatar
canterafonsj committed
            },
            "createdAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
              "$ref": "http://localhost:8090/schema/common.json#/definitions/createdAt"
canterafonsj's avatar
canterafonsj committed
            },
            "modifiedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
              "$ref": "http://localhost:8090/schema/common.json#/definitions/modifiedAt"
canterafonsj's avatar
canterafonsj committed
            }
          },
          "required": [
            "id",
            "type",
            "endpoint",
            "information"
          ]
        }
      ]
canterafonsj's avatar
canterafonsj committed
  "allOf": [
    {
      "$ref": "#/definitions/ContextSourceRegistration"
    }