General
Test was expected to fail and it did.
Files
Using required-properties-fail.json from test resources
JSON-LD context is present - uplifting
Output JSON-LD required-properties-fail.jsonld created
Output Turtle required-properties-fail.ttl created
JSON Schema
ValidationError: 'time' is a required property
Failed validating 'required' in schema['allOf'][1]['properties']['features']['items']:
{'$schema': 'https://json-schema.org/draft/2019-09/schema',
'allOf': [{'$ref': 'https://opengeospatial.github.io/bblocks/annotated-schemas/geo/features/feature/schema.yaml'},
{'properties': {'coordRefSys': {'$ref': 'https://beta.schemas.opengis.net/json-fg/coordrefsys.json',
'x-jsonld-id': 'http://www.opengis.net/def/glossary/term/CoordinateReferenceSystemCRS'},
'featureType': {'$ref': 'https://beta.schemas.opengis.net/json-fg/featuretype.json',
'x-jsonld-id': '@type'},
'geometry': {'$ref': 'https://beta.schemas.opengis.net/json-fg/geometry.json',
'x-jsonld-id': 'https://purl.org/geojson/vocab#geometry'},
'id': {'oneOf': [{'type': 'number'},
{'type': 'string'}],
'x-jsonld-id': '@id'},
'links': {'items': {'allOf': [{'$ref': 'https://beta.schemas.opengis.net/json-fg/link.json'},
{'$ref': 'https://opengeospatial.github.io/bblocks/annotated-schemas/ogc-utils/json-link/schema.yaml'}]},
'type': 'array',
'x-jsonld-id': 'http://www.w3.org/2000/01/rdf-schema#seeAlso'},
'place': {'$ref': 'https://beta.schemas.opengis.net/json-fg/place.json',
'x-jsonld-id': 'http://purl.org/dc/terms/spatial'},
'properties': {'oneOf': [{'type': 'null'},
{'type': 'object'}],
'x-jsonld-id': '@nest'},
'time': {'$ref': 'https://opengeospatial.github.io/bblocks/annotated-schemas/geo/json-fg/time/schema.yaml',
'x-jsonld-id': 'http://purl.org/dc/terms/time'},
'type': {'enum': ['Feature'],
'type': 'string',
'x-jsonld-id': '@type'}}}],
'description': 'This JSON Schema is part of JSON-FG version 0.1.1',
'required': ['type', 'time', 'place', 'geometry', 'properties'],
'title': 'a JSON-FG 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',
'MultiPolyhedron': 'https://purl.org/geojson/vocab#MultiPolyhedron',
'MultiPrism': {'x-jsonld-context': {'prisms': 'https://purl.org/geojson/vocab#prisms'},
'x-jsonld-id': 'https://purl.org/geojson/vocab#MultiPrism'},
'Point': 'https://purl.org/geojson/vocab#Point',
'Polygon': 'https://purl.org/geojson/vocab#Polygon',
'Polyhedron': 'https://purl.org/geojson/vocab#Polyhedron',
'Prism': {'x-jsonld-context': {'base': 'https://purl.org/geojson/vocab#prismBase',
'lower': 'https://purl.org/geojson/vocab#prismLower',
'upper': 'https://purl.org/geojson/vocab#prismUpper'},
'x-jsonld-id': 'https://purl.org/geojson/vocab#Prism'},
'bbox': {'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#bbox'},
'coordinates': {'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#coordinates'},
'features': {'x-jsonld-container': '@set',
'x-jsonld-id': 'https://purl.org/geojson/vocab#features'},
'geometries': {'x-jsonld-container': '@list',
'x-jsonld-id': 'https://purl.org/geojson/vocab#geometry'}},
'x-jsonld-prefixes': {'dct': 'http://purl.org/dc/terms/',
'geojson': 'https://purl.org/geojson/vocab#',
'owlTime': 'http://www.w3.org/2006/time#',
'rdfs': 'http://www.w3.org/2000/01/rdf-schema#'}}
On instance['features'][0]:
{'geometry': {'coordinates': [174.7501603083, -36.9307359096],
'type': 'Point'},
'id': 'f1',
'properties': {'comment': 'An attribute value'},
'type': 'Feature'}