Skip to content

Commit 139b18c

Browse files
committed
Update schemas
1 parent ea4df86 commit 139b18c

7 files changed

Lines changed: 1052 additions & 232 deletions

File tree

src/Validators/schemas/CHANGELOG

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,45 @@
2020
* default resource profile changed from 'default' to 'data-resource'
2121
* added 'data' - Inline data for this resource
2222
* changed source 'name' attribute to 'title'
23+
24+
25+
Changes to data-package schema
26+
2026-01-30T18:41:15+00:00
27+
* check the git diff and summarize the spec changes here
28+
*
29+
30+
31+
32+
Changes to tabular-data-package schema
33+
2026-01-30T18:41:15+00:00
34+
* check the git diff and summarize the spec changes here
35+
*
36+
37+
38+
39+
Changes to fiscal-data-package schema
40+
2026-01-30T18:41:15+00:00
41+
* check the git diff and summarize the spec changes here
42+
*
43+
44+
45+
46+
Changes to data-resource schema
47+
2026-01-30T18:41:16+00:00
48+
* check the git diff and summarize the spec changes here
49+
*
50+
51+
52+
53+
Changes to tabular-data-resource schema
54+
2026-01-30T18:41:16+00:00
55+
* check the git diff and summarize the spec changes here
56+
*
57+
58+
59+
60+
Changes to table-schema schema
61+
2026-01-30T18:41:16+00:00
62+
* check the git diff and summarize the spec changes here
63+
*
64+

src/Validators/schemas/data-package.json

Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@
101101
},
102102
"path": {
103103
"title": "Path",
104-
"description": "A fully qualified URL, or a POSIX file path..",
104+
"description": "A fully qualified URL, or a POSIX file path.",
105105
"type": "string",
106+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
106107
"examples": [
107108
"{\n \"path\": \"file.csv\"\n}\n",
108109
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -118,20 +119,13 @@
118119
"{\n \"email\": \"example@example.com\"\n}\n"
119120
]
120121
},
121-
"organisation": {
122+
"organization": {
122123
"title": "Organization",
123124
"description": "An organizational affiliation for this contributor.",
124125
"type": "string"
125126
},
126127
"role": {
127128
"type": "string",
128-
"enum": [
129-
"publisher",
130-
"author",
131-
"maintainer",
132-
"wrangler",
133-
"contributor"
134-
],
135129
"default": "contributor"
136130
}
137131
},
@@ -178,6 +172,18 @@
178172
"title": "License",
179173
"description": "A license for this descriptor.",
180174
"type": "object",
175+
"anyOf": [
176+
{
177+
"required": [
178+
"name"
179+
]
180+
},
181+
{
182+
"required": [
183+
"path"
184+
]
185+
}
186+
],
181187
"properties": {
182188
"name": {
183189
"title": "Open Definition license identifier",
@@ -187,8 +193,9 @@
187193
},
188194
"path": {
189195
"title": "Path",
190-
"description": "A fully qualified URL, or a POSIX file path..",
196+
"description": "A fully qualified URL, or a POSIX file path.",
191197
"type": "string",
198+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
192199
"examples": [
193200
"{\n \"path\": \"file.csv\"\n}\n",
194201
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -208,7 +215,7 @@
208215
},
209216
"context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.",
210217
"examples": [
211-
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"uri\": \"http://opendatacommons.org/licenses/pddl/\"\n }\n ]\n}\n"
218+
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n"
212219
]
213220
},
214221
"resources": {
@@ -266,8 +273,9 @@
266273
"oneOf": [
267274
{
268275
"title": "Path",
269-
"description": "A fully qualified URL, or a POSIX file path..",
276+
"description": "A fully qualified URL, or a POSIX file path.",
270277
"type": "string",
278+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
271279
"examples": [
272280
"{\n \"path\": \"file.csv\"\n}\n",
273281
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -279,8 +287,9 @@
279287
"minItems": 1,
280288
"items": {
281289
"title": "Path",
282-
"description": "A fully qualified URL, or a POSIX file path..",
290+
"description": "A fully qualified URL, or a POSIX file path.",
283291
"type": "string",
292+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
284293
"examples": [
285294
"{\n \"path\": \"file.csv\"\n}\n",
286295
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -309,16 +318,19 @@
309318
"propertyOrder": 40,
310319
"title": "Schema",
311320
"description": "A schema for this resource.",
312-
"type": "object"
321+
"type": [
322+
"string",
323+
"object"
324+
]
313325
},
314326
"title": {
315-
"propertyOrder": 50,
316327
"title": "Title",
317328
"description": "A human-readable title.",
318329
"type": "string",
319330
"examples": [
320331
"{\n \"title\": \"My Package Title\"\n}\n"
321-
]
332+
],
333+
"propertyOrder": 50
322334
},
323335
"description": {
324336
"propertyOrder": 60,
@@ -348,7 +360,7 @@
348360
"title": "Sources",
349361
"description": "The raw sources for this resource.",
350362
"type": "array",
351-
"minItems": 1,
363+
"minItems": 0,
352364
"items": {
353365
"title": "Source",
354366
"description": "A source file.",
@@ -367,8 +379,9 @@
367379
},
368380
"path": {
369381
"title": "Path",
370-
"description": "A fully qualified URL, or a POSIX file path..",
382+
"description": "A fully qualified URL, or a POSIX file path.",
371383
"type": "string",
384+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
372385
"examples": [
373386
"{\n \"path\": \"file.csv\"\n}\n",
374387
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -387,7 +400,7 @@
387400
}
388401
},
389402
"examples": [
390-
"{\n \"sources\": [\n {\n \"name\": \"World Bank and OECD\",\n \"uri\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
403+
"{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
391404
]
392405
},
393406
"licenses": {
@@ -403,6 +416,18 @@
403416
"title": "License",
404417
"description": "A license for this descriptor.",
405418
"type": "object",
419+
"anyOf": [
420+
{
421+
"required": [
422+
"name"
423+
]
424+
},
425+
{
426+
"required": [
427+
"path"
428+
]
429+
}
430+
],
406431
"properties": {
407432
"name": {
408433
"title": "Open Definition license identifier",
@@ -412,8 +437,9 @@
412437
},
413438
"path": {
414439
"title": "Path",
415-
"description": "A fully qualified URL, or a POSIX file path..",
440+
"description": "A fully qualified URL, or a POSIX file path.",
416441
"type": "string",
442+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
417443
"examples": [
418444
"{\n \"path\": \"file.csv\"\n}\n",
419445
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -433,7 +459,7 @@
433459
},
434460
"context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.",
435461
"examples": [
436-
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"uri\": \"http://opendatacommons.org/licenses/pddl/\"\n }\n ]\n}\n"
462+
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n"
437463
]
438464
},
439465
"format": {
@@ -506,7 +532,7 @@
506532
"title": "Sources",
507533
"description": "The raw sources for this resource.",
508534
"type": "array",
509-
"minItems": 1,
535+
"minItems": 0,
510536
"items": {
511537
"title": "Source",
512538
"description": "A source file.",
@@ -525,8 +551,9 @@
525551
},
526552
"path": {
527553
"title": "Path",
528-
"description": "A fully qualified URL, or a POSIX file path..",
554+
"description": "A fully qualified URL, or a POSIX file path.",
529555
"type": "string",
556+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
530557
"examples": [
531558
"{\n \"path\": \"file.csv\"\n}\n",
532559
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -545,7 +572,7 @@
545572
}
546573
},
547574
"examples": [
548-
"{\n \"sources\": [\n {\n \"name\": \"World Bank and OECD\",\n \"uri\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
575+
"{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
549576
]
550577
}
551578
}

src/Validators/schemas/data-resource.json

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@
4848
"oneOf": [
4949
{
5050
"title": "Path",
51-
"description": "A fully qualified URL, or a POSIX file path..",
51+
"description": "A fully qualified URL, or a POSIX file path.",
5252
"type": "string",
53+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
5354
"examples": [
5455
"{\n \"path\": \"file.csv\"\n}\n",
5556
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -61,8 +62,9 @@
6162
"minItems": 1,
6263
"items": {
6364
"title": "Path",
64-
"description": "A fully qualified URL, or a POSIX file path..",
65+
"description": "A fully qualified URL, or a POSIX file path.",
6566
"type": "string",
67+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
6668
"examples": [
6769
"{\n \"path\": \"file.csv\"\n}\n",
6870
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -91,7 +93,10 @@
9193
"propertyOrder": 40,
9294
"title": "Schema",
9395
"description": "A schema for this resource.",
94-
"type": "object"
96+
"type": [
97+
"string",
98+
"object"
99+
]
95100
},
96101
"title": {
97102
"propertyOrder": 50,
@@ -130,7 +135,7 @@
130135
"title": "Sources",
131136
"description": "The raw sources for this resource.",
132137
"type": "array",
133-
"minItems": 1,
138+
"minItems": 0,
134139
"items": {
135140
"title": "Source",
136141
"description": "A source file.",
@@ -149,8 +154,9 @@
149154
},
150155
"path": {
151156
"title": "Path",
152-
"description": "A fully qualified URL, or a POSIX file path..",
157+
"description": "A fully qualified URL, or a POSIX file path.",
153158
"type": "string",
159+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
154160
"examples": [
155161
"{\n \"path\": \"file.csv\"\n}\n",
156162
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -169,7 +175,7 @@
169175
}
170176
},
171177
"examples": [
172-
"{\n \"sources\": [\n {\n \"name\": \"World Bank and OECD\",\n \"uri\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
178+
"{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
173179
]
174180
},
175181
"licenses": {
@@ -185,6 +191,18 @@
185191
"title": "License",
186192
"description": "A license for this descriptor.",
187193
"type": "object",
194+
"anyOf": [
195+
{
196+
"required": [
197+
"name"
198+
]
199+
},
200+
{
201+
"required": [
202+
"path"
203+
]
204+
}
205+
],
188206
"properties": {
189207
"name": {
190208
"title": "Open Definition license identifier",
@@ -194,8 +212,9 @@
194212
},
195213
"path": {
196214
"title": "Path",
197-
"description": "A fully qualified URL, or a POSIX file path..",
215+
"description": "A fully qualified URL, or a POSIX file path.",
198216
"type": "string",
217+
"pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$",
199218
"examples": [
200219
"{\n \"path\": \"file.csv\"\n}\n",
201220
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
@@ -215,7 +234,7 @@
215234
},
216235
"context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.",
217236
"examples": [
218-
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"uri\": \"http://opendatacommons.org/licenses/pddl/\"\n }\n ]\n}\n"
237+
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n"
219238
]
220239
},
221240
"format": {

0 commit comments

Comments
 (0)