Commit d0db8a43 authored by canterafonsj's avatar canterafonsj

Refactor schemas. Allow prefixes. Example with prefixes

parent 027d7c8c
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
"type": "Property", "type": "Property",
"value": "Mercedes" "value": "Mercedes"
}, },
"schema:image": {
"type": "Property",
"value": "http://example.org/images/Mercedes-C220"
},
"isParked": { "isParked": {
"type": "Relationship", "type": "Relationship",
"object": "urn:ngsi-ld:OffStreetParking:Downtown1", "object": "urn:ngsi-ld:OffStreetParking:Downtown1",
...@@ -18,6 +22,7 @@ ...@@ -18,6 +22,7 @@
"http://example.org/ngsi-ld/commonTerms.jsonld", "http://example.org/ngsi-ld/commonTerms.jsonld",
"http://example.org/ngsi-ld/vehicle.jsonld", "http://example.org/ngsi-ld/vehicle.jsonld",
"http://example.org/ngsi-ld/parking.jsonld", "http://example.org/ngsi-ld/parking.jsonld",
"https://schema.org",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
] ]
} }
...@@ -185,8 +185,7 @@ ...@@ -185,8 +185,7 @@
] ]
}, },
"propertyNames": { "propertyNames": {
"type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
"pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$"
} }
}, },
"Entity": { "Entity": {
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
] ]
}, },
"propertyNames": { "propertyNames": {
"type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
} }
} }
...@@ -6,10 +6,14 @@ ...@@ -6,10 +6,14 @@
"definitions": { "definitions": {
"Name": { "Name": {
"type": "string", "type": "string",
"pattern": "^(\\d|[a-zA-Z]|_)+$", "pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$",
"minLength": 1, "minLength": 1,
"description": "NGSI-LD Name" "description": "NGSI-LD Name"
}, },
"PropertyNames": {
"type": "string",
"pattern": "^((\\d|[a-zA-Z]|_)+(:(\\d|[a-zA-Z]|_)+)?(#\\d+)?)$|^(@context)$"
},
"observedAt": { "observedAt": {
"type": "string", "type": "string",
"format": "date-time" "format": "date-time"
......
...@@ -71,8 +71,7 @@ ...@@ -71,8 +71,7 @@
] ]
}, },
"propertyNames": { "propertyNames": {
"type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
} }
}, },
"EntityTemporal": { "EntityTemporal": {
......
...@@ -115,7 +115,6 @@ ...@@ -115,7 +115,6 @@
] ]
}, },
"propertyNames": { "propertyNames": {
"type": "string", "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/PropertyNames"
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
} }
} }
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