Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NGSI Linked Data
NGSI-LD API
Commits
c4ed6b3c
Commit
c4ed6b3c
authored
Nov 05, 2018
by
canterafonsj
Browse files
Update Entity.json. Fixing Problems with allOf and additional properties
parent
b6cdfb10
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema/Entity.json
View file @
c4ed6b3c
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment