Commit d0db8a43 authored by canterafonsj's avatar canterafonsj

Refactor schemas. Allow prefixes. Example with prefixes

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