ArcGIS Hub site might generate data that is not 100% match project-open-data JSON schema
t83714 opened this issue · 0 comments
t83714 commented
ArcGIS Hub site might generate data that is not 100% match this schema:
https://project-open-data.cio.gov/v1.1/schema/dataset.json
When we turn on registry schema validation, we will see the following error:
{
"message": "Encountered an error - #: #: only 1 subschema matches out of 2"
}
sample request:
curl --location --request PUT 'https://minikube.data.gov.au/api/v0/registry/records/ds-connector-https%3A%2F%2Factmapi-actgov.opendata.arcgis.com%2Fdatasets%2FACTGOV%3A%3Asportsfield' \
--header 'X-Magda-API-Key-Id: xxxxxxxx' \
--header 'X-Magda-API-Key: xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "ds-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield",
"name": "Sportsfield",
"aspects": {
"project-open-data-dataset": {
"@type": "dcat:Dataset",
"identifier": "https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield",
"license": "http://creativecommons.org/licenses/by/4.0",
"landingPage": "https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield",
"title": "Sportsfield",
"description": "A field is part of a sportsground, and are identified by a field number. Fields may overlap and field boundaries may vary in dimensions depending on the field type",
"keyword": [
"ACT Government",
"Sports",
"Ground",
"Field",
"Recreation"
],
"issued": "2018-09-07T06:50:06.000Z",
"modified": "2018-12-12T00:35:10.000Z",
"publisher": {
"name": "ACT Government Online Maps and Apps"
},
"contactPoint": {
"@type": "vcard:Contact",
"fn": "ACTmapi",
"hasEmail": "mailto:spatialdata@act.gov.au"
},
"accessLevel": "public",
"spatial": "149.0199,-35.4718,149.1591,-35.154",
"theme": ["geospatial"]
},
"dcat-dataset-strings": {
"title": "Sportsfield",
"description": "A field is part of a sportsground, and are identified by a field number. Fields may overlap and field boundaries may vary in dimensions depending on the field type",
"issued": "2018-09-07T06:50:06.000Z",
"modified": "2018-12-12T00:35:10.000Z",
"publisher": "ACT Government Online Maps and Apps",
"spatial": "149.0199,-35.4718,149.1591,-35.154",
"temporal": {},
"themes": ["geospatial"],
"keywords": [
"ACT Government",
"Sports",
"Ground",
"Field",
"Recreation"
],
"contactPoint": "ACTmapi",
"landingPage": "https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield"
},
"source": {
"type": "project-open-data-dataset",
"url": "SOURCE",
"id": "connector",
"name": "Connector"
},
"dataset-distributions": {
"distributions": [
"dist-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield-0",
"dist-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield-1",
"dist-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield-2",
"dist-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield-3",
"dist-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield-4",
"dist-connector-https://actmapi-actgov.opendata.arcgis.com/datasets/ACTGOV::sportsfield-5"
]
},
"dataset-publisher": {
"publisher": "org-connector-ACT Government Online Maps and Apps"
}
},
"sourceTag": "stag"
}'
Solution
Instead of referencing "project open data" schema here, we probably should include a forked version with no fields set to required
as seems most vendors don't 100% conform to the schema.