-
Notifications
You must be signed in to change notification settings - Fork 171
/
data-dictionary.json
129 lines (129 loc) · 6.27 KB
/
data-dictionary.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Data Dictionary",
"type": "object",
"required": [
"identifier",
"data"
],
"properties": {
"identifier": {
"title": "Identifier",
"type": "string"
},
"data": {
"title": "Project Open Data Data-Dictionary",
"description": "A data dictionary for this resource, compliant with the [Table Schema](https://specs.frictionlessdata.io/table-schema/) specification.",
"type": "object",
"required": [
"title"
],
"properties": {
"title": {
"title": "Title",
"type": "string"
},
"fields": {
"title": "Dictionary Fields",
"type": "array",
"items": {
"title": "Field",
"type": "object",
"required": [
"name",
"type"
],
"properties": {
"name": {
"title": "Name",
"description": "A name for this field.",
"type": "string"
},
"title": {
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
},
"type": {
"title": "Type",
"description": "The type keyword, which `MUST` be a value of `string`.",
"type": "string",
"enum": [
"string",
"number",
"integer",
"date",
"time",
"datetime",
"year",
"yearmonth",
"boolean",
"object",
"geopoint",
"geojson",
"array",
"duration"
]
},
"format": {
"title": "Format",
"description": "Supported formats depend on the specified field type:\n* For `string` the supported formats are `default`, `email`, `uri`, `binary`, and `uuid`:\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.\n* For `number` only `default` is allowed.\n* For `integer` only `default` is allowed.\n* For `date` the supported formats are `default`, `any`, and `{PATTERN}`:\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/).\n* For `time` the supported formats are `default`, `any`, and `{PATTERN}`:\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/).\n* For `datetime` the supported formats are `default`, `any`, and `{PATTERN}`:\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/).\n* For `year` only `default` is allowed.\n* For `yearmonth` only `default` is allowed.\n* For `boolean` only `default` is allowed.\n* For `object` only `default` is allowed.\n* For `geopoint` the supported formats are `default`, `array`, and `object`:\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`\n* For `geojson` the supported formats are `default` and `topojson`:\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).\n* For `array` only `default` is allowed.\n* For `duration` only `default` is allowed.",
"type": "string",
"default": "default"
}
}
}
},
"indexes": {
"title": "Dictionary Indexes",
"type": "array",
"items": {
"title": "Index",
"type": "object",
"required": [
"fields",
"type"
],
"properties": {
"fields": {
"title": "Fields",
"type": "array",
"items": {
"title": "Field",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"length": {
"title": "Length",
"type": "integer"
}
}
},
"description": "One or more fields included in index. Must be keys from the fields object."
},
"type": {
"title": "Type",
"description": "Index type.",
"type": "string",
"enum": ["index", "fulltext"],
"default": "index"
},
"description": {
"title": "Description",
"type": "string",
"description": "Description of index purpose or functionality."
}
}
},
"minItems": 0
}
}
}
}
}