Loading schema/Entity.json +1 −1 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/Entity.json", "id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Entity", "definitions": { Loading schema/EntityTemporal.json 0 → 100644 +63 −0 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/EntityTemporal.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Temporal Representation of an Entity", "type": "object", "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "description": "NGSI Entity type", "minLength": 1 }, "@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 } ] } } scripts/validate_schema.sh +2 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,5 @@ ajv compile -s $SCHEMAS/Entity.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/Subscription.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/EntityTemporal.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json Loading
schema/Entity.json +1 −1 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/Entity.json", "id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Entity", "definitions": { Loading
schema/EntityTemporal.json 0 → 100644 +63 −0 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/EntityTemporal.json", "title": "NGSI-LD Entity", "description": "NGSI-LD Temporal Representation of an Entity", "type": "object", "properties": { "id": { "type": "string", "format": "uri" }, "type": { "type": "string", "description": "NGSI Entity type", "minLength": 1 }, "@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 } ] } }
scripts/validate_schema.sh +2 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,5 @@ ajv compile -s $SCHEMAS/Entity.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/Subscription.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/EntityTemporal.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json