|
8 | 8 | ], |
9 | 9 | "properties": { |
10 | 10 | "profile": { |
| 11 | + "default": "data-package", |
11 | 12 | "propertyOrder": 10, |
12 | 13 | "title": "Profile", |
13 | 14 | "description": "The profile of this descriptor.", |
14 | | - "context": "Every Package and Resource descriptor has a profile. The default profile, if none is declared, is `default`. The namespace for the profile is the type of descriptor, so, `default` for a Package descriptor is not the same as `default` for a Resource descriptor.", |
| 15 | + "context": "Every Package and Resource descriptor has a profile. The default profile, if none is declared, is `data-package` for Package and `data-resource` for Resource.", |
15 | 16 | "type": "string", |
16 | | - "default": "default", |
17 | 17 | "examples": [ |
18 | 18 | "{\n \"profile\": \"tabular-data-package\"\n}\n", |
19 | 19 | "{\n \"profile\": \"http://example.com/my-profiles-json-schema.json\"\n}\n" |
|
64 | 64 | "propertyOrder": 60, |
65 | 65 | "title": "Home Page", |
66 | 66 | "description": "The home on the web that is related to this data package.", |
67 | | - "type": "object", |
68 | | - "properties": { |
69 | | - "name": { |
70 | | - "title": "Name", |
71 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
72 | | - "type": "string", |
73 | | - "pattern": "^([-a-z0-9._/])+$", |
74 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
75 | | - "examples": [ |
76 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
77 | | - ] |
78 | | - }, |
79 | | - "path": { |
80 | | - "title": "Path", |
81 | | - "description": "A fully qualified URL, or a POSIX file path..", |
82 | | - "type": "string", |
83 | | - "examples": [ |
84 | | - "{\n \"path\": \"file.csv\"\n}\n", |
85 | | - "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
86 | | - ], |
87 | | - "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." |
88 | | - }, |
89 | | - "title": { |
90 | | - "title": "Title", |
91 | | - "description": "A human-readable title.", |
92 | | - "type": "string", |
93 | | - "examples": [ |
94 | | - "{\n \"title\": \"My Package Title\"\n}\n" |
95 | | - ] |
96 | | - } |
97 | | - }, |
| 67 | + "type": "string", |
| 68 | + "format": "uri", |
98 | 69 | "examples": [ |
99 | | - "{\n \"homepage\": {\n \"name\": \"My Web Page\",\n \"uri\": \"http://example.com/\"\n }\n}\n" |
| 70 | + "{\n \"homepage\": \"http://example.com/\"\n}\n" |
100 | 71 | ] |
101 | 72 | }, |
102 | 73 | "created": { |
|
120 | 91 | "title": "Contributor", |
121 | 92 | "description": "A contributor to this descriptor.", |
122 | 93 | "properties": { |
123 | | - "name": { |
124 | | - "title": "Name", |
125 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
| 94 | + "title": { |
| 95 | + "title": "Title", |
| 96 | + "description": "A human-readable title.", |
126 | 97 | "type": "string", |
127 | | - "pattern": "^([-a-z0-9._/])+$", |
128 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
129 | 98 | "examples": [ |
130 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
| 99 | + "{\n \"title\": \"My Package Title\"\n}\n" |
131 | 100 | ] |
132 | 101 | }, |
133 | 102 | "path": { |
|
150 | 119 | ] |
151 | 120 | }, |
152 | 121 | "organisation": { |
153 | | - "title": "Organisation", |
| 122 | + "title": "Organization", |
154 | 123 | "description": "An organizational affiliation for this contributor.", |
155 | 124 | "type": "string" |
156 | 125 | }, |
|
162 | 131 | "maintainer", |
163 | 132 | "wrangler", |
164 | 133 | "contributor" |
165 | | - ] |
| 134 | + ], |
| 135 | + "default": "contributor" |
166 | 136 | } |
167 | 137 | }, |
168 | 138 | "required": [ |
169 | | - "name" |
| 139 | + "title" |
170 | 140 | ], |
171 | 141 | "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." |
172 | 142 | }, |
173 | 143 | "examples": [ |
174 | | - "{\n \"contributors\": [\n {\n \"name\": \"Joe Bloggs\"\n }\n ]\n}\n", |
175 | | - "{\n \"contributors\": [\n {\n \"name\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n" |
| 144 | + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\"\n }\n ]\n}\n", |
| 145 | + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n" |
176 | 146 | ] |
177 | 147 | }, |
178 | 148 | "keywords": { |
|
188 | 158 | "{\n \"keywords\": [\n \"data\",\n \"fiscal\",\n \"transparency\"\n ]\n}\n" |
189 | 159 | ] |
190 | 160 | }, |
191 | | - "licenses": { |
| 161 | + "image": { |
192 | 162 | "propertyOrder": 100, |
| 163 | + "title": "Image", |
| 164 | + "description": "A image to represent this package.", |
| 165 | + "type": "string", |
| 166 | + "examples": [ |
| 167 | + "{\n \"image\": \"http://example.com/image.jpg\"\n}\n", |
| 168 | + "{\n \"image\": \"relative/to/image.jpg\"\n}\n" |
| 169 | + ] |
| 170 | + }, |
| 171 | + "licenses": { |
| 172 | + "propertyOrder": 110, |
193 | 173 | "title": "Licenses", |
194 | 174 | "description": "The license(s) under which this package is published.", |
195 | 175 | "type": "array", |
|
198 | 178 | "title": "License", |
199 | 179 | "description": "A license for this descriptor.", |
200 | 180 | "type": "object", |
201 | | - "required": [ |
202 | | - "uri" |
203 | | - ], |
204 | 181 | "properties": { |
205 | 182 | "name": { |
206 | | - "title": "Name", |
207 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
| 183 | + "title": "Open Definition license identifier", |
| 184 | + "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", |
208 | 185 | "type": "string", |
209 | | - "pattern": "^([-a-z0-9._/])+$", |
210 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
211 | | - "examples": [ |
212 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
213 | | - ] |
| 186 | + "pattern": "^([-a-zA-Z0-9._])+$" |
214 | 187 | }, |
215 | 188 | "path": { |
216 | 189 | "title": "Path", |
|
239 | 212 | ] |
240 | 213 | }, |
241 | 214 | "resources": { |
242 | | - "propertyOrder": 110, |
| 215 | + "propertyOrder": 120, |
243 | 216 | "title": "Data Resources", |
244 | 217 | "description": "An `array` of Data Resource objects, each compliant with the [Data Resource](/data-resource/) specification.", |
245 | 218 | "type": "array", |
|
248 | 221 | "title": "Data Resource", |
249 | 222 | "description": "Data Resource.", |
250 | 223 | "type": "object", |
251 | | - "required": [ |
252 | | - "name", |
253 | | - "path" |
| 224 | + "oneOf": [ |
| 225 | + { |
| 226 | + "required": [ |
| 227 | + "name", |
| 228 | + "data" |
| 229 | + ] |
| 230 | + }, |
| 231 | + { |
| 232 | + "required": [ |
| 233 | + "name", |
| 234 | + "path" |
| 235 | + ] |
| 236 | + } |
254 | 237 | ], |
255 | 238 | "properties": { |
256 | 239 | "profile": { |
257 | 240 | "propertyOrder": 10, |
| 241 | + "default": "data-resource", |
258 | 242 | "title": "Profile", |
259 | 243 | "description": "The profile of this descriptor.", |
260 | | - "context": "Every Package and Resource descriptor has a profile. The default profile, if none is declared, is `default`. The namespace for the profile is the type of descriptor, so, `default` for a Package descriptor is not the same as `default` for a Resource descriptor.", |
| 244 | + "context": "Every Package and Resource descriptor has a profile. The default profile, if none is declared, is `data-package` for Package and `data-resource` for Resource.", |
261 | 245 | "type": "string", |
262 | | - "default": "default", |
263 | 246 | "examples": [ |
264 | 247 | "{\n \"profile\": \"tabular-data-package\"\n}\n", |
265 | 248 | "{\n \"profile\": \"http://example.com/my-profiles-json-schema.json\"\n}\n" |
|
317 | 300 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
318 | 301 | ] |
319 | 302 | }, |
| 303 | + "data": { |
| 304 | + "propertyOrder": 230, |
| 305 | + "title": "Data", |
| 306 | + "description": "Inline data for this resource." |
| 307 | + }, |
320 | 308 | "schema": { |
321 | 309 | "propertyOrder": 40, |
322 | 310 | "title": "Schema", |
|
346 | 334 | "propertyOrder": 70, |
347 | 335 | "title": "Home Page", |
348 | 336 | "description": "The home on the web that is related to this data package.", |
349 | | - "type": "object", |
350 | | - "properties": { |
351 | | - "name": { |
352 | | - "title": "Name", |
353 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
354 | | - "type": "string", |
355 | | - "pattern": "^([-a-z0-9._/])+$", |
356 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
357 | | - "examples": [ |
358 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
359 | | - ] |
360 | | - }, |
361 | | - "path": { |
362 | | - "title": "Path", |
363 | | - "description": "A fully qualified URL, or a POSIX file path..", |
364 | | - "type": "string", |
365 | | - "examples": [ |
366 | | - "{\n \"path\": \"file.csv\"\n}\n", |
367 | | - "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
368 | | - ], |
369 | | - "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." |
370 | | - }, |
371 | | - "title": { |
372 | | - "title": "Title", |
373 | | - "description": "A human-readable title.", |
374 | | - "type": "string", |
375 | | - "examples": [ |
376 | | - "{\n \"title\": \"My Package Title\"\n}\n" |
377 | | - ] |
378 | | - } |
379 | | - }, |
| 337 | + "type": "string", |
| 338 | + "format": "uri", |
380 | 339 | "examples": [ |
381 | | - "{\n \"homepage\": {\n \"name\": \"My Web Page\",\n \"uri\": \"http://example.com/\"\n }\n}\n" |
| 340 | + "{\n \"homepage\": \"http://example.com/\"\n}\n" |
382 | 341 | ] |
383 | 342 | }, |
384 | 343 | "sources": { |
|
395 | 354 | "description": "A source file.", |
396 | 355 | "type": "object", |
397 | 356 | "required": [ |
398 | | - "uri" |
| 357 | + "title" |
399 | 358 | ], |
400 | 359 | "properties": { |
401 | | - "name": { |
402 | | - "title": "Name", |
403 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
| 360 | + "title": { |
| 361 | + "title": "Title", |
| 362 | + "description": "A human-readable title.", |
404 | 363 | "type": "string", |
405 | | - "pattern": "^([-a-z0-9._/])+$", |
406 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
407 | 364 | "examples": [ |
408 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
| 365 | + "{\n \"title\": \"My Package Title\"\n}\n" |
409 | 366 | ] |
410 | 367 | }, |
411 | 368 | "path": { |
|
446 | 403 | "title": "License", |
447 | 404 | "description": "A license for this descriptor.", |
448 | 405 | "type": "object", |
449 | | - "required": [ |
450 | | - "uri" |
451 | | - ], |
452 | 406 | "properties": { |
453 | 407 | "name": { |
454 | | - "title": "Name", |
455 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
| 408 | + "title": "Open Definition license identifier", |
| 409 | + "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", |
456 | 410 | "type": "string", |
457 | | - "pattern": "^([-a-z0-9._/])+$", |
458 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
459 | | - "examples": [ |
460 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
461 | | - ] |
| 411 | + "pattern": "^([-a-zA-Z0-9._])+$" |
462 | 412 | }, |
463 | 413 | "path": { |
464 | 414 | "title": "Path", |
|
562 | 512 | "description": "A source file.", |
563 | 513 | "type": "object", |
564 | 514 | "required": [ |
565 | | - "uri" |
| 515 | + "title" |
566 | 516 | ], |
567 | 517 | "properties": { |
568 | | - "name": { |
569 | | - "title": "Name", |
570 | | - "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.", |
| 518 | + "title": { |
| 519 | + "title": "Title", |
| 520 | + "description": "A human-readable title.", |
571 | 521 | "type": "string", |
572 | | - "pattern": "^([-a-z0-9._/])+$", |
573 | | - "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", |
574 | 522 | "examples": [ |
575 | | - "{\n \"name\": \"my-nice-name\"\n}\n" |
| 523 | + "{\n \"title\": \"My Package Title\"\n}\n" |
576 | 524 | ] |
577 | 525 | }, |
578 | 526 | "path": { |
|
0 commit comments