Skip to content

Commit 1ffc972

Browse files
authored
Merge pull request #390 from okfn/data-validation
add more field validation
2 parents 00709f4 + a97efbd commit 1ffc972

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

data/datapackage.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"format": "csv",
1818
"mediatype": "text/csv",
1919
"schema": {
20+
"primaryKey": "name",
2021
"fields": [
2122
{
2223
"name": "name",
@@ -70,7 +71,20 @@
7071
"name": "publisher_classification",
7172
"title": "publisher category",
7273
"type": "string",
73-
"description": "The organizational category that the publisher falls under"
74+
"description": "The organizational category that the publisher falls under",
75+
"constraints": {
76+
"enum": [
77+
"Commercial",
78+
"Community",
79+
"Government",
80+
"Institutional",
81+
"International",
82+
"NGO",
83+
"Private sector",
84+
"Research",
85+
"Third sector"
86+
]
87+
}
7488
},
7589
{
7690
"name": "description",

0 commit comments

Comments
 (0)