Commit 869c752f authored by canterafonsj's avatar canterafonsj

Validate Examples

parent a950217d
......@@ -65,9 +65,9 @@
]
]
},
"timestamp": {
"start": " 2017-11-29T14:53:15"
},
"timestamp": [{
"start": "2017-11-29T14:53:15Z"
}],
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/cim/commonTerms.jsonld",
......
......@@ -11,17 +11,17 @@
{
"type": "Property",
"value": 120,
"observedAt": "2018-08-01T12:03:00"
"observedAt": "2018-08-01T12:03:00Z"
},
{
"type": "Property",
"value": 80,
"observedAt": "2018-08-01T12:05:00"
"observedAt": "2018-08-01T12:05:00Z"
},
{
"type": "Property",
"value": 100,
"observedAt": "2018-08-01T12:07:00"
"observedAt": "2018-08-01T12:07:00Z"
}
],
"@context": [
......
......@@ -15,15 +15,15 @@
"values": [
[
120,
"2018-08-01T12:03:00"
"2018-08-01T12:03:00Z"
],
[
80,
"2018-08-01T12:05:00"
"2018-08-01T12:05:00Z"
],
[
100,
"2018-08-01T12:07:00"
"2018-08-01T12:07:00Z"
]
]
},
......
......@@ -59,10 +59,10 @@
],
"properties": {
"georel": {
"oneOf": [
"anyOf": [
{
"type": "string",
"enumeration": [
"enum": [
"equals",
"disjoint",
"intersects",
......@@ -73,7 +73,7 @@
},
{
"type": "string",
"pattern": "near;(maxDistance==\\d+)|(minDistance==\\d+)$"
"pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$"
}
]
},
......
......@@ -57,5 +57,9 @@
"minItems": 1
}
]
},
"propertyNames": {
"type": "string",
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
}
}
......@@ -116,6 +116,6 @@
},
"propertyNames": {
"type": "string",
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$"
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
}
}
......@@ -6,27 +6,17 @@ ajv validate -s $SCHEMAS/Entity.json -d $EXAMPLES/Vehicle_C2.2.json -r $SCHEMAS/
ajv validate -s $SCHEMAS/Entity.json -d $EXAMPLES/OffStreetParking_C2.3.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv validate -s $SCHEMAS/Entity_keyValues.json -d -d $EXAMPLES/Vehicle_keyValues_C2.2.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv validate -s $SCHEMAS/Entity_keyValues.json -d -d $EXAMPLES/Vehicle_keyValues_C2.2.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv compile -s $SCHEMAS/subscriptions/Subscription.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv validate -s $SCHEMAS/Entity_keyValues.json -d -d $EXAMPLES/OffStreetParking_keyValues_C2.3.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv compile -s $SCHEMAS/temporal/EntityTemporal.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
ajv validate -s $SCHEMAS/Entity.json -d $EXAMPLES/Vehicle_MultiAttribute_C2.2.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv compile -s $SCHEMAS/registrations/ContextSourceRegistration.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv validate -s $SCHEMAS/subscriptions/Subscription.json -d $EXAMPLES/Subscription-example_C.4.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv compile -s $SCHEMAS/subscriptions/Notification.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
ajv validate -s $SCHEMAS/registrations/ContextSourceRegistration.json -d $EXAMPLES/ContextSourceRegistration-example_C.3.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv compile -s $SCHEMAS/registrations/ContextSourceNotification.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/registrations/ContextSourceRegistration.json
ajv validate -s $SCHEMAS/temporal/EntityTemporal.json -d $EXAMPLES/EntityTemporal-example_C5.5.3.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
ajv compile -s $SCHEMAS/EntityList.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
ajv compile -s $SCHEMAS/temporal/EntityTemporalList.json -r $SCHEMAS/temporal/EntityTemporal.json -r $SCHEMAS/Entity.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json
ajv compile -s $SCHEMAS/BatchOperationResult.json -r $SCHEMAS/common.json
ajv compile -s $SCHEMAS/UpdateResult.json
ajv compile -s $SCHEMAS/temporal/Entity_temporalValues.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
ajv validate -s $SCHEMAS/temporal/Entity_temporalValues.json -d $EXAMPLES/Entity_temporalValues_C.5.6.3.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment