-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow properties with type array and no items (#1221)
* create meta schema 2.0.1 This contains a new check in row-meta-schema.json:152 which ensures that when a property has type "array", that "items" is also present. * fix README.md, so line can be copied from markdown preview. * add .vscode folder to .gitignore * rename to v2.1.0 * add check to new [email protected] * update .pre-commit config to use newest versions
- Loading branch information
Showing
23 changed files
with
1,684 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ ENV/ | |
*.iml | ||
*.swp | ||
.DS_Store | ||
.vscode/ | ||
|
||
/scratch | ||
datasets/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/[email protected]", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "./[email protected]#/definitions/basicProperties" | ||
} | ||
], | ||
"required": [ | ||
"tables", | ||
"status", | ||
"creator", | ||
"authorizationGrantor", | ||
"owner", | ||
"publisher", | ||
"auth" | ||
], | ||
"properties": { | ||
"schema": { | ||
"const": "dataset" | ||
}, | ||
"version": { | ||
"$ref": "./[email protected]#/definitions/version" | ||
}, | ||
"status": { | ||
"type": "string", | ||
"enum": [ | ||
"beschikbaar", | ||
"niet_beschikbaar" | ||
] | ||
}, | ||
"homepage": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"language": { | ||
"type": "string", | ||
"minLength": 2, | ||
"maxLength": 3 | ||
}, | ||
"accrualPeriodicity": { | ||
"type": "string" | ||
}, | ||
"spatialDescription": { | ||
"type": "string" | ||
}, | ||
"spatialCoordinates": { | ||
"$ref": "https://geojson.org/schema/Geometry.json" | ||
}, | ||
"theme": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"publisher": { | ||
"description": "Naam van het datateam.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"creator": { | ||
"description": "Naam van de bronhouder.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"owner": { | ||
"type": "string", | ||
"default": "Gemeente Amsterdam", | ||
"minLength": 1 | ||
}, | ||
"authorizationGrantor": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"keywords": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"hasBeginning": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"hasEnd": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"objective": { | ||
"type": "string" | ||
}, | ||
"temporalUnit": { | ||
"type": "string" | ||
}, | ||
"spatial": { | ||
"type": "string" | ||
}, | ||
"legalBasis": { | ||
"type": "string" | ||
}, | ||
"contactPoint": { | ||
"description": "Person and (optional) e-mail.", | ||
"$ref": "./[email protected]#/definitions/contactPoint", | ||
"default": { | ||
"name": "datapunt", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"crs": { | ||
"description": "Coordinate reference system", | ||
"$ref": "./[email protected]#/definitions/crs" | ||
}, | ||
"tables": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "./[email protected]" | ||
}, | ||
{ | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"$ref": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/[email protected]", | ||
"type": "object", | ||
"properties": { | ||
"title": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/meta/[email protected]", | ||
"$vocabulary": { | ||
"https://schemas.data.amsterdam.nl/meta/[email protected]": true | ||
}, | ||
"$recursiveAnchor": true, | ||
"title": "Amsterdam Schema authorization", | ||
"properties": { | ||
"ams.auth": { | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/meta/[email protected]", | ||
"$vocabulary": { | ||
"https://schemas.data.amsterdam.nl/meta/[email protected]": true | ||
}, | ||
"$recursiveAnchor": true, | ||
"title": "Amsterdam Schema provenance", | ||
"properties": { | ||
"provenance": { | ||
"$comment": "This field can hold provenance data, per dataset, table or field.", | ||
"oneOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "object" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/meta/[email protected]", | ||
"$vocabulary": { | ||
"https://schemas.data.amsterdam.nl/meta/[email protected]": true | ||
}, | ||
"$recursiveAnchor": true, | ||
"properties": { | ||
"relation": { | ||
"type": "string", | ||
"format": "uri-reference" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/meta/[email protected]", | ||
"$vocabulary": { | ||
"https://schemas.data.amsterdam.nl/meta/[email protected]": true | ||
}, | ||
"$recursiveAnchor": true, | ||
"title": "Amsterdam Schema unit", | ||
"properties": { | ||
"unit": { | ||
"type": "string", | ||
"$comment": "UCUM strings, see https://ucum.nlm.nih.gov/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://schemas.data.amsterdam.nl/[email protected]", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "./[email protected]#/definitions/basicProperties" | ||
} | ||
], | ||
"required": [ | ||
"name", | ||
"id", | ||
"shortname", | ||
"tags" | ||
], | ||
"properties": { | ||
"schema": { | ||
"const": "publisher" | ||
}, | ||
"name": { | ||
"description": "Naam van de publisher.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"id": { | ||
"description": "ID van de publisher.", | ||
"type": "string", | ||
"minLength": 1, | ||
"pattern": "[A-Za-z]" | ||
}, | ||
"shortname": { | ||
"description": "Verkorte naam van de publisher. (voor resources)", | ||
"type": "string", | ||
"minLength": 1, | ||
"maxLength": 12, | ||
"pattern": "[a-z]" | ||
}, | ||
"tags": { | ||
"description": "Labels met metagegevens die aan resources van deze publisher moeten worden gehangen", | ||
"type": "object", | ||
"required": [ | ||
"costcenter" | ||
], | ||
"properties": { | ||
"costcenter": { | ||
"description": "Costcenter tag van de publisher.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"team": { | ||
"description": "Team tag van de publisher.", | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.