Commit 4852d800 authored by canterafonsj's avatar canterafonsj

Refining more and more. Now using RegExp for Names

parent f27a46e1
......@@ -21,7 +21,7 @@
"type": "array",
"minItems": 1,
"items": {
"type": "string"
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
},
"uniqueItems": true
},
......@@ -29,7 +29,7 @@
"type": "array",
"minItems": 1,
"items": {
"type": "string"
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
},
"uniqueItems": true
}
......
......@@ -4,12 +4,6 @@
"title": "NGSI-LD Entity",
"description": "NGSI-LD Entity",
"definitions": {
"EntityType": {
"type": "string",
"pattern": "^(\\d|[a-zA-Z]|_)+$",
"minLength": 1,
"description": "NGSI Entity type"
},
"datasetId": {
"type": "string",
"format": "uri"
......@@ -150,7 +144,7 @@
"format": "uri"
},
"type": {
"$ref": "#/definitions/EntityType"
"$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"
......
......@@ -6,6 +6,5 @@
"type": "array",
"items": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#"
},
"minItems": 1
}
}
{
"$schema": "http://json-schema.org/schema#",
"id": "https://uri.etsi.org/ngsi-ld/schema/EntityTemporal.json",
"id": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporal.json",
"title": "NGSI-LD Entity",
"description": "NGSI-LD Temporal Representation of an Entity",
"type": "object",
......@@ -10,7 +10,7 @@
"format": "uri"
},
"type": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityType"
"$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"
......
{
"$schema": "http://json-schema.org/schema#",
"id": "https://uri.etsi.org/ngsi-ld/schema/EntityTemporalList.json",
"title": "NGSI-LD Entity",
"description": "NGSI-LD Temporal Representation List",
"type": "array",
"items": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporal.json#"
}
}
......@@ -10,7 +10,7 @@
"format": "uri"
},
"type": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityType"
"$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"
......
......@@ -142,8 +142,7 @@
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
},
"uniqueItems": true
},
......
......@@ -4,6 +4,12 @@
"title": "NGSI-LD Common Definitions",
"description": "NGSI-LD Common",
"definitions": {
"Name": {
"type": "string",
"pattern": "^(\\d|[a-zA-Z]|_)+$",
"minLength": 1,
"description": "NGSI-LD Name"
},
"observedAt": {
"type": "string",
"format": "date-time"
......@@ -69,8 +75,7 @@
"format": "uri"
},
"type": {
"type": "string",
"minLength": 1
"$ref": "#/definitions/Name"
},
"idPattern": {
"type": "string",
......
......@@ -14,6 +14,8 @@ ajv compile -s $SCHEMAS/ContextSourceNotification.json -r $SCHEMAS/common.json -
ajv compile -s $SCHEMAS/EntityList.json -r $SCHEMAS/common.json -r $SCHEMAS/geometry-schema.json -r $SCHEMAS/Entity.json
ajv compile -s $SCHEMAS/EntityTemporalList.json -r $SCHEMAS/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
......
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