datapackage 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2199 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "title": "Tabular Data Package",
4
+ "description": "Tabular Data Package is a simple specification for data access and delivery of tabular data.",
5
+ "type": "object",
6
+ "required": [
7
+ "resources",
8
+ "profile"
9
+ ],
10
+ "properties": {
11
+ "profile": {
12
+ "propertyOrder": 10,
13
+ "title": "Profile",
14
+ "description": "The profile of this 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.",
16
+ "type": "string",
17
+ "examples": [
18
+ "{\n \"profile\": \"tabular-data-package\"\n}\n",
19
+ "{\n \"profile\": \"http://example.com/my-profiles-json-schema.json\"\n}\n"
20
+ ]
21
+ },
22
+ "name": {
23
+ "propertyOrder": 20,
24
+ "title": "Name",
25
+ "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.",
26
+ "type": "string",
27
+ "pattern": "^([-a-z0-9._/])+$",
28
+ "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.",
29
+ "examples": [
30
+ "{\n \"name\": \"my-nice-name\"\n}\n"
31
+ ]
32
+ },
33
+ "id": {
34
+ "propertyOrder": 30,
35
+ "title": "ID",
36
+ "description": "A property reserved for globally unique identifiers. Examples of identifiers that are unique include UUIDs and DOIs.",
37
+ "context": "A common usage pattern for Data Packages is as a packaging format within the bounds of a system or platform. In these cases, a unique identifier for a package is desired for common data handling workflows, such as updating an existing package. While at the level of the specification, global uniqueness cannot be validated, consumers using the `id` property `MUST` ensure identifiers are globally unique.",
38
+ "type": "string",
39
+ "examples": [
40
+ "{\n \"id\": \"b03ec84-77fd-4270-813b-0c698943f7ce\"\n}\n",
41
+ "{\n \"id\": \"http://dx.doi.org/10.1594/PANGAEA.726855\"\n}\n"
42
+ ]
43
+ },
44
+ "title": {
45
+ "propertyOrder": 40,
46
+ "title": "Title",
47
+ "description": "A human-readable title.",
48
+ "type": "string",
49
+ "examples": [
50
+ "{\n \"title\": \"My Package Title\"\n}\n"
51
+ ]
52
+ },
53
+ "description": {
54
+ "propertyOrder": 50,
55
+ "format": "textarea",
56
+ "title": "Description",
57
+ "description": "A text description. Markdown is encouraged.",
58
+ "type": "string",
59
+ "examples": [
60
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
61
+ ]
62
+ },
63
+ "homepage": {
64
+ "propertyOrder": 60,
65
+ "title": "Home Page",
66
+ "description": "The home on the web that is related to this data package.",
67
+ "type": "string",
68
+ "format": "uri",
69
+ "examples": [
70
+ "{\n \"homepage\": \"http://example.com/\"\n}\n"
71
+ ]
72
+ },
73
+ "created": {
74
+ "propertyOrder": 70,
75
+ "title": "Created",
76
+ "description": "The datetime on which this descriptor was created.",
77
+ "context": "The datetime must conform to the string formats for datetime as described in [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6)",
78
+ "type": "string",
79
+ "format": "date-time",
80
+ "examples": [
81
+ "{\n \"created\": \"1985-04-12T23:20:50.52Z\"\n}\n"
82
+ ]
83
+ },
84
+ "contributors": {
85
+ "propertyOrder": 80,
86
+ "title": "Contributors",
87
+ "description": "The contributors to this descriptor.",
88
+ "type": "array",
89
+ "minItems": 1,
90
+ "items": {
91
+ "title": "Contributor",
92
+ "description": "A contributor to this descriptor.",
93
+ "properties": {
94
+ "title": {
95
+ "title": "Title",
96
+ "description": "A human-readable title.",
97
+ "type": "string",
98
+ "examples": [
99
+ "{\n \"title\": \"My Package Title\"\n}\n"
100
+ ]
101
+ },
102
+ "path": {
103
+ "title": "Path",
104
+ "description": "A fully qualified URL, or a POSIX file path..",
105
+ "type": "string",
106
+ "examples": [
107
+ "{\n \"path\": \"file.csv\"\n}\n",
108
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
109
+ ],
110
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
111
+ },
112
+ "email": {
113
+ "title": "Email",
114
+ "description": "An email address.",
115
+ "type": "string",
116
+ "format": "email",
117
+ "examples": [
118
+ "{\n \"email\": \"example@example.com\"\n}\n"
119
+ ]
120
+ },
121
+ "organisation": {
122
+ "title": "Organisation",
123
+ "description": "An organizational affiliation for this contributor.",
124
+ "type": "string"
125
+ },
126
+ "role": {
127
+ "type": "string",
128
+ "enum": [
129
+ "publisher",
130
+ "author",
131
+ "maintainer",
132
+ "wrangler",
133
+ "contributor"
134
+ ]
135
+ }
136
+ },
137
+ "required": [
138
+ "title"
139
+ ],
140
+ "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."
141
+ },
142
+ "examples": [
143
+ "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\"\n }\n ]\n}\n",
144
+ "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n"
145
+ ]
146
+ },
147
+ "keywords": {
148
+ "propertyOrder": 90,
149
+ "title": "Keywords",
150
+ "description": "A list of keywords that describe this package.",
151
+ "type": "array",
152
+ "minItems": 1,
153
+ "items": {
154
+ "type": "string"
155
+ },
156
+ "examples": [
157
+ "{\n \"keywords\": [\n \"data\",\n \"fiscal\",\n \"transparency\"\n ]\n}\n"
158
+ ]
159
+ },
160
+ "licenses": {
161
+ "propertyOrder": 100,
162
+ "title": "Licenses",
163
+ "description": "The license(s) under which this package is published.",
164
+ "type": "array",
165
+ "minItems": 1,
166
+ "items": {
167
+ "title": "License",
168
+ "description": "A license for this descriptor.",
169
+ "type": "object",
170
+ "properties": {
171
+ "name": {
172
+ "title": "Open Definition license identifier",
173
+ "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/",
174
+ "type": "string",
175
+ "pattern": "^([-a-zA-Z0-9._])+$"
176
+ },
177
+ "path": {
178
+ "title": "Path",
179
+ "description": "A fully qualified URL, or a POSIX file path..",
180
+ "type": "string",
181
+ "examples": [
182
+ "{\n \"path\": \"file.csv\"\n}\n",
183
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
184
+ ],
185
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
186
+ },
187
+ "title": {
188
+ "title": "Title",
189
+ "description": "A human-readable title.",
190
+ "type": "string",
191
+ "examples": [
192
+ "{\n \"title\": \"My Package Title\"\n}\n"
193
+ ]
194
+ }
195
+ },
196
+ "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."
197
+ },
198
+ "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.",
199
+ "examples": [
200
+ "{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"uri\": \"http://opendatacommons.org/licenses/pddl/\"\n }\n ]\n}\n"
201
+ ]
202
+ },
203
+ "resources": {
204
+ "propertyOrder": 110,
205
+ "title": "Tabular Data Resources",
206
+ "description": "An `array` of Tabular Data Resource objects, each compliant with the [Tabular Data Resource](/tabular-data-resource/) specification.",
207
+ "type": "array",
208
+ "minItems": 1,
209
+ "items": {
210
+ "title": "Tabular Data Resource",
211
+ "description": "A Tabular Data Resource.",
212
+ "type": "object",
213
+ "oneOf": [
214
+ {
215
+ "required": [
216
+ "name",
217
+ "data",
218
+ "schema",
219
+ "profile"
220
+ ]
221
+ },
222
+ {
223
+ "required": [
224
+ "name",
225
+ "path",
226
+ "schema",
227
+ "profile"
228
+ ]
229
+ }
230
+ ],
231
+ "properties": {
232
+ "profile": {
233
+ "propertyOrder": 10,
234
+ "title": "Profile",
235
+ "description": "The profile of this descriptor.",
236
+ "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.",
237
+ "type": "string",
238
+ "examples": [
239
+ "{\n \"profile\": \"tabular-data-package\"\n}\n",
240
+ "{\n \"profile\": \"http://example.com/my-profiles-json-schema.json\"\n}\n"
241
+ ]
242
+ },
243
+ "name": {
244
+ "propertyOrder": 20,
245
+ "title": "Name",
246
+ "description": "An identifier string. Lower case characters with `.`, `_`, `-` and `/` are allowed.",
247
+ "type": "string",
248
+ "pattern": "^([-a-z0-9._/])+$",
249
+ "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.",
250
+ "examples": [
251
+ "{\n \"name\": \"my-nice-name\"\n}\n"
252
+ ]
253
+ },
254
+ "path": {
255
+ "propertyOrder": 30,
256
+ "title": "Path",
257
+ "description": "A reference to the data for this resource, as either a path as a string, or an array of paths as strings. of valid URIs.",
258
+ "oneOf": [
259
+ {
260
+ "title": "Path",
261
+ "description": "A fully qualified URL, or a POSIX file path..",
262
+ "type": "string",
263
+ "examples": [
264
+ "{\n \"path\": \"file.csv\"\n}\n",
265
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
266
+ ],
267
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
268
+ },
269
+ {
270
+ "type": "array",
271
+ "minItems": 1,
272
+ "items": {
273
+ "title": "Path",
274
+ "description": "A fully qualified URL, or a POSIX file path..",
275
+ "type": "string",
276
+ "examples": [
277
+ "{\n \"path\": \"file.csv\"\n}\n",
278
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
279
+ ],
280
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
281
+ },
282
+ "examples": [
283
+ "[ \"file.csv\" ]\n",
284
+ "[ \"http://example.com/file.csv\" ]\n"
285
+ ]
286
+ }
287
+ ],
288
+ "context": "The dereferenced value of each referenced data source in `path` `MUST` be commensurate with a native, dereferenced representation of the data the resource describes. For example, in a *Tabular* Data Resource, this means that the dereferenced value of `path` `MUST` be an array.",
289
+ "examples": [
290
+ "{\n \"path\": [\n \"file.csv\",\n \"file2.csv\"\n ]\n}\n",
291
+ "{\n \"path\": [\n \"http://example.com/file.csv\",\n \"http://example.com/file2.csv\"\n ]\n}\n",
292
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
293
+ ]
294
+ },
295
+ "data": {
296
+ "propertyOrder": 230,
297
+ "title": "Data",
298
+ "description": "Inline data for this resource."
299
+ },
300
+ "schema": {
301
+ "propertyOrder": 40,
302
+ "title": "Table Schema",
303
+ "description": "A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.",
304
+ "type": "object",
305
+ "required": [
306
+ "fields"
307
+ ],
308
+ "properties": {
309
+ "fields": {
310
+ "type": "array",
311
+ "minItems": 1,
312
+ "items": {
313
+ "title": "Table Schema Field",
314
+ "type": "object",
315
+ "anyOf": [
316
+ {
317
+ "type": "object",
318
+ "title": "String Field",
319
+ "description": "The field contains strings, that is, sequences of characters.",
320
+ "required": [
321
+ "name"
322
+ ],
323
+ "properties": {
324
+ "name": {
325
+ "title": "Name",
326
+ "description": "A name for this field.",
327
+ "type": "string"
328
+ },
329
+ "title": {
330
+ "title": "Title",
331
+ "description": "A human-readable title.",
332
+ "type": "string",
333
+ "examples": [
334
+ "{\n \"title\": \"My Package Title\"\n}\n"
335
+ ]
336
+ },
337
+ "description": {
338
+ "title": "Description",
339
+ "description": "A text description. Markdown is encouraged.",
340
+ "type": "string",
341
+ "examples": [
342
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
343
+ ]
344
+ },
345
+ "type": {
346
+ "description": "The type keyword, which `MUST` be a value of `string`.",
347
+ "enum": [
348
+ "string"
349
+ ]
350
+ },
351
+ "format": {
352
+ "description": "The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.",
353
+ "context": "The following `format` options are supported:\n * **default**: any valid string.\n * **email**: A valid email address.\n * **uri**: A valid URI.\n * **binary**: A base64 encoded string representing binary data.\n * **uuid**: A string that is a uuid.",
354
+ "enum": [
355
+ "default",
356
+ "email",
357
+ "uri",
358
+ "binary",
359
+ "uuid"
360
+ ],
361
+ "default": "default"
362
+ },
363
+ "constraints": {
364
+ "title": "Constraints",
365
+ "description": "The following constraints are supported for `string` fields.",
366
+ "type": "object",
367
+ "properties": {
368
+ "required": {
369
+ "type": "boolean",
370
+ "description": "Indicates whether a property must have a value for each instance.",
371
+ "context": "An empty string is considered to be a missing value."
372
+ },
373
+ "unique": {
374
+ "type": "boolean",
375
+ "description": "When `true`, each value for the property `MUST` be unique."
376
+ },
377
+ "pattern": {
378
+ "type": "string",
379
+ "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.",
380
+ "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)."
381
+ },
382
+ "enum": {
383
+ "type": "array",
384
+ "minItems": 1,
385
+ "uniqueItems": true,
386
+ "items": {
387
+ "type": "string"
388
+ }
389
+ },
390
+ "minLength": {
391
+ "type": "integer",
392
+ "description": "An integer that specifies the minimum length of a value."
393
+ },
394
+ "maxLength": {
395
+ "type": "integer",
396
+ "description": "An integer that specifies the maximum length of a value."
397
+ }
398
+ }
399
+ },
400
+ "rdfType": {
401
+ "type": "string",
402
+ "description": "The RDF type for this field."
403
+ }
404
+ },
405
+ "examples": [
406
+ "{\n \"name\": \"name\",\n \"type\": \"string\"\n}\n",
407
+ "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"format\": \"email\"\n}\n",
408
+ "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"constraints\": {\n \"minLength\": 3,\n \"maxLength\": 35\n }\n}\n"
409
+ ]
410
+ },
411
+ {
412
+ "type": "object",
413
+ "title": "Number Field",
414
+ "description": "The field contains numbers of any kind including decimals.",
415
+ "context": "The lexical formatting follows that of decimal in [XMLSchema](https://www.w3.org/TR/xmlschema-2/#decimal): a non-empty finite-length sequence of decimal digits separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: '-1.23', '12678967.543233', '+100000.00', '210'.\n\nThe following special string values are permitted (case does not need to be respected):\n - NaN: not a number\n - INF: positive infinity\n - -INF: negative infinity\n\nA number `MAY` also have a trailing:\n - exponent: this `MUST` consist of an E followed by an optional + or - sign followed by one or more decimal digits (0-9)\n - percentage: the percentage sign: `%`. In conversion percentages should be divided by 100.\n\nIf both exponent and percentages are present the percentage `MUST` follow the exponent e.g. '53E10%' (equals 5.3).",
416
+ "required": [
417
+ "name"
418
+ ],
419
+ "properties": {
420
+ "name": {
421
+ "title": "Name",
422
+ "description": "A name for this field.",
423
+ "type": "string"
424
+ },
425
+ "title": {
426
+ "title": "Title",
427
+ "description": "A human-readable title.",
428
+ "type": "string",
429
+ "examples": [
430
+ "{\n \"title\": \"My Package Title\"\n}\n"
431
+ ]
432
+ },
433
+ "description": {
434
+ "title": "Description",
435
+ "description": "A text description. Markdown is encouraged.",
436
+ "type": "string",
437
+ "examples": [
438
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
439
+ ]
440
+ },
441
+ "type": {
442
+ "description": "The type keyword, which `MUST` be a value of `number`.",
443
+ "enum": [
444
+ "number"
445
+ ]
446
+ },
447
+ "format": {
448
+ "description": "There are no format keyword options for `number`: only `default` is allowed.",
449
+ "enum": [
450
+ "default"
451
+ ],
452
+ "default": "default"
453
+ },
454
+ "bareNumber": {
455
+ "type": "boolean",
456
+ "title": "bareNumber",
457
+ "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.",
458
+ "default": true
459
+ },
460
+ "decimalChar": {
461
+ "type": "string",
462
+ "description": "A string whose value is used to represent a decimal point within the number. The default value is `.`."
463
+ },
464
+ "groupChar": {
465
+ "type": "string",
466
+ "description": "A string whose value is used to group digits within the number. The default value is `null`. A common value is `,` e.g. '100,000'."
467
+ },
468
+ "constraints": {
469
+ "title": "Constraints",
470
+ "description": "The following constraints are supported for `number` fields.",
471
+ "type": "object",
472
+ "properties": {
473
+ "required": {
474
+ "type": "boolean",
475
+ "description": "Indicates whether a property must have a value for each instance.",
476
+ "context": "An empty string is considered to be a missing value."
477
+ },
478
+ "unique": {
479
+ "type": "boolean",
480
+ "description": "When `true`, each value for the property `MUST` be unique."
481
+ },
482
+ "pattern": {
483
+ "type": "string",
484
+ "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.",
485
+ "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)."
486
+ },
487
+ "enum": {
488
+ "oneOf": [
489
+ {
490
+ "type": "array",
491
+ "minItems": 1,
492
+ "uniqueItems": true,
493
+ "items": {
494
+ "type": "string"
495
+ }
496
+ },
497
+ {
498
+ "type": "array",
499
+ "minItems": 1,
500
+ "uniqueItems": true,
501
+ "items": {
502
+ "type": "number"
503
+ }
504
+ }
505
+ ]
506
+ },
507
+ "minimum": {
508
+ "oneOf": [
509
+ {
510
+ "type": "string"
511
+ },
512
+ {
513
+ "type": "number"
514
+ }
515
+ ]
516
+ },
517
+ "maximum": {
518
+ "oneOf": [
519
+ {
520
+ "type": "string"
521
+ },
522
+ {
523
+ "type": "number"
524
+ }
525
+ ]
526
+ }
527
+ }
528
+ },
529
+ "rdfType": {
530
+ "type": "string",
531
+ "description": "The RDF type for this field."
532
+ }
533
+ },
534
+ "examples": [
535
+ "{\n \"name\": \"field-name\",\n \"type\": \"number\"\n}\n",
536
+ "{\n \"name\": \"field-name\",\n \"type\": \"number\",\n \"constraints\": {\n \"enum\": [ \"1.00\", \"1.50\", \"2.00\" ]\n }\n}\n"
537
+ ]
538
+ },
539
+ {
540
+ "type": "object",
541
+ "title": "Integer Field",
542
+ "description": "The field contains integers - that is whole numbers.",
543
+ "context": "Integer values are indicated in the standard way for any valid integer.",
544
+ "required": [
545
+ "name",
546
+ "type"
547
+ ],
548
+ "properties": {
549
+ "name": {
550
+ "title": "Name",
551
+ "description": "A name for this field.",
552
+ "type": "string"
553
+ },
554
+ "title": {
555
+ "title": "Title",
556
+ "description": "A human-readable title.",
557
+ "type": "string",
558
+ "examples": [
559
+ "{\n \"title\": \"My Package Title\"\n}\n"
560
+ ]
561
+ },
562
+ "description": {
563
+ "title": "Description",
564
+ "description": "A text description. Markdown is encouraged.",
565
+ "type": "string",
566
+ "examples": [
567
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
568
+ ]
569
+ },
570
+ "type": {
571
+ "description": "The type keyword, which `MUST` be a value of `integer`.",
572
+ "enum": [
573
+ "integer"
574
+ ]
575
+ },
576
+ "format": {
577
+ "description": "There are no format keyword options for `integer`: only `default` is allowed.",
578
+ "enum": [
579
+ "default"
580
+ ],
581
+ "default": "default"
582
+ },
583
+ "bareNumber": {
584
+ "type": "boolean",
585
+ "title": "bareNumber",
586
+ "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.",
587
+ "default": true
588
+ },
589
+ "constraints": {
590
+ "title": "Constraints",
591
+ "description": "The following constraints are supported for `integer` fields.",
592
+ "type": "object",
593
+ "properties": {
594
+ "required": {
595
+ "type": "boolean",
596
+ "description": "Indicates whether a property must have a value for each instance.",
597
+ "context": "An empty string is considered to be a missing value."
598
+ },
599
+ "unique": {
600
+ "type": "boolean",
601
+ "description": "When `true`, each value for the property `MUST` be unique."
602
+ },
603
+ "pattern": {
604
+ "type": "string",
605
+ "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.",
606
+ "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)."
607
+ },
608
+ "enum": {
609
+ "oneOf": [
610
+ {
611
+ "type": "array",
612
+ "minItems": 1,
613
+ "uniqueItems": true,
614
+ "items": {
615
+ "type": "string"
616
+ }
617
+ },
618
+ {
619
+ "type": "array",
620
+ "minItems": 1,
621
+ "uniqueItems": true,
622
+ "items": {
623
+ "type": "integer"
624
+ }
625
+ }
626
+ ]
627
+ },
628
+ "minimum": {
629
+ "oneOf": [
630
+ {
631
+ "type": "string"
632
+ },
633
+ {
634
+ "type": "integer"
635
+ }
636
+ ]
637
+ },
638
+ "maximum": {
639
+ "oneOf": [
640
+ {
641
+ "type": "string"
642
+ },
643
+ {
644
+ "type": "integer"
645
+ }
646
+ ]
647
+ }
648
+ }
649
+ },
650
+ "rdfType": {
651
+ "type": "string",
652
+ "description": "The RDF type for this field."
653
+ }
654
+ },
655
+ "examples": [
656
+ "{\n \"name\": \"age\",\n \"type\": \"integer\",\n \"constraints\": {\n \"unique\": true,\n \"minimum\": 100,\n \"maximum\": 9999\n }\n}\n"
657
+ ]
658
+ },
659
+ {
660
+ "type": "object",
661
+ "title": "Date Field",
662
+ "description": "The field contains temporal date values.",
663
+ "required": [
664
+ "name",
665
+ "type"
666
+ ],
667
+ "properties": {
668
+ "name": {
669
+ "title": "Name",
670
+ "description": "A name for this field.",
671
+ "type": "string"
672
+ },
673
+ "title": {
674
+ "title": "Title",
675
+ "description": "A human-readable title.",
676
+ "type": "string",
677
+ "examples": [
678
+ "{\n \"title\": \"My Package Title\"\n}\n"
679
+ ]
680
+ },
681
+ "description": {
682
+ "title": "Description",
683
+ "description": "A text description. Markdown is encouraged.",
684
+ "type": "string",
685
+ "examples": [
686
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
687
+ ]
688
+ },
689
+ "type": {
690
+ "description": "The type keyword, which `MUST` be a value of `date`.",
691
+ "enum": [
692
+ "date"
693
+ ]
694
+ },
695
+ "format": {
696
+ "description": "The format keyword options for `date` are `default`, `any`, and `{PATTERN}`.",
697
+ "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string of YYYY-MM-DD.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).",
698
+ "default": "default"
699
+ },
700
+ "constraints": {
701
+ "title": "Constraints",
702
+ "description": "The following constraints are supported for `date` fields.",
703
+ "type": "object",
704
+ "properties": {
705
+ "required": {
706
+ "type": "boolean",
707
+ "description": "Indicates whether a property must have a value for each instance.",
708
+ "context": "An empty string is considered to be a missing value."
709
+ },
710
+ "unique": {
711
+ "type": "boolean",
712
+ "description": "When `true`, each value for the property `MUST` be unique."
713
+ },
714
+ "enum": {
715
+ "type": "array",
716
+ "minItems": 1,
717
+ "uniqueItems": true,
718
+ "items": {
719
+ "type": "string"
720
+ }
721
+ },
722
+ "minimum": {
723
+ "type": "string"
724
+ },
725
+ "maximum": {
726
+ "type": "string"
727
+ }
728
+ }
729
+ },
730
+ "rdfType": {
731
+ "type": "string",
732
+ "description": "The RDF type for this field."
733
+ }
734
+ },
735
+ "examples": [
736
+ "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\"\n}\n",
737
+ "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"constraints\": {\n \"minimum\": \"01-01-1900\"\n }\n}\n",
738
+ "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"format\": \"MM-DD-YYYY\"\n}\n"
739
+ ]
740
+ },
741
+ {
742
+ "type": "object",
743
+ "title": "Time Field",
744
+ "description": "The field contains temporal time values.",
745
+ "required": [
746
+ "name",
747
+ "type"
748
+ ],
749
+ "properties": {
750
+ "name": {
751
+ "title": "Name",
752
+ "description": "A name for this field.",
753
+ "type": "string"
754
+ },
755
+ "title": {
756
+ "title": "Title",
757
+ "description": "A human-readable title.",
758
+ "type": "string",
759
+ "examples": [
760
+ "{\n \"title\": \"My Package Title\"\n}\n"
761
+ ]
762
+ },
763
+ "description": {
764
+ "title": "Description",
765
+ "description": "A text description. Markdown is encouraged.",
766
+ "type": "string",
767
+ "examples": [
768
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
769
+ ]
770
+ },
771
+ "type": {
772
+ "description": "The type keyword, which `MUST` be a value of `time`.",
773
+ "enum": [
774
+ "time"
775
+ ]
776
+ },
777
+ "format": {
778
+ "description": "The format keyword options for `time` are `default`, `any`, and `{PATTERN}`.",
779
+ "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for time.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).",
780
+ "default": "default"
781
+ },
782
+ "constraints": {
783
+ "title": "Constraints",
784
+ "description": "The following constraints are supported for `time` fields.",
785
+ "type": "object",
786
+ "properties": {
787
+ "required": {
788
+ "type": "boolean",
789
+ "description": "Indicates whether a property must have a value for each instance.",
790
+ "context": "An empty string is considered to be a missing value."
791
+ },
792
+ "unique": {
793
+ "type": "boolean",
794
+ "description": "When `true`, each value for the property `MUST` be unique."
795
+ },
796
+ "enum": {
797
+ "type": "array",
798
+ "minItems": 1,
799
+ "uniqueItems": true,
800
+ "items": {
801
+ "type": "string"
802
+ }
803
+ },
804
+ "minimum": {
805
+ "type": "string"
806
+ },
807
+ "maximum": {
808
+ "type": "string"
809
+ }
810
+ }
811
+ },
812
+ "rdfType": {
813
+ "type": "string",
814
+ "description": "The RDF type for this field."
815
+ }
816
+ },
817
+ "examples": [
818
+ "{\n \"name\": \"appointment_start\",\n \"type\": \"time\"\n}\n",
819
+ "{\n \"name\": \"appointment_start\",\n \"type\": \"time\",\n \"format\": \"any\"\n}\n"
820
+ ]
821
+ },
822
+ {
823
+ "type": "object",
824
+ "title": "Date Time Field",
825
+ "description": "The field contains temporal datetime values.",
826
+ "required": [
827
+ "name",
828
+ "type"
829
+ ],
830
+ "properties": {
831
+ "name": {
832
+ "title": "Name",
833
+ "description": "A name for this field.",
834
+ "type": "string"
835
+ },
836
+ "title": {
837
+ "title": "Title",
838
+ "description": "A human-readable title.",
839
+ "type": "string",
840
+ "examples": [
841
+ "{\n \"title\": \"My Package Title\"\n}\n"
842
+ ]
843
+ },
844
+ "description": {
845
+ "title": "Description",
846
+ "description": "A text description. Markdown is encouraged.",
847
+ "type": "string",
848
+ "examples": [
849
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
850
+ ]
851
+ },
852
+ "type": {
853
+ "description": "The type keyword, which `MUST` be a value of `datetime`.",
854
+ "enum": [
855
+ "datetime"
856
+ ]
857
+ },
858
+ "format": {
859
+ "description": "The format keyword options for `datetime` are `default`, `any`, and `{PATTERN}`.",
860
+ "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for datetime.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).",
861
+ "default": "default"
862
+ },
863
+ "constraints": {
864
+ "title": "Constraints",
865
+ "description": "The following constraints are supported for `datetime` fields.",
866
+ "type": "object",
867
+ "properties": {
868
+ "required": {
869
+ "type": "boolean",
870
+ "description": "Indicates whether a property must have a value for each instance.",
871
+ "context": "An empty string is considered to be a missing value."
872
+ },
873
+ "unique": {
874
+ "type": "boolean",
875
+ "description": "When `true`, each value for the property `MUST` be unique."
876
+ },
877
+ "enum": {
878
+ "type": "array",
879
+ "minItems": 1,
880
+ "uniqueItems": true,
881
+ "items": {
882
+ "type": "string"
883
+ }
884
+ },
885
+ "minimum": {
886
+ "type": "string"
887
+ },
888
+ "maximum": {
889
+ "type": "string"
890
+ }
891
+ }
892
+ },
893
+ "rdfType": {
894
+ "type": "string",
895
+ "description": "The RDF type for this field."
896
+ }
897
+ },
898
+ "examples": [
899
+ "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\"\n}\n",
900
+ "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\",\n \"format\": \"default\"\n}\n"
901
+ ]
902
+ },
903
+ {
904
+ "type": "object",
905
+ "title": "Year Field",
906
+ "description": "A calendar year, being an integer with 4 digits. Equivalent to [gYear in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYear)",
907
+ "required": [
908
+ "name",
909
+ "type"
910
+ ],
911
+ "properties": {
912
+ "name": {
913
+ "title": "Name",
914
+ "description": "A name for this field.",
915
+ "type": "string"
916
+ },
917
+ "title": {
918
+ "title": "Title",
919
+ "description": "A human-readable title.",
920
+ "type": "string",
921
+ "examples": [
922
+ "{\n \"title\": \"My Package Title\"\n}\n"
923
+ ]
924
+ },
925
+ "description": {
926
+ "title": "Description",
927
+ "description": "A text description. Markdown is encouraged.",
928
+ "type": "string",
929
+ "examples": [
930
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
931
+ ]
932
+ },
933
+ "type": {
934
+ "description": "The type keyword, which `MUST` be a value of `year`.",
935
+ "enum": [
936
+ "year"
937
+ ]
938
+ },
939
+ "format": {
940
+ "description": "There are no format keyword options for `year`: only `default` is allowed.",
941
+ "enum": [
942
+ "default"
943
+ ],
944
+ "default": "default"
945
+ },
946
+ "constraints": {
947
+ "title": "Constraints",
948
+ "description": "The following constraints are supported for `year` fields.",
949
+ "type": "object",
950
+ "properties": {
951
+ "required": {
952
+ "type": "boolean",
953
+ "description": "Indicates whether a property must have a value for each instance.",
954
+ "context": "An empty string is considered to be a missing value."
955
+ },
956
+ "unique": {
957
+ "type": "boolean",
958
+ "description": "When `true`, each value for the property `MUST` be unique."
959
+ },
960
+ "enum": {
961
+ "oneOf": [
962
+ {
963
+ "type": "array",
964
+ "minItems": 1,
965
+ "uniqueItems": true,
966
+ "items": {
967
+ "type": "string"
968
+ }
969
+ },
970
+ {
971
+ "type": "array",
972
+ "minItems": 1,
973
+ "uniqueItems": true,
974
+ "items": {
975
+ "type": "integer"
976
+ }
977
+ }
978
+ ]
979
+ },
980
+ "minimum": {
981
+ "oneOf": [
982
+ {
983
+ "type": "string"
984
+ },
985
+ {
986
+ "type": "integer"
987
+ }
988
+ ]
989
+ },
990
+ "maximum": {
991
+ "oneOf": [
992
+ {
993
+ "type": "string"
994
+ },
995
+ {
996
+ "type": "integer"
997
+ }
998
+ ]
999
+ }
1000
+ }
1001
+ },
1002
+ "rdfType": {
1003
+ "type": "string",
1004
+ "description": "The RDF type for this field."
1005
+ }
1006
+ },
1007
+ "examples": [
1008
+ "{\n \"name\": \"year\",\n \"type\": \"year\"\n}\n",
1009
+ "{\n \"name\": \"year\",\n \"type\": \"year\",\n \"constraints\": {\n \"minimum\": 1970,\n \"maximum\": 2003\n }\n}\n"
1010
+ ]
1011
+ },
1012
+ {
1013
+ "type": "object",
1014
+ "title": "Year Month Field",
1015
+ "description": "A calendar year month, being an integer with 1 or 2 digits. Equivalent to [gYearMonth in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYearMonth)",
1016
+ "required": [
1017
+ "name",
1018
+ "type"
1019
+ ],
1020
+ "properties": {
1021
+ "name": {
1022
+ "title": "Name",
1023
+ "description": "A name for this field.",
1024
+ "type": "string"
1025
+ },
1026
+ "title": {
1027
+ "title": "Title",
1028
+ "description": "A human-readable title.",
1029
+ "type": "string",
1030
+ "examples": [
1031
+ "{\n \"title\": \"My Package Title\"\n}\n"
1032
+ ]
1033
+ },
1034
+ "description": {
1035
+ "title": "Description",
1036
+ "description": "A text description. Markdown is encouraged.",
1037
+ "type": "string",
1038
+ "examples": [
1039
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1040
+ ]
1041
+ },
1042
+ "type": {
1043
+ "description": "The type keyword, which `MUST` be a value of `yearmonth`.",
1044
+ "enum": [
1045
+ "yearmonth"
1046
+ ]
1047
+ },
1048
+ "format": {
1049
+ "description": "There are no format keyword options for `yearmonth`: only `default` is allowed.",
1050
+ "enum": [
1051
+ "default"
1052
+ ],
1053
+ "default": "default"
1054
+ },
1055
+ "constraints": {
1056
+ "title": "Constraints",
1057
+ "description": "The following constraints are supported for `yearmonth` fields.",
1058
+ "type": "object",
1059
+ "properties": {
1060
+ "required": {
1061
+ "type": "boolean",
1062
+ "description": "Indicates whether a property must have a value for each instance.",
1063
+ "context": "An empty string is considered to be a missing value."
1064
+ },
1065
+ "unique": {
1066
+ "type": "boolean",
1067
+ "description": "When `true`, each value for the property `MUST` be unique."
1068
+ },
1069
+ "pattern": {
1070
+ "type": "string",
1071
+ "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.",
1072
+ "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)."
1073
+ },
1074
+ "enum": {
1075
+ "type": "array",
1076
+ "minItems": 1,
1077
+ "uniqueItems": true,
1078
+ "items": {
1079
+ "type": "string"
1080
+ }
1081
+ },
1082
+ "minimum": {
1083
+ "type": "string"
1084
+ },
1085
+ "maximum": {
1086
+ "type": "string"
1087
+ }
1088
+ }
1089
+ },
1090
+ "rdfType": {
1091
+ "type": "string",
1092
+ "description": "The RDF type for this field."
1093
+ }
1094
+ },
1095
+ "examples": [
1096
+ "{\n \"name\": \"month\",\n \"type\": \"yearmonth\"\n}\n",
1097
+ "{\n \"name\": \"month\",\n \"type\": \"yearmonth\",\n \"constraints\": {\n \"minimum\": 1,\n \"maximum\": 6\n }\n}\n"
1098
+ ]
1099
+ },
1100
+ {
1101
+ "type": "object",
1102
+ "title": "Boolean Field",
1103
+ "description": "The field contains boolean (true/false) data.",
1104
+ "required": [
1105
+ "name",
1106
+ "type"
1107
+ ],
1108
+ "properties": {
1109
+ "name": {
1110
+ "title": "Name",
1111
+ "description": "A name for this field.",
1112
+ "type": "string"
1113
+ },
1114
+ "title": {
1115
+ "title": "Title",
1116
+ "description": "A human-readable title.",
1117
+ "type": "string",
1118
+ "examples": [
1119
+ "{\n \"title\": \"My Package Title\"\n}\n"
1120
+ ]
1121
+ },
1122
+ "description": {
1123
+ "title": "Description",
1124
+ "description": "A text description. Markdown is encouraged.",
1125
+ "type": "string",
1126
+ "examples": [
1127
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1128
+ ]
1129
+ },
1130
+ "type": {
1131
+ "description": "The type keyword, which `MUST` be a value of `boolean`.",
1132
+ "enum": [
1133
+ "boolean"
1134
+ ]
1135
+ },
1136
+ "trueValues": {
1137
+ "type": "array",
1138
+ "minItems": 1,
1139
+ "items": {
1140
+ "type": "string"
1141
+ },
1142
+ "default": [
1143
+ "true",
1144
+ "True",
1145
+ "TRUE",
1146
+ "1"
1147
+ ]
1148
+ },
1149
+ "falseValues": {
1150
+ "type": "array",
1151
+ "minItems": 1,
1152
+ "items": {
1153
+ "type": "string"
1154
+ },
1155
+ "default": [
1156
+ "false",
1157
+ "False",
1158
+ "FALSE",
1159
+ "0"
1160
+ ]
1161
+ },
1162
+ "constraints": {
1163
+ "title": "Constraints",
1164
+ "description": "The following constraints are supported for `boolean` fields.",
1165
+ "type": "object",
1166
+ "properties": {
1167
+ "required": {
1168
+ "type": "boolean",
1169
+ "description": "Indicates whether a property must have a value for each instance.",
1170
+ "context": "An empty string is considered to be a missing value."
1171
+ },
1172
+ "enum": {
1173
+ "type": "array",
1174
+ "minItems": 1,
1175
+ "uniqueItems": true,
1176
+ "items": {
1177
+ "type": "boolean"
1178
+ }
1179
+ }
1180
+ }
1181
+ },
1182
+ "rdfType": {
1183
+ "type": "string",
1184
+ "description": "The RDF type for this field."
1185
+ }
1186
+ },
1187
+ "examples": [
1188
+ "{\n \"name\": \"registered\",\n \"type\": \"boolean\"\n}\n"
1189
+ ]
1190
+ },
1191
+ {
1192
+ "type": "object",
1193
+ "title": "Object Field",
1194
+ "description": "The field contains data which can be parsed as a valid JSON object.",
1195
+ "required": [
1196
+ "name",
1197
+ "type"
1198
+ ],
1199
+ "properties": {
1200
+ "name": {
1201
+ "title": "Name",
1202
+ "description": "A name for this field.",
1203
+ "type": "string"
1204
+ },
1205
+ "title": {
1206
+ "title": "Title",
1207
+ "description": "A human-readable title.",
1208
+ "type": "string",
1209
+ "examples": [
1210
+ "{\n \"title\": \"My Package Title\"\n}\n"
1211
+ ]
1212
+ },
1213
+ "description": {
1214
+ "title": "Description",
1215
+ "description": "A text description. Markdown is encouraged.",
1216
+ "type": "string",
1217
+ "examples": [
1218
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1219
+ ]
1220
+ },
1221
+ "type": {
1222
+ "description": "The type keyword, which `MUST` be a value of `object`.",
1223
+ "enum": [
1224
+ "object"
1225
+ ]
1226
+ },
1227
+ "format": {
1228
+ "description": "There are no format keyword options for `object`: only `default` is allowed.",
1229
+ "enum": [
1230
+ "default"
1231
+ ],
1232
+ "default": "default"
1233
+ },
1234
+ "constraints": {
1235
+ "title": "Constraints",
1236
+ "description": "The following constraints apply for `object` fields.",
1237
+ "type": "object",
1238
+ "properties": {
1239
+ "required": {
1240
+ "type": "boolean",
1241
+ "description": "Indicates whether a property must have a value for each instance.",
1242
+ "context": "An empty string is considered to be a missing value."
1243
+ },
1244
+ "unique": {
1245
+ "type": "boolean",
1246
+ "description": "When `true`, each value for the property `MUST` be unique."
1247
+ },
1248
+ "enum": {
1249
+ "oneOf": [
1250
+ {
1251
+ "type": "array",
1252
+ "minItems": 1,
1253
+ "uniqueItems": true,
1254
+ "items": {
1255
+ "type": "string"
1256
+ }
1257
+ },
1258
+ {
1259
+ "type": "array",
1260
+ "minItems": 1,
1261
+ "uniqueItems": true,
1262
+ "items": {
1263
+ "type": "object"
1264
+ }
1265
+ }
1266
+ ]
1267
+ },
1268
+ "minLength": {
1269
+ "type": "integer",
1270
+ "description": "An integer that specifies the minimum length of a value."
1271
+ },
1272
+ "maxLength": {
1273
+ "type": "integer",
1274
+ "description": "An integer that specifies the maximum length of a value."
1275
+ }
1276
+ }
1277
+ },
1278
+ "rdfType": {
1279
+ "type": "string",
1280
+ "description": "The RDF type for this field."
1281
+ }
1282
+ },
1283
+ "examples": [
1284
+ "{\n \"name\": \"extra\"\n \"type\": \"object\"\n}\n"
1285
+ ]
1286
+ },
1287
+ {
1288
+ "type": "object",
1289
+ "title": "GeoPoint Field",
1290
+ "description": "The field contains data describing a geographic point.",
1291
+ "required": [
1292
+ "name",
1293
+ "type"
1294
+ ],
1295
+ "properties": {
1296
+ "name": {
1297
+ "title": "Name",
1298
+ "description": "A name for this field.",
1299
+ "type": "string"
1300
+ },
1301
+ "title": {
1302
+ "title": "Title",
1303
+ "description": "A human-readable title.",
1304
+ "type": "string",
1305
+ "examples": [
1306
+ "{\n \"title\": \"My Package Title\"\n}\n"
1307
+ ]
1308
+ },
1309
+ "description": {
1310
+ "title": "Description",
1311
+ "description": "A text description. Markdown is encouraged.",
1312
+ "type": "string",
1313
+ "examples": [
1314
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1315
+ ]
1316
+ },
1317
+ "type": {
1318
+ "description": "The type keyword, which `MUST` be a value of `geopoint`.",
1319
+ "enum": [
1320
+ "geopoint"
1321
+ ]
1322
+ },
1323
+ "format": {
1324
+ "description": "The format keyword options for `geopoint` are `default`,`array`, and `object`.",
1325
+ "context": "The following `format` options are supported:\n * **default**: A string of the pattern 'lon, lat', where `lon` is the longitude and `lat` is the latitude.\n * **array**: An array of exactly two items, where each item is either a number, or a string parsable as a number, and the first item is `lon` and the second item is `lat`.\n * **object**: A JSON object with exactly two keys, `lat` and `lon`",
1326
+ "notes": [
1327
+ "Implementations `MUST` strip all white space in the default format of `lon, lat`."
1328
+ ],
1329
+ "enum": [
1330
+ "default",
1331
+ "array",
1332
+ "object"
1333
+ ],
1334
+ "default": "default"
1335
+ },
1336
+ "constraints": {
1337
+ "title": "Constraints",
1338
+ "description": "The following constraints are supported for `geopoint` fields.",
1339
+ "type": "object",
1340
+ "properties": {
1341
+ "required": {
1342
+ "type": "boolean",
1343
+ "description": "Indicates whether a property must have a value for each instance.",
1344
+ "context": "An empty string is considered to be a missing value."
1345
+ },
1346
+ "unique": {
1347
+ "type": "boolean",
1348
+ "description": "When `true`, each value for the property `MUST` be unique."
1349
+ },
1350
+ "enum": {
1351
+ "oneOf": [
1352
+ {
1353
+ "type": "array",
1354
+ "minItems": 1,
1355
+ "uniqueItems": true,
1356
+ "items": {
1357
+ "type": "string"
1358
+ }
1359
+ },
1360
+ {
1361
+ "type": "array",
1362
+ "minItems": 1,
1363
+ "uniqueItems": true,
1364
+ "items": {
1365
+ "type": "array"
1366
+ }
1367
+ },
1368
+ {
1369
+ "type": "array",
1370
+ "minItems": 1,
1371
+ "uniqueItems": true,
1372
+ "items": {
1373
+ "type": "object"
1374
+ }
1375
+ }
1376
+ ]
1377
+ }
1378
+ }
1379
+ },
1380
+ "rdfType": {
1381
+ "type": "string",
1382
+ "description": "The RDF type for this field."
1383
+ }
1384
+ },
1385
+ "examples": [
1386
+ "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\"\n}\n",
1387
+ "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\",\n \"format\": \"array\"\n}\n"
1388
+ ]
1389
+ },
1390
+ {
1391
+ "type": "object",
1392
+ "title": "GeoJSON Field",
1393
+ "description": "The field contains a JSON object according to GeoJSON or TopoJSON",
1394
+ "required": [
1395
+ "name",
1396
+ "type"
1397
+ ],
1398
+ "properties": {
1399
+ "name": {
1400
+ "title": "Name",
1401
+ "description": "A name for this field.",
1402
+ "type": "string"
1403
+ },
1404
+ "title": {
1405
+ "title": "Title",
1406
+ "description": "A human-readable title.",
1407
+ "type": "string",
1408
+ "examples": [
1409
+ "{\n \"title\": \"My Package Title\"\n}\n"
1410
+ ]
1411
+ },
1412
+ "description": {
1413
+ "title": "Description",
1414
+ "description": "A text description. Markdown is encouraged.",
1415
+ "type": "string",
1416
+ "examples": [
1417
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1418
+ ]
1419
+ },
1420
+ "type": {
1421
+ "description": "The type keyword, which `MUST` be a value of `geojson`.",
1422
+ "enum": [
1423
+ "geojson"
1424
+ ]
1425
+ },
1426
+ "format": {
1427
+ "description": "The format keyword options for `geojson` are `default` and `topojson`.",
1428
+ "context": "The following `format` options are supported:\n * **default**: A geojson object as per the [GeoJSON spec](http://geojson.org/).\n * **topojson**: A topojson object as per the [TopoJSON spec](https://github.com/topojson/topojson-specification/blob/master/README.md)",
1429
+ "enum": [
1430
+ "default",
1431
+ "topojson"
1432
+ ],
1433
+ "default": "default"
1434
+ },
1435
+ "constraints": {
1436
+ "title": "Constraints",
1437
+ "description": "The following constraints are supported for `geojson` fields.",
1438
+ "type": "object",
1439
+ "properties": {
1440
+ "required": {
1441
+ "type": "boolean",
1442
+ "description": "Indicates whether a property must have a value for each instance.",
1443
+ "context": "An empty string is considered to be a missing value."
1444
+ },
1445
+ "unique": {
1446
+ "type": "boolean",
1447
+ "description": "When `true`, each value for the property `MUST` be unique."
1448
+ },
1449
+ "enum": {
1450
+ "oneOf": [
1451
+ {
1452
+ "type": "array",
1453
+ "minItems": 1,
1454
+ "uniqueItems": true,
1455
+ "items": {
1456
+ "type": "string"
1457
+ }
1458
+ },
1459
+ {
1460
+ "type": "array",
1461
+ "minItems": 1,
1462
+ "uniqueItems": true,
1463
+ "items": {
1464
+ "type": "object"
1465
+ }
1466
+ }
1467
+ ]
1468
+ },
1469
+ "minLength": {
1470
+ "type": "integer",
1471
+ "description": "An integer that specifies the minimum length of a value."
1472
+ },
1473
+ "maxLength": {
1474
+ "type": "integer",
1475
+ "description": "An integer that specifies the maximum length of a value."
1476
+ }
1477
+ }
1478
+ },
1479
+ "rdfType": {
1480
+ "type": "string",
1481
+ "description": "The RDF type for this field."
1482
+ }
1483
+ },
1484
+ "examples": [
1485
+ "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\"\n}\n",
1486
+ "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\",\n \"format\": \"topojson\"\n}\n"
1487
+ ]
1488
+ },
1489
+ {
1490
+ "type": "object",
1491
+ "title": "Array Field",
1492
+ "description": "The field contains data which can be parsed as a valid JSON array.",
1493
+ "required": [
1494
+ "name",
1495
+ "type"
1496
+ ],
1497
+ "properties": {
1498
+ "name": {
1499
+ "title": "Name",
1500
+ "description": "A name for this field.",
1501
+ "type": "string"
1502
+ },
1503
+ "title": {
1504
+ "title": "Title",
1505
+ "description": "A human-readable title.",
1506
+ "type": "string",
1507
+ "examples": [
1508
+ "{\n \"title\": \"My Package Title\"\n}\n"
1509
+ ]
1510
+ },
1511
+ "description": {
1512
+ "title": "Description",
1513
+ "description": "A text description. Markdown is encouraged.",
1514
+ "type": "string",
1515
+ "examples": [
1516
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1517
+ ]
1518
+ },
1519
+ "type": {
1520
+ "description": "The type keyword, which `MUST` be a value of `array`.",
1521
+ "enum": [
1522
+ "array"
1523
+ ]
1524
+ },
1525
+ "format": {
1526
+ "description": "There are no format keyword options for `array`: only `default` is allowed.",
1527
+ "enum": [
1528
+ "default"
1529
+ ],
1530
+ "default": "default"
1531
+ },
1532
+ "constraints": {
1533
+ "title": "Constraints",
1534
+ "description": "The following constraints apply for `array` fields.",
1535
+ "type": "object",
1536
+ "properties": {
1537
+ "required": {
1538
+ "type": "boolean",
1539
+ "description": "Indicates whether a property must have a value for each instance.",
1540
+ "context": "An empty string is considered to be a missing value."
1541
+ },
1542
+ "unique": {
1543
+ "type": "boolean",
1544
+ "description": "When `true`, each value for the property `MUST` be unique."
1545
+ },
1546
+ "enum": {
1547
+ "oneOf": [
1548
+ {
1549
+ "type": "array",
1550
+ "minItems": 1,
1551
+ "uniqueItems": true,
1552
+ "items": {
1553
+ "type": "string"
1554
+ }
1555
+ },
1556
+ {
1557
+ "type": "array",
1558
+ "minItems": 1,
1559
+ "uniqueItems": true,
1560
+ "items": {
1561
+ "type": "array"
1562
+ }
1563
+ }
1564
+ ]
1565
+ },
1566
+ "minLength": {
1567
+ "type": "integer",
1568
+ "description": "An integer that specifies the minimum length of a value."
1569
+ },
1570
+ "maxLength": {
1571
+ "type": "integer",
1572
+ "description": "An integer that specifies the maximum length of a value."
1573
+ }
1574
+ }
1575
+ },
1576
+ "rdfType": {
1577
+ "type": "string",
1578
+ "description": "The RDF type for this field."
1579
+ }
1580
+ },
1581
+ "examples": [
1582
+ "{\n \"name\": \"options\"\n \"type\": \"array\"\n}\n"
1583
+ ]
1584
+ },
1585
+ {
1586
+ "type": "object",
1587
+ "title": "Duration Field",
1588
+ "description": "The field contains a duration of time.",
1589
+ "context": "The lexical representation for duration is the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) extended format `PnYnMnDTnHnMnS`, where `nY` represents the number of years, `nM` the number of months, `nD` the number of days, 'T' is the date/time separator, `nH` the number of hours, `nM` the number of minutes and `nS` the number of seconds. The number of seconds can include decimal digits to arbitrary precision. Date and time elements including their designator may be omitted if their value is zero, and lower order elements may also be omitted for reduced precision. Here we follow the definition of [XML Schema duration datatype](http://www.w3.org/TR/xmlschema-2/#duration) directly and that definition is implicitly inlined here.",
1590
+ "required": [
1591
+ "name",
1592
+ "type"
1593
+ ],
1594
+ "properties": {
1595
+ "name": {
1596
+ "title": "Name",
1597
+ "description": "A name for this field.",
1598
+ "type": "string"
1599
+ },
1600
+ "title": {
1601
+ "title": "Title",
1602
+ "description": "A human-readable title.",
1603
+ "type": "string",
1604
+ "examples": [
1605
+ "{\n \"title\": \"My Package Title\"\n}\n"
1606
+ ]
1607
+ },
1608
+ "description": {
1609
+ "title": "Description",
1610
+ "description": "A text description. Markdown is encouraged.",
1611
+ "type": "string",
1612
+ "examples": [
1613
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1614
+ ]
1615
+ },
1616
+ "type": {
1617
+ "description": "The type keyword, which `MUST` be a value of `duration`.",
1618
+ "enum": [
1619
+ "duration"
1620
+ ]
1621
+ },
1622
+ "format": {
1623
+ "description": "There are no format keyword options for `duration`: only `default` is allowed.",
1624
+ "enum": [
1625
+ "default"
1626
+ ],
1627
+ "default": "default"
1628
+ },
1629
+ "constraints": {
1630
+ "title": "Constraints",
1631
+ "description": "The following constraints are supported for `duration` fields.",
1632
+ "type": "object",
1633
+ "properties": {
1634
+ "required": {
1635
+ "type": "boolean",
1636
+ "description": "Indicates whether a property must have a value for each instance.",
1637
+ "context": "An empty string is considered to be a missing value."
1638
+ },
1639
+ "unique": {
1640
+ "type": "boolean",
1641
+ "description": "When `true`, each value for the property `MUST` be unique."
1642
+ },
1643
+ "enum": {
1644
+ "type": "array",
1645
+ "minItems": 1,
1646
+ "uniqueItems": true,
1647
+ "items": {
1648
+ "type": "string"
1649
+ }
1650
+ },
1651
+ "minimum": {
1652
+ "type": "string"
1653
+ },
1654
+ "maximum": {
1655
+ "type": "string"
1656
+ }
1657
+ }
1658
+ },
1659
+ "rdfType": {
1660
+ "type": "string",
1661
+ "description": "The RDF type for this field."
1662
+ }
1663
+ },
1664
+ "examples": [
1665
+ "{\n \"name\": \"period\"\n \"type\": \"duration\"\n}\n"
1666
+ ]
1667
+ },
1668
+ {
1669
+ "type": "object",
1670
+ "title": "Any Field",
1671
+ "description": "Any value is accepted, including values that are not captured by the type/format/constraint requirements of the specification.",
1672
+ "required": [
1673
+ "name",
1674
+ "type"
1675
+ ],
1676
+ "properties": {
1677
+ "name": {
1678
+ "title": "Name",
1679
+ "description": "A name for this field.",
1680
+ "type": "string"
1681
+ },
1682
+ "title": {
1683
+ "title": "Title",
1684
+ "description": "A human-readable title.",
1685
+ "type": "string",
1686
+ "examples": [
1687
+ "{\n \"title\": \"My Package Title\"\n}\n"
1688
+ ]
1689
+ },
1690
+ "description": {
1691
+ "title": "Description",
1692
+ "description": "A text description. Markdown is encouraged.",
1693
+ "type": "string",
1694
+ "examples": [
1695
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1696
+ ]
1697
+ },
1698
+ "type": {
1699
+ "description": "The type keyword, which `MUST` be a value of `any`.",
1700
+ "enum": [
1701
+ "any"
1702
+ ]
1703
+ },
1704
+ "constraints": {
1705
+ "title": "Constraints",
1706
+ "description": "The following constraints apply to `any` fields.",
1707
+ "type": "object",
1708
+ "properties": {
1709
+ "required": {
1710
+ "type": "boolean",
1711
+ "description": "Indicates whether a property must have a value for each instance.",
1712
+ "context": "An empty string is considered to be a missing value."
1713
+ },
1714
+ "unique": {
1715
+ "type": "boolean",
1716
+ "description": "When `true`, each value for the property `MUST` be unique."
1717
+ },
1718
+ "enum": {
1719
+ "type": "array",
1720
+ "minItems": 1,
1721
+ "uniqueItems": true
1722
+ }
1723
+ }
1724
+ },
1725
+ "rdfType": {
1726
+ "type": "string",
1727
+ "description": "The RDF type for this field."
1728
+ }
1729
+ },
1730
+ "examples": [
1731
+ "{\n \"name\": \"notes\",\n \"type\": \"any\"\n"
1732
+ ]
1733
+ }
1734
+ ]
1735
+ },
1736
+ "description": "An `array` of Table Schema Field objects.",
1737
+ "examples": [
1738
+ "{\n \"fields\": [\n {\n \"name\": \"my-field-name\"\n }\n ]\n}\n",
1739
+ "{\n \"fields\": [\n {\n \"name\": \"my-field-name\",\n \"type\": \"number\"\n },\n {\n \"name\": \"my-field-name-2\",\n \"type\": \"string\",\n \"format\": \"email\"\n }\n ]\n}\n"
1740
+ ]
1741
+ },
1742
+ "primaryKey": {
1743
+ "oneOf": [
1744
+ {
1745
+ "type": "array",
1746
+ "minItems": 1,
1747
+ "uniqueItems": true,
1748
+ "items": {
1749
+ "type": "string"
1750
+ }
1751
+ },
1752
+ {
1753
+ "type": "string"
1754
+ }
1755
+ ],
1756
+ "description": "A primary key is a field name or an array of field names, whose values `MUST` uniquely identify each row in the table.",
1757
+ "context": "Field name in the `primaryKey` `MUST` be unique, and `MUST` match a field name in the associated table. It is acceptable to have an array with a single value, indicating that the value of a single field is the primary key.",
1758
+ "examples": [
1759
+ "{\n \"primaryKey\": [\n \"name\"\n ]\n}\n",
1760
+ "{\n \"primaryKey\": [\n \"first_name\",\n \"last_name\"\n ]\n}\n"
1761
+ ]
1762
+ },
1763
+ "foreignKeys": {
1764
+ "type": "array",
1765
+ "minItems": 1,
1766
+ "items": {
1767
+ "title": "Table Schema Foreign Key",
1768
+ "description": "Table Schema Foreign Key",
1769
+ "type": "object",
1770
+ "required": [
1771
+ "fields",
1772
+ "reference"
1773
+ ],
1774
+ "oneOf": [
1775
+ {
1776
+ "properties": {
1777
+ "fields": {
1778
+ "type": "array",
1779
+ "items": {
1780
+ "type": "string",
1781
+ "minItems": 1,
1782
+ "uniqueItems": true,
1783
+ "description": "Fields that make up the primary key."
1784
+ }
1785
+ },
1786
+ "reference": {
1787
+ "type": "object",
1788
+ "required": [
1789
+ "resource",
1790
+ "fields"
1791
+ ],
1792
+ "properties": {
1793
+ "resource": {
1794
+ "type": "string",
1795
+ "default": ""
1796
+ },
1797
+ "fields": {
1798
+ "type": "array",
1799
+ "items": {
1800
+ "type": "string"
1801
+ },
1802
+ "minItems": 1,
1803
+ "uniqueItems": true
1804
+ }
1805
+ }
1806
+ }
1807
+ }
1808
+ },
1809
+ {
1810
+ "properties": {
1811
+ "fields": {
1812
+ "type": "string",
1813
+ "description": "Fields that make up the primary key."
1814
+ },
1815
+ "reference": {
1816
+ "type": "object",
1817
+ "required": [
1818
+ "resource",
1819
+ "fields"
1820
+ ],
1821
+ "properties": {
1822
+ "resource": {
1823
+ "type": "string",
1824
+ "default": ""
1825
+ },
1826
+ "fields": {
1827
+ "type": "string"
1828
+ }
1829
+ }
1830
+ }
1831
+ }
1832
+ }
1833
+ ]
1834
+ },
1835
+ "examples": [
1836
+ "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"the-resource\",\n \"fields\": \"state_id\"\n }\n }\n ]\n}\n",
1837
+ "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"\",\n \"fields\": \"id\"\n }\n }\n ]\n}\n"
1838
+ ]
1839
+ },
1840
+ "missingValues": {
1841
+ "type": "array",
1842
+ "minItems": 1,
1843
+ "items": {
1844
+ "type": "string"
1845
+ },
1846
+ "default": [
1847
+ ""
1848
+ ],
1849
+ "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.",
1850
+ "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).",
1851
+ "examples": [
1852
+ "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n"
1853
+ ]
1854
+ }
1855
+ },
1856
+ "examples": [
1857
+ "{\n \"schema\": {\n \"fields\": [\n {\n \"name\": \"first_name\",\n \"type\": \"string\"\n \"constraints\": {\n \"required\": true\n }\n },\n {\n \"name\": \"age\",\n \"type\": \"integer\"\n },\n ],\n \"primaryKey\": [\n \"name\"\n ]\n }\n}\n"
1858
+ ]
1859
+ },
1860
+ "title": {
1861
+ "propertyOrder": 50,
1862
+ "title": "Title",
1863
+ "description": "A human-readable title.",
1864
+ "type": "string",
1865
+ "examples": [
1866
+ "{\n \"title\": \"My Package Title\"\n}\n"
1867
+ ]
1868
+ },
1869
+ "description": {
1870
+ "propertyOrder": 60,
1871
+ "format": "textarea",
1872
+ "title": "Description",
1873
+ "description": "A text description. Markdown is encouraged.",
1874
+ "type": "string",
1875
+ "examples": [
1876
+ "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
1877
+ ]
1878
+ },
1879
+ "homepage": {
1880
+ "propertyOrder": 70,
1881
+ "title": "Home Page",
1882
+ "description": "The home on the web that is related to this data package.",
1883
+ "type": "string",
1884
+ "format": "uri",
1885
+ "examples": [
1886
+ "{\n \"homepage\": \"http://example.com/\"\n}\n"
1887
+ ]
1888
+ },
1889
+ "sources": {
1890
+ "propertyOrder": 140,
1891
+ "options": {
1892
+ "hidden": true
1893
+ },
1894
+ "title": "Sources",
1895
+ "description": "The raw sources for this resource.",
1896
+ "type": "array",
1897
+ "minItems": 1,
1898
+ "items": {
1899
+ "title": "Source",
1900
+ "description": "A source file.",
1901
+ "type": "object",
1902
+ "required": [
1903
+ "title"
1904
+ ],
1905
+ "properties": {
1906
+ "title": {
1907
+ "title": "Title",
1908
+ "description": "A human-readable title.",
1909
+ "type": "string",
1910
+ "examples": [
1911
+ "{\n \"title\": \"My Package Title\"\n}\n"
1912
+ ]
1913
+ },
1914
+ "path": {
1915
+ "title": "Path",
1916
+ "description": "A fully qualified URL, or a POSIX file path..",
1917
+ "type": "string",
1918
+ "examples": [
1919
+ "{\n \"path\": \"file.csv\"\n}\n",
1920
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
1921
+ ],
1922
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
1923
+ },
1924
+ "email": {
1925
+ "title": "Email",
1926
+ "description": "An email address.",
1927
+ "type": "string",
1928
+ "format": "email",
1929
+ "examples": [
1930
+ "{\n \"email\": \"example@example.com\"\n}\n"
1931
+ ]
1932
+ }
1933
+ }
1934
+ },
1935
+ "examples": [
1936
+ "{\n \"sources\": [\n {\n \"name\": \"World Bank and OECD\",\n \"uri\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
1937
+ ]
1938
+ },
1939
+ "licenses": {
1940
+ "description": "The license(s) under which the resource is published.",
1941
+ "propertyOrder": 150,
1942
+ "options": {
1943
+ "hidden": true
1944
+ },
1945
+ "title": "Licenses",
1946
+ "type": "array",
1947
+ "minItems": 1,
1948
+ "items": {
1949
+ "title": "License",
1950
+ "description": "A license for this descriptor.",
1951
+ "type": "object",
1952
+ "properties": {
1953
+ "name": {
1954
+ "title": "Open Definition license identifier",
1955
+ "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/",
1956
+ "type": "string",
1957
+ "pattern": "^([-a-zA-Z0-9._])+$"
1958
+ },
1959
+ "path": {
1960
+ "title": "Path",
1961
+ "description": "A fully qualified URL, or a POSIX file path..",
1962
+ "type": "string",
1963
+ "examples": [
1964
+ "{\n \"path\": \"file.csv\"\n}\n",
1965
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
1966
+ ],
1967
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
1968
+ },
1969
+ "title": {
1970
+ "title": "Title",
1971
+ "description": "A human-readable title.",
1972
+ "type": "string",
1973
+ "examples": [
1974
+ "{\n \"title\": \"My Package Title\"\n}\n"
1975
+ ]
1976
+ }
1977
+ },
1978
+ "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."
1979
+ },
1980
+ "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.",
1981
+ "examples": [
1982
+ "{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"uri\": \"http://opendatacommons.org/licenses/pddl/\"\n }\n ]\n}\n"
1983
+ ]
1984
+ },
1985
+ "dialect": {
1986
+ "propertyOrder": 50,
1987
+ "title": "CSV Dialect",
1988
+ "description": "The CSV dialect descriptor.",
1989
+ "type": "object",
1990
+ "required": [
1991
+ "delimiter",
1992
+ "doubleQuote"
1993
+ ],
1994
+ "properties": {
1995
+ "delimiter": {
1996
+ "title": "Delimiter",
1997
+ "description": "A character sequence to use as the field separator.",
1998
+ "type": "string",
1999
+ "default": ",",
2000
+ "examples": [
2001
+ "{\n \"delimiter\": \",\"\n}\n",
2002
+ "{\n \"delimiter\": \";\"\n}\n"
2003
+ ]
2004
+ },
2005
+ "doubleQuote": {
2006
+ "title": "Double Quote",
2007
+ "description": "Specifies the handling of quotes inside fields.",
2008
+ "context": "If Double Quote is set to true, two consecutive quotes must be interpreted as one.",
2009
+ "type": "boolean",
2010
+ "default": true,
2011
+ "examples": [
2012
+ "{\n \"doubleQuote\": true\n}\n"
2013
+ ]
2014
+ },
2015
+ "lineTerminator": {
2016
+ "title": "Line Terminator",
2017
+ "description": "Specifies the character sequence that must be used to terminate rows.",
2018
+ "type": "string",
2019
+ "default": "\r\n",
2020
+ "examples": [
2021
+ "{\n \"lineTerminator\": \"\\r\\n\"\n}\n",
2022
+ "{\n \"lineTerminator\": \"\\n\"\n}\n"
2023
+ ]
2024
+ },
2025
+ "nullSequence": {
2026
+ "title": "Null Sequence",
2027
+ "description": "Specifies the null sequence, for example, `\\N`.",
2028
+ "type": "string",
2029
+ "examples": [
2030
+ "{\n \"nullSequence\": \"\\N\"\n}\n"
2031
+ ]
2032
+ },
2033
+ "quoteChar": {
2034
+ "title": "Quote Character",
2035
+ "description": "Specifies a one-character string to use as the quoting character.",
2036
+ "type": "string",
2037
+ "default": "\"",
2038
+ "examples": [
2039
+ "{\n \"quoteChar\": \"\"\n}\n",
2040
+ "{\n \"quoteChar\": \"''\"\n}\n"
2041
+ ]
2042
+ },
2043
+ "escapeChar": {
2044
+ "title": "Escape Character",
2045
+ "description": "Specifies a one-character string to use as the escape character.",
2046
+ "type": "string",
2047
+ "default": "\\",
2048
+ "examples": [
2049
+ "{\n \"escapeChar\": \"\\\\\"\n}\n"
2050
+ ]
2051
+ },
2052
+ "skipInitialSpace": {
2053
+ "title": "Skip Initial Space",
2054
+ "description": "Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.",
2055
+ "type": "boolean",
2056
+ "default": true,
2057
+ "examples": [
2058
+ "{\n \"skipInitialSpace\": true\n}\n"
2059
+ ]
2060
+ },
2061
+ "header": {
2062
+ "title": "Header",
2063
+ "description": "Specifies if the file includes a header row, always as the first row in the file.",
2064
+ "type": "boolean",
2065
+ "default": true,
2066
+ "examples": [
2067
+ "{\n \"header\": true\n}\n"
2068
+ ]
2069
+ },
2070
+ "caseSensitiveHeader": {
2071
+ "title": "Case Sensitive Header",
2072
+ "description": "Specifies if the case of headers is meaningful.",
2073
+ "context": "Use of case in source CSV files is not always an intentional decision. For example, should \"CAT\" and \"Cat\" be considered to have the same meaning.",
2074
+ "type": "boolean",
2075
+ "default": false,
2076
+ "examples": [
2077
+ "{\n \"caseSensitiveHeader\": true\n}\n"
2078
+ ]
2079
+ }
2080
+ },
2081
+ "examples": [
2082
+ "{\n \"dialect\": {\n \"delimiter\": \";\"\n }\n}\n",
2083
+ "{\n \"dialect\": {\n \"delimiter\": \"\\t\",\n \"quoteChar\": \"''\"\n }\n}\n"
2084
+ ]
2085
+ },
2086
+ "format": {
2087
+ "propertyOrder": 80,
2088
+ "title": "Format",
2089
+ "description": "The file format of this resource.",
2090
+ "context": "`csv`, `xls`, `json` are examples of common formats.",
2091
+ "type": "string",
2092
+ "examples": [
2093
+ "{\n \"format\": \"xls\"\n}\n"
2094
+ ]
2095
+ },
2096
+ "mediatype": {
2097
+ "propertyOrder": 90,
2098
+ "title": "Media Type",
2099
+ "description": "The media type of this resource. Can be any valid media type listed with [IANA](https://www.iana.org/assignments/media-types/media-types.xhtml).",
2100
+ "type": "string",
2101
+ "pattern": "^(.+)/(.+)$",
2102
+ "examples": [
2103
+ "{\n \"mediatype\": \"text/csv\"\n}\n"
2104
+ ]
2105
+ },
2106
+ "encoding": {
2107
+ "propertyOrder": 100,
2108
+ "title": "Encoding",
2109
+ "description": "The file encoding of this resource.",
2110
+ "type": "string",
2111
+ "default": "utf-8",
2112
+ "examples": [
2113
+ "{\n \"encoding\": \"utf-8\"\n}\n"
2114
+ ]
2115
+ },
2116
+ "bytes": {
2117
+ "propertyOrder": 110,
2118
+ "options": {
2119
+ "hidden": true
2120
+ },
2121
+ "title": "Bytes",
2122
+ "description": "The size of this resource in bytes.",
2123
+ "type": "integer",
2124
+ "examples": [
2125
+ "{\n \"bytes\": 2082\n}\n"
2126
+ ]
2127
+ },
2128
+ "hash": {
2129
+ "propertyOrder": 120,
2130
+ "options": {
2131
+ "hidden": true
2132
+ },
2133
+ "title": "Hash",
2134
+ "type": "string",
2135
+ "description": "The MD5 hash of this resource. Indicate other hashing algorithms with the {algorithm}:{hash} format.",
2136
+ "pattern": "^([^:]+:[a-fA-F0-9]+|[a-fA-F0-9]{32}|)$",
2137
+ "examples": [
2138
+ "{\n \"hash\": \"d25c9c77f588f5dc32059d2da1136c02\"\n}\n",
2139
+ "{\n \"hash\": \"SHA256:5262f12512590031bbcc9a430452bfd75c2791ad6771320bb4b5728bfb78c4d0\"\n}\n"
2140
+ ]
2141
+ }
2142
+ }
2143
+ },
2144
+ "examples": [
2145
+ "{\n \"resources\": [\n {\n \"name\": \"my-data\",\n \"data\": [\n \"data.csv\"\n ],\n \"schema\": \"tableschema.json\",\n \"mediatype\": \"text/csv\"\n }\n ]\n}\n"
2146
+ ]
2147
+ },
2148
+ "sources": {
2149
+ "propertyOrder": 200,
2150
+ "options": {
2151
+ "hidden": true
2152
+ },
2153
+ "title": "Sources",
2154
+ "description": "The raw sources for this resource.",
2155
+ "type": "array",
2156
+ "minItems": 1,
2157
+ "items": {
2158
+ "title": "Source",
2159
+ "description": "A source file.",
2160
+ "type": "object",
2161
+ "required": [
2162
+ "title"
2163
+ ],
2164
+ "properties": {
2165
+ "title": {
2166
+ "title": "Title",
2167
+ "description": "A human-readable title.",
2168
+ "type": "string",
2169
+ "examples": [
2170
+ "{\n \"title\": \"My Package Title\"\n}\n"
2171
+ ]
2172
+ },
2173
+ "path": {
2174
+ "title": "Path",
2175
+ "description": "A fully qualified URL, or a POSIX file path..",
2176
+ "type": "string",
2177
+ "examples": [
2178
+ "{\n \"path\": \"file.csv\"\n}\n",
2179
+ "{\n \"path\": \"http://example.com/file.csv\"\n}\n"
2180
+ ],
2181
+ "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
2182
+ },
2183
+ "email": {
2184
+ "title": "Email",
2185
+ "description": "An email address.",
2186
+ "type": "string",
2187
+ "format": "email",
2188
+ "examples": [
2189
+ "{\n \"email\": \"example@example.com\"\n}\n"
2190
+ ]
2191
+ }
2192
+ }
2193
+ },
2194
+ "examples": [
2195
+ "{\n \"sources\": [\n {\n \"name\": \"World Bank and OECD\",\n \"uri\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
2196
+ ]
2197
+ }
2198
+ }
2199
+ }