Loading schema/Entity_temporalValues.json 0 → 100644 +121 −0 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/Entity_temporalValues.json", "title": "NGSI-LD Entity Temporal Values", "description": "NGSI-LD Simplified Temporal Representation of Entities", "definitions": { "TimestampOrEmpty": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "minLength": 0, "maxLength": 0 } ] }, "TemporalValue": { "type": "array", "items": [ { "type": [ "string", "number", "boolean", "object", "array" ] }, { "$ref": "#/definitions/TimestampOrEmpty" } ], "minTems": 2, "maxItems": 2 }, "TemporalObject": { "type": "array", "items": [ { "type": "string", "format": "uri" }, { "$ref": "#/definitions/TimestampOrEmpty" } ], "minTems": 2, "maxItems": 2 }, "PropertyTemporalValues": { "type": "object", "properties": { "type": { "type": "string", "const": "Property" }, "values": { "type": "array", "items": { "$ref": "#/definitions/TemporalValue" } } } }, "RelationshipTemporalValues": { "type": "object", "properties": { "type": { "type": "string", "const": "Relationship" }, "objects": { "type": "array", "items": { "$ref": "#/definitions/TemporalObject" } } } } }, "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" }, "@context": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" }, "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": [ "type", "id" ], "additionalProperties": { "anyOf": [ { "$ref": "#/definitions/PropertyTemporalValues" }, { "$ref": "#/definitions/RelationshipTemporalValues" } ] }, "propertyNames": { "type": "string", "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$" } } scripts/validate_schema.sh +4 −1 Original line number Diff line number Diff line Loading @@ -20,4 +20,7 @@ ajv compile -s $SCHEMAS/BatchOperationResult.json -r $SCHEMAS/common.json ajv compile -s $SCHEMAS/UpdateResult.json ajv compile -s $SCHEMAS/Entity_keyValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json ajv compile -s $SCHEMAS/Entity_keyValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/Entity_temporalValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json Loading
schema/Entity_temporalValues.json 0 → 100644 +121 −0 Original line number Diff line number Diff line { "$schema": "http://json-schema.org/schema#", "id": "https://uri.etsi.org/ngsi-ld/schema/Entity_temporalValues.json", "title": "NGSI-LD Entity Temporal Values", "description": "NGSI-LD Simplified Temporal Representation of Entities", "definitions": { "TimestampOrEmpty": { "oneOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "minLength": 0, "maxLength": 0 } ] }, "TemporalValue": { "type": "array", "items": [ { "type": [ "string", "number", "boolean", "object", "array" ] }, { "$ref": "#/definitions/TimestampOrEmpty" } ], "minTems": 2, "maxItems": 2 }, "TemporalObject": { "type": "array", "items": [ { "type": "string", "format": "uri" }, { "$ref": "#/definitions/TimestampOrEmpty" } ], "minTems": 2, "maxItems": 2 }, "PropertyTemporalValues": { "type": "object", "properties": { "type": { "type": "string", "const": "Property" }, "values": { "type": "array", "items": { "$ref": "#/definitions/TemporalValue" } } } }, "RelationshipTemporalValues": { "type": "object", "properties": { "type": { "type": "string", "const": "Relationship" }, "objects": { "type": "array", "items": { "$ref": "#/definitions/TemporalObject" } } } } }, "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" }, "@context": { "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext" }, "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": [ "type", "id" ], "additionalProperties": { "anyOf": [ { "$ref": "#/definitions/PropertyTemporalValues" }, { "$ref": "#/definitions/RelationshipTemporalValues" } ] }, "propertyNames": { "type": "string", "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$" } }
scripts/validate_schema.sh +4 −1 Original line number Diff line number Diff line Loading @@ -20,4 +20,7 @@ ajv compile -s $SCHEMAS/BatchOperationResult.json -r $SCHEMAS/common.json ajv compile -s $SCHEMAS/UpdateResult.json ajv compile -s $SCHEMAS/Entity_keyValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json ajv compile -s $SCHEMAS/Entity_keyValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json ajv compile -s $SCHEMAS/Entity_temporalValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json