General
Test was expected to fail and it did.
Files
Using feature-missing-type-fail.json from test resources
JSON-LD context is present - uplifting
Output JSON-LD feature-missing-type-fail.jsonld created
Output Turtle feature-missing-type-fail.ttl created
JSON Schema
ValidationError: 'type' is a required property
Failed validating 'required' in schema['allOf'][0]:
{'$id': 'https://geojson.org/schema/Feature.json',
'$schema': 'http://json-schema.org/draft-07/schema#',
'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'geometry': {'oneOf': [{'type': 'null'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['Point'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON Point',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 2,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['LineString'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON LineString',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 4,
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['Polygon'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON Polygon',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['MultiPoint'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON MultiPoint',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 2,
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['MultiLineString'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'MultiLineString',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 4,
'type': 'array'},
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['MultiPolygon'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON MultiPolygon',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'geometries': {'items': {'oneOf': [{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['Point'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'Point',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 2,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['LineString'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'LineString',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 4,
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['Polygon'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'Polygon',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['MultiPoint'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'MultiPoint',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 2,
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['MultiLineString'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'MultiLineString',
'type': 'object'},
{'properties': {'bbox': {'items': {'type': 'number'},
'minItems': 4,
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'items': {'items': {'items': {'items': {'type': 'number'},
'minItems': 2,
'type': 'array'},
'minItems': 4,
'type': 'array'},
'type': 'array'},
'type': 'array',
'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'type': {'enum': ['MultiPolygon'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'coordinates'],
'title': 'GeoJSON '
'MultiPolygon',
'type': 'object'}]},
'type': 'array'},
'type': {'enum': ['GeometryCollection'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type',
'geometries'],
'title': 'GeoJSON '
'GeometryCollection',
'type': 'object'}],
'x-jsonld-id': 'https://purl.org/geojson/vocab#geometry'},
'id': {'oneOf': [{'type': 'number'},
{'type': 'string'}],
'x-jsonld-id': '@id'},
'properties': {'oneOf': [{'type': 'null'},
{'type': 'object'}],
'x-jsonld-id': '@nest'},
'type': {'enum': ['Feature'],
'type': 'string',
'x-jsonld-id': '@type'}},
'required': ['type', 'properties', 'geometry'],
'title': 'GeoJSON Feature',
'type': 'object',
'x-jsonld-extra-terms': {'Feature': 'https://purl.org/geojson/vocab#Feature',
'FeatureCollection': 'https://purl.org/geojson/vocab#FeatureCollection',
'GeometryCollection': 'https://purl.org/geojson/vocab#GeometryCollection',
'LineString': 'https://purl.org/geojson/vocab#LineString',
'MultiLineString': 'https://purl.org/geojson/vocab#MultiLineString',
'MultiPoint': 'https://purl.org/geojson/vocab#MultiPoint',
'MultiPolygon': 'https://purl.org/geojson/vocab#MultiPolygon',
'Point': 'https://purl.org/geojson/vocab#Point',
'Polygon': 'https://purl.org/geojson/vocab#Polygon',
'features': {'x-jsonld-container': '@set',
'x-jsonld-id': 'https://purl.org/geojson/vocab#features'}},
'x-jsonld-prefixes': {'geojson': 'https://purl.org/geojson/vocab#'}}
On instance:
{'geometry': {'coordinates': [174.7, -36.9], 'type': 'Point'},
'id': 'http://www.example.com/features/bad1',
'properties': {}}
SHACL
Validation result for registereditems/geo/features/feature/shapes.shacl:
Validation Report
Conforms: True
Focus nodes for registereditems/geo/features/feature/shapes.shacl:
- Shape geojson:GeometryShape/sh:or/rdf:first: *none*
- Shape geojson:GeometryShape/sh:or/rdf:rest/rdf:first: *none*
- Shape geojson:GeometryShape: *none*
- Shape geojson:FeatureShape: *none*
- Shape geojson:LinkShape: *none*