Entity.json 4.82 KB
Newer Older
1
2
3
4
{
  "title": "NGSI-LD Entity",
  "description": "NGSI-LD Entity",
  "definitions": {
5
6
7
8
9
10
11
12
13
    "datasetId": {
      "type": "string",
      "format": "uri"
    },
    "instanceId": {
      "type": "string",
      "format": "uri"
    },
    "Property": {
14
15
      "type": "object",
      "properties": {
16
        "type": {
17
          "type": "string",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
18
          "enum": ["Property"]
19
20
        },
        "value": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
21
          "oneOf": [
canterafonsj's avatar
canterafonsj committed
22
23
24
25
26
27
            "string",
            "number",
            "boolean",
            "array",
            "object"
          ]
28
29
        },
        "observedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
30
          "$ref": "http://localhost:8090/schema/common.json#/definitions/observedAt"
31
32
        },
        "createdAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
33
          "$ref": "http://localhost:8090/schema/common.json#/definitions/createdAt"
34
35
        },
        "modifiedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
36
          "$ref": "http://localhost:8090/schema/common.json#/definitions/modifiedAt"
37
        },
38
        "datasetId": {
39
          "$ref": "#/definitions/datasetId"
40
41
        },
        "instanceId": {
42
          "$ref": "#/definitions/instanceId"
43
        }
44
45
46
47
48
49
      },
      "required": [
        "type",
        "value"
      ],
      "additionalProperties": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
50
        "oneOf": [
51
52
          {
            "$ref": "#/definitions/Property"
53
          },
54
55
          {
            "$ref": "#/definitions/Relationship"
canterafonsj's avatar
canterafonsj committed
56
          }
57
58
        ]
      }
canterafonsj's avatar
canterafonsj committed
59
60
    },
    "Relationship": {
61
62
63
64
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
65
          "enum": ["Relationship"]
canterafonsj's avatar
canterafonsj committed
66
        },
67
68
69
70
71
        "object": {
          "type": "string",
          "format": "uri"
        },
        "observedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
72
          "$ref": "http://localhost:8090/schema/common.json#/definitions/observedAt"
73
74
        },
        "createdAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
75
          "$ref": "http://localhost:8090/schema/common.json#/definitions/createdAt"
76
77
        },
        "modifiedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
78
          "$ref": "http://localhost:8090/schema/common.json#/definitions/modifiedAt"
79
80
81
82
83
84
85
86
87
88
89
90
91
        },
        "datasetId": {
          "$ref": "#/definitions/datasetId"
        },
        "instanceId": {
          "$ref": "#/definitions/instanceId"
        }
      },
      "required": [
        "type",
        "object"
      ],
      "additionalProperties": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
92
        "oneOf": [
93
94
          {
            "$ref": "#/definitions/Property"
canterafonsj's avatar
canterafonsj committed
95
          },
96
97
          {
            "$ref": "#/definitions/Relationship"
98
          }
99
100
        ]
      }
canterafonsj's avatar
canterafonsj committed
101
102
    },
    "GeoProperty": {
103
104
105
106
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
107
          "enum":  ["GeoProperty"]
canterafonsj's avatar
canterafonsj committed
108
        },
109
        "value": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
110
          "$ref": "http://localhost:8090/schema/Geometry.json#/definitions/Geometry"
111
        },
canterafonsj's avatar
canterafonsj committed
112
        "observedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
113
          "$ref": "http://localhost:8090/schema/common.json#/definitions/observedAt"
canterafonsj's avatar
canterafonsj committed
114
        },
115
        "createdAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
116
          "$ref": "http://localhost:8090/schema/common.json#/definitions/createdAt"
117
118
        },
        "modifiedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
119
          "$ref": "http://localhost:8090/schema/common.json#/definitions/modifiedAt"
120
121
122
123
124
125
126
127
128
129
130
131
132
        },
        "datasetId": {
          "$ref": "#/definitions/datasetId"
        },
        "instanceId": {
          "$ref": "#/definitions/instanceId"
        }
      },
      "required": [
        "type",
        "value"
      ],
      "additionalProperties": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
133
        "oneOf": [
134
135
          {
            "$ref": "#/definitions/Property"
canterafonsj's avatar
canterafonsj committed
136
          },
137
138
          {
            "$ref": "#/definitions/Relationship"
canterafonsj's avatar
canterafonsj committed
139
          }
140
141
        ]
      }
142
    },
143
    "EntityFragment": {
canterafonsj's avatar
canterafonsj committed
144
145
146
      "type": "object",
      "properties": {
        "@context": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
147
          "$ref": "http://localhost:8090/schema/common.json#/definitions/LdContext"
canterafonsj's avatar
canterafonsj committed
148
149
150
151
152
153
154
155
156
        },
        "location": {
          "$ref": "#/definitions/GeoProperty"
        },
        "observationSpace": {
          "$ref": "#/definitions/GeoProperty"
        },
        "operationSpace": {
          "$ref": "#/definitions/GeoProperty"
157
        },
158
        "id": {
159
160
161
162
          "type": "string",
          "format": "uri"
        },
        "type": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
163
          "$ref": "http://localhost:8090/schema/common.json#/definitions/Name"
164
165
        },
        "createdAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
166
          "$ref": "http://localhost:8090/schema/common.json#/definitions/createdAt"
167
168
        },
        "modifiedAt": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
169
          "$ref": "http://localhost:8090/schema/common.json#/definitions/modifiedAt"
canterafonsj's avatar
canterafonsj committed
170
        }
canterafonsj's avatar
canterafonsj committed
171
      },
canterafonsj's avatar
canterafonsj committed
172
      "additionalProperties": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
173
        "oneOf": [
canterafonsj's avatar
canterafonsj committed
174
175
176
177
178
179
180
181
182
183
184
          {
            "$ref": "#/definitions/Property"
          },
          {
            "$ref": "#/definitions/Relationship"
          },
          {
            "$ref": "#/definitions/GeoProperty"
          }
        ]
      }
185
186
187
188
189
190
191
192
193
194
195
196
197
    },
    "Entity": {
      "allOf": [
        {
          "required": [
            "id",
            "type"
          ]
        },
        {
          "$ref": "#/definitions/EntityFragment"
        }
      ]
canterafonsj's avatar
canterafonsj committed
198
199
    }
  },
canterafonsj's avatar
canterafonsj committed
200
201
202
203
204
  "allOf": [
    {
      "$ref": "#/definitions/Entity"
    }
  ]
André Costa's avatar
André Costa committed
205
}