|
101 | 101 | }, |
102 | 102 | "path": { |
103 | 103 | "title": "Path", |
104 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 104 | + "description": "A fully qualified URL, or a POSIX file path.", |
105 | 105 | "type": "string", |
| 106 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
106 | 107 | "examples": [ |
107 | 108 | "{\n \"path\": \"file.csv\"\n}\n", |
108 | 109 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
118 | 119 | "{\n \"email\": \"example@example.com\"\n}\n" |
119 | 120 | ] |
120 | 121 | }, |
121 | | - "organisation": { |
| 122 | + "organization": { |
122 | 123 | "title": "Organization", |
123 | 124 | "description": "An organizational affiliation for this contributor.", |
124 | 125 | "type": "string" |
125 | 126 | }, |
126 | 127 | "role": { |
127 | 128 | "type": "string", |
128 | | - "enum": [ |
129 | | - "publisher", |
130 | | - "author", |
131 | | - "maintainer", |
132 | | - "wrangler", |
133 | | - "contributor" |
134 | | - ], |
135 | 129 | "default": "contributor" |
136 | 130 | } |
137 | 131 | }, |
|
178 | 172 | "title": "License", |
179 | 173 | "description": "A license for this descriptor.", |
180 | 174 | "type": "object", |
| 175 | + "anyOf": [ |
| 176 | + { |
| 177 | + "required": [ |
| 178 | + "name" |
| 179 | + ] |
| 180 | + }, |
| 181 | + { |
| 182 | + "required": [ |
| 183 | + "path" |
| 184 | + ] |
| 185 | + } |
| 186 | + ], |
181 | 187 | "properties": { |
182 | 188 | "name": { |
183 | 189 | "title": "Open Definition license identifier", |
|
187 | 193 | }, |
188 | 194 | "path": { |
189 | 195 | "title": "Path", |
190 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 196 | + "description": "A fully qualified URL, or a POSIX file path.", |
191 | 197 | "type": "string", |
| 198 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
192 | 199 | "examples": [ |
193 | 200 | "{\n \"path\": \"file.csv\"\n}\n", |
194 | 201 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
208 | 215 | }, |
209 | 216 | "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", |
210 | 217 | "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" |
212 | 219 | ] |
213 | 220 | }, |
214 | 221 | "resources": { |
|
266 | 273 | "oneOf": [ |
267 | 274 | { |
268 | 275 | "title": "Path", |
269 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 276 | + "description": "A fully qualified URL, or a POSIX file path.", |
270 | 277 | "type": "string", |
| 278 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
271 | 279 | "examples": [ |
272 | 280 | "{\n \"path\": \"file.csv\"\n}\n", |
273 | 281 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
279 | 287 | "minItems": 1, |
280 | 288 | "items": { |
281 | 289 | "title": "Path", |
282 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 290 | + "description": "A fully qualified URL, or a POSIX file path.", |
283 | 291 | "type": "string", |
| 292 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
284 | 293 | "examples": [ |
285 | 294 | "{\n \"path\": \"file.csv\"\n}\n", |
286 | 295 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
309 | 318 | "propertyOrder": 40, |
310 | 319 | "title": "Schema", |
311 | 320 | "description": "A schema for this resource.", |
312 | | - "type": "object" |
| 321 | + "type": [ |
| 322 | + "string", |
| 323 | + "object" |
| 324 | + ] |
313 | 325 | }, |
314 | 326 | "title": { |
315 | | - "propertyOrder": 50, |
316 | 327 | "title": "Title", |
317 | 328 | "description": "A human-readable title.", |
318 | 329 | "type": "string", |
319 | 330 | "examples": [ |
320 | 331 | "{\n \"title\": \"My Package Title\"\n}\n" |
321 | | - ] |
| 332 | + ], |
| 333 | + "propertyOrder": 50 |
322 | 334 | }, |
323 | 335 | "description": { |
324 | 336 | "propertyOrder": 60, |
|
348 | 360 | "title": "Sources", |
349 | 361 | "description": "The raw sources for this resource.", |
350 | 362 | "type": "array", |
351 | | - "minItems": 1, |
| 363 | + "minItems": 0, |
352 | 364 | "items": { |
353 | 365 | "title": "Source", |
354 | 366 | "description": "A source file.", |
|
367 | 379 | }, |
368 | 380 | "path": { |
369 | 381 | "title": "Path", |
370 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 382 | + "description": "A fully qualified URL, or a POSIX file path.", |
371 | 383 | "type": "string", |
| 384 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
372 | 385 | "examples": [ |
373 | 386 | "{\n \"path\": \"file.csv\"\n}\n", |
374 | 387 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
387 | 400 | } |
388 | 401 | }, |
389 | 402 | "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" |
391 | 404 | ] |
392 | 405 | }, |
393 | 406 | "licenses": { |
|
403 | 416 | "title": "License", |
404 | 417 | "description": "A license for this descriptor.", |
405 | 418 | "type": "object", |
| 419 | + "anyOf": [ |
| 420 | + { |
| 421 | + "required": [ |
| 422 | + "name" |
| 423 | + ] |
| 424 | + }, |
| 425 | + { |
| 426 | + "required": [ |
| 427 | + "path" |
| 428 | + ] |
| 429 | + } |
| 430 | + ], |
406 | 431 | "properties": { |
407 | 432 | "name": { |
408 | 433 | "title": "Open Definition license identifier", |
|
412 | 437 | }, |
413 | 438 | "path": { |
414 | 439 | "title": "Path", |
415 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 440 | + "description": "A fully qualified URL, or a POSIX file path.", |
416 | 441 | "type": "string", |
| 442 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
417 | 443 | "examples": [ |
418 | 444 | "{\n \"path\": \"file.csv\"\n}\n", |
419 | 445 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
433 | 459 | }, |
434 | 460 | "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", |
435 | 461 | "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" |
437 | 463 | ] |
438 | 464 | }, |
439 | 465 | "format": { |
|
506 | 532 | "title": "Sources", |
507 | 533 | "description": "The raw sources for this resource.", |
508 | 534 | "type": "array", |
509 | | - "minItems": 1, |
| 535 | + "minItems": 0, |
510 | 536 | "items": { |
511 | 537 | "title": "Source", |
512 | 538 | "description": "A source file.", |
|
525 | 551 | }, |
526 | 552 | "path": { |
527 | 553 | "title": "Path", |
528 | | - "description": "A fully qualified URL, or a POSIX file path..", |
| 554 | + "description": "A fully qualified URL, or a POSIX file path.", |
529 | 555 | "type": "string", |
| 556 | + "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", |
530 | 557 | "examples": [ |
531 | 558 | "{\n \"path\": \"file.csv\"\n}\n", |
532 | 559 | "{\n \"path\": \"http://example.com/file.csv\"\n}\n" |
|
545 | 572 | } |
546 | 573 | }, |
547 | 574 | "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" |
549 | 576 | ] |
550 | 577 | } |
551 | 578 | } |
|
0 commit comments