Commit 6cfb8973 authored by canterafonsj's avatar canterafonsj
Browse files

Entity now is a definition

parent 0fa762bf
...@@ -20,7 +20,13 @@ ...@@ -20,7 +20,13 @@
"const": "Property" "const": "Property"
}, },
"value": { "value": {
"type": ["string","number","boolean","array","object"] "type": [
"string",
"number",
"boolean",
"array",
"object"
]
}, },
"observedAt": { "observedAt": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/observedAt" "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/observedAt"
...@@ -135,55 +141,62 @@ ...@@ -135,55 +141,62 @@
} }
] ]
} }
}
},
"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"
}, },
"location": { "Entity": {
"$ref": "#/definitions/GeoProperty" "type": "object",
}, "properties": {
"observationSpace": { "id": {
"$ref": "#/definitions/GeoProperty" "type": "string",
}, "format": "uri"
"operationSpace": { },
"$ref": "#/definitions/GeoProperty" "type": {
}, "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
"createdAt": { },
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt" "@context": {
}, "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
"modifiedAt": { },
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt" "location": {
} "$ref": "#/definitions/GeoProperty"
}, },
"required": [ "observationSpace": {
"id", "$ref": "#/definitions/GeoProperty"
"type" },
], "operationSpace": {
"additionalProperties": { "$ref": "#/definitions/GeoProperty"
"anyOf": [ },
{ "createdAt": {
"$ref": "#/definitions/Property" "$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": [
"$ref": "#/definitions/Relationship" "id",
"type"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
{
"$ref": "#/definitions/Relationship"
},
{
"$ref": "#/definitions/GeoProperty"
}
]
}, },
"propertyNames": {
"type": "string",
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
}
}
},
"allOf": [
{ {
"$ref": "#/definitions/GeoProperty" "$ref": "#/definitions/Entity"
} }
] ]
}, }
"propertyNames": { \ No newline at end of file
"type": "string",
"pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
}
}
Supports Markdown
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