Commit c4ed6b3c authored by canterafonsj's avatar canterafonsj
Browse files

Update Entity.json. Fixing Problems with allOf and additional properties

parent b6cdfb10
......@@ -29,130 +29,146 @@
}
]
},
"Commons": {
"observedAt": {
"type": "string",
"format": "date-time"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"modifiedAt": {
"type": "string",
"format": "date-time"
},
"datasetId": {
"type": "string",
"format": "uri"
},
"instanceId": {
"type": "string",
"format": "uri"
},
"Property": {
"type": "object",
"properties": {
"observedAt": {
"type": {
"type": "string",
"format": "date-time"
"const": "Property"
},
"value": {
"type": "any"
},
"observedAt": {
"$ref": "#/definitions/observedAt"
},
"createdAt": {
"type": "string",
"format": "date-time"
"$ref": "#/definitions/createdAt"
},
"modifiedAt": {
"type": "string",
"format": "date-time"
"$ref": "#/definitions/modifiedAt"
},
"datasetId": {
"type": "string",
"format": "uri"
"$ref": "#/definitions/datasetId"
},
"instanceId": {
"type": "string",
"format": "uri"
"$ref": "#/definitions/instanceId"
}
}
},
"Property": {
"allOf": [
{
"$ref": "#/definitions/Commons"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Property"
},
"value": {
"type": "any"
}
},
"required": [
"type",
"value"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
"required": [
"type",
"value"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
{
"$ref": "#/definitions/Relationship"
}
]
{
"$ref": "#/definitions/Relationship"
}
}
]
]
}
},
"Relationship": {
"allOf": [
{
"$ref": "#/definitions/Commons"
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Relationship"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Relationship"
},
"object": {
"type": "string",
"format": "uri"
}
"object": {
"type": "string",
"format": "uri"
},
"observedAt": {
"$ref": "#/definitions/observedAt"
},
"createdAt": {
"$ref": "#/definitions/createdAt"
},
"modifiedAt": {
"$ref": "#/definitions/modifiedAt"
},
"datasetId": {
"$ref": "#/definitions/datasetId"
},
"instanceId": {
"$ref": "#/definitions/instanceId"
}
},
"required": [
"type",
"object"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
"required": [
"type",
"object"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
{
"$ref": "#/definitions/Relationship"
}
]
{
"$ref": "#/definitions/Relationship"
}
}
]
]
}
},
"GeoProperty": {
"allOf": [
{
"$ref": "#/definitions/Commons"
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "GeoProperty"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "GeoProperty"
},
"value": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
}
"value": {
"$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/geometry-schema.json#"
},
"createdAt": {
"$ref": "#/definitions/createdAt"
},
"modifiedAt": {
"$ref": "#/definitions/modifiedAt"
},
"datasetId": {
"$ref": "#/definitions/datasetId"
},
"instanceId": {
"$ref": "#/definitions/instanceId"
}
},
"required": [
"type",
"value"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
"required": [
"type",
"value"
],
"additionalProperties": {
"anyOf": [
{
"$ref": "#/definitions/Property"
},
{
"$ref": "#/definitions/Relationship"
}
]
{
"$ref": "#/definitions/Relationship"
}
}
]
]
}
}
},
"type": "object",
......@@ -176,6 +192,12 @@
},
"operationSpace": {
"$ref": "#/definitions/GeoProperty"
},
"createdAt": {
"$ref": "#/definitions/createdAt"
},
"modifiedAt": {
"$ref": "#/definitions/modifiedAt"
}
},
"required": [
......@@ -195,4 +217,4 @@
}
]
}
}
}
\ No newline at end of file
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