Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Commit 51fb7eb

Browse files
author
Haley Van Dyck
committed
Merge pull request #269 from project-open-data/updating-the-json-schema-2
Update single_entry.json
2 parents 1274670 + bc9a42f commit 51fb7eb

File tree

1 file changed

+214
-76
lines changed

1 file changed

+214
-76
lines changed

Diff for: schema/1_0_final/single_entry.json

+214-76
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,46 @@
1414
"accessLevelComment": {
1515
"title":"Access Level Comment",
1616
"description":"An explanation for the selected \"accessLevel\" including instructions for how to access a restricted file, if applicable, or explanation for why a \"non-public\" or \"restricted public\" data assetis not \"public,\" if applicable. Text, 255 characters.",
17-
"type": "string",
18-
"maxLength":255
17+
"anyOf": [
18+
{
19+
"type": "string",
20+
"minLength": 1,
21+
"maxLength":255
22+
},
23+
{
24+
"type": "null"
25+
}
26+
]
1927
},
2028
"accrualPeriodicity": {
2129
"title":"Frequency",
2230
"description":"Frequency with which dataset is published.",
23-
"enum": ["Annual", "Bimonthly", "Semiweekly", "Daily", "Biweekly", "Semiannual", "Biennial", "Triennial",
24-
"Three times a week", "Three times a month", "Continuously updated", "Monthly", "Quarterly", "Semimonthly",
25-
"Three times a year", "Weekly", "Completely irregular"]
31+
"anyOf": [
32+
{
33+
"enum": ["Annual", "Bimonthly", "Semiweekly", "Daily", "Biweekly", "Semiannual", "Biennial", "Triennial",
34+
"Three times a week", "Three times a month", "Continuously updated", "Monthly", "Quarterly", "Semimonthly",
35+
"Three times a year", "Weekly", "Completely irregular"]
36+
},
37+
{
38+
"type": "null"
39+
}
40+
]
2641
},
2742
"bureauCode": {
2843
"title":"Bureau Code",
2944
"description":"Federal agencies, combined agency and bureau code from <a href=\"http://www.whitehouse.gov/sites/default/files/omb/assets/a11_current_year/app_c.pdf\">OMB Circular A-11, Appendix C</a> in the format of <code>015:010</code>.",
30-
"type": "array",
31-
"items": {
32-
"type": "string",
33-
"pattern": "[0-9]{3}:[0-9]{2}"
34-
},
45+
"anyOf": [
46+
{
47+
"type": "array",
48+
"items": {
49+
"type": "string",
50+
"pattern": "[0-9]{3}:[0-9]{2}"
51+
}
52+
},
53+
{
54+
"type": "null"
55+
}
56+
],
3557
"minItems": 1,
3658
"uniqueItems": true
3759
},
@@ -43,13 +65,27 @@
4365
"dataDictionary": {
4466
"title":"Data Dictionary",
4567
"description":"URL to the data dictionary for the dataset or API. Note that documentation other than a data dictionary can be referenced using Related Documents as shown in the expanded fields.",
46-
"type": "string",
47-
"format": "uri"
68+
"anyOf": [
69+
{
70+
"type": "string",
71+
"format": "uri"
72+
},
73+
{
74+
"type": "null"
75+
}
76+
]
4877
},
4978
"dataQuality": {
5079
"title":"Data Quality",
5180
"description":"Whether the dataset meets the agency’s Information Quality Guidelines (true/false).",
52-
"type": "boolean"
81+
"anyOf": [
82+
{
83+
"type": "boolean"
84+
},
85+
{
86+
"type": "null"
87+
}
88+
]
5389
},
5490
"description": {
5591
"title" : "Description",
@@ -59,26 +95,33 @@
5995
"distribution": {
6096
"title":"Distribution",
6197
"description":"Holds multiple download URLs for datasets composed of multiple files and/or file types",
62-
"type": "array",
63-
"items": {
64-
"type": "object",
65-
"properties": {
66-
"accessURL": {
67-
"title":"Download URL",
68-
"description":"URL providing direct access to the downloadable distribution of a dataset.",
69-
"type": "string",
70-
"format": "uri"
98+
"anyOf": [
99+
{
100+
"type": "array",
101+
"items": {
102+
"type": "object",
103+
"properties": {
104+
"accessURL": {
105+
"title":"Download URL",
106+
"description":"URL providing direct access to the downloadable distribution of a dataset.",
107+
"type": "string",
108+
"format": "uri"
109+
},
110+
"format": {
111+
"title":"Format",
112+
"description":"The file format or API type of the distribution.",
113+
"pattern": "^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$",
114+
"type": "string"
115+
}
116+
}
71117
},
72-
"format": {
73-
"title":"Format",
74-
"description":"The file format or API type of the distribution.",
75-
"pattern": "^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$",
76-
"type": "string"
77-
}
118+
"minItems": 1,
119+
"uniqueItems": true
120+
},
121+
{
122+
"type": "null"
78123
}
79-
},
80-
"minItems": 1,
81-
"uniqueItems": true
124+
]
82125
},
83126
"identifier": {
84127
"title":"Unique Identifier",
@@ -89,38 +132,74 @@
89132
"issued": {
90133
"title":"Release Date",
91134
"description":"Date of formal issuance.",
92-
"type": "string",
93-
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
135+
"anyOf": [
136+
{
137+
"type": "string",
138+
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
139+
},
140+
{
141+
"type": "null"
142+
}
143+
]
94144
},
95145
"keyword": {
96146
"title": "Tags",
97147
"description": "Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.",
98-
"type": "array",
99-
"items": {
100-
"type": "string"
101-
},
102-
"minItems": 1,
103-
"uniqueItems": true
148+
"anyOf": [
149+
{
150+
"type": "array",
151+
"items": {
152+
"type": "string"
153+
},
154+
"minItems": 1,
155+
"uniqueItems": true
156+
},
157+
{
158+
"type": "null"
159+
}
160+
]
104161
},
105162
"landingPage": {
106163
"title":"Homepage URL",
107164
"description":"Alternative landing page used to redirect user to a contextual, Agency-hosted “homepage” for the Dataset or API when selecting this resource from the Data.gov user interface.",
108-
"type": "string",
109-
"format": "uri"
165+
"anyOf": [
166+
{
167+
"type": "string",
168+
"format": "uri"
169+
},
170+
{
171+
"type": "null"
172+
}
173+
]
110174
},
111175
"language": {
112176
"title":"Language",
113177
"description":"The language of the dataset.",
114-
"type": "array",
115-
"items": {
116-
"type": "string",
117-
"pattern": "^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(x(-[A-Za-z0-9]{1,8})+))?)|(x(-[A-Za-z0-9]{1,8})+)|((en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)))$"
118-
}
178+
"anyOf": [
179+
{
180+
"type": "array",
181+
"items": {
182+
"type": "string",
183+
"pattern": "^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(x(-[A-Za-z0-9]{1,8})+))?)|(x(-[A-Za-z0-9]{1,8})+)|((en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)))$"
184+
}
185+
},
186+
{
187+
"type": "null"
188+
}
189+
]
119190
},
120191
"license": {
121192
"title":"License",
122193
"description":"The license dataset or API is published with. See <a href=\"http://project-open-data.github.io/open-licenses/\">Open Licenses</a> for more information.",
123-
"type": "string"
194+
"anyOf": [
195+
{
196+
"type": "string",
197+
"minLength": 1
198+
},
199+
{
200+
"type": "null"
201+
}
202+
]
124203
},
125204
"mbox": {
126205
"title":"Contact Email",
@@ -132,23 +211,38 @@
132211
"title": "Last Update",
133212
"description": "Most recent date on which the dataset was changed, updated or modified.",
134213
"type": "string",
135-
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
214+
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
136215
},
137216
"PrimaryITInvestmentUII": {
138217
"title":"Primary IT Investment UII",
139218
"description":"For linking a dataset with an IT Unique Investment Identifier (UII)",
140-
"type": "string"
219+
"anyOf": [
220+
{
221+
"type": "string",
222+
"minLength": 1
223+
},
224+
{
225+
"type": "null"
226+
}
227+
]
141228
},
142229
"programCode": {
143230
"title":"Program Code",
144231
"description":"Federal agencies, list the primary program related to this data asset, from the <a href=\"http://goals.performance.gov/sites/default/files/images/FederalProgramInventory_FY13_MachineReadable_091613.xls\">Federal Program Inventory</a>. Use the format of <code>015:001</code>",
145-
"type": "array",
146-
"items": {
147-
"type": "string",
148-
"pattern": "[0-9]{3}:[0-9]{3}"
149-
},
150-
"minItems": 1,
151-
"uniqueItems": true
232+
"anyOf": [
233+
{
234+
"type": "array",
235+
"items": {
236+
"type": "string",
237+
"pattern": "[0-9]{3}:[0-9]{3}"
238+
},
239+
"minItems": 1,
240+
"uniqueItems": true
241+
},
242+
{
243+
"type": "null"
244+
}
245+
]
152246
},
153247
"publisher": {
154248
"title":"Publisher",
@@ -158,39 +252,76 @@
158252
"references": {
159253
"title":"Related Documents",
160254
"description":"Related documents such as technical information about a dataset, developer documentation, etc.",
161-
"type": "array",
162-
"items": {
163-
"type": "string",
164-
"format": "uri"
165-
},
166-
"minItems": 1,
167-
"uniqueItems": true
255+
"anyOf": [
256+
{
257+
"type": "array",
258+
"items": {
259+
"type": "string",
260+
"format": "uri"
261+
},
262+
"minItems": 1,
263+
"uniqueItems": true
264+
},
265+
{
266+
"type": "null"
267+
}
268+
]
168269
},
169270
"spatial": {
170271
"title":"Spatial",
171272
"description":"The range of spatial applicability of a dataset. Could include a spatial region like a bounding box or a named place.",
172-
"type": "string"
273+
"anyOf": [
274+
{
275+
"type": "string",
276+
"minLength": 1
277+
},
278+
{
279+
"type": "null"
280+
}
281+
]
173282
},
174283
"systemOfRecords": {
175284
"title":"System of Records",
176285
"description":"If the systems is designated as a system of records under the Privacy Act of 1974, provide the URL to the System of Records Notice related to this dataset.",
177-
"type": "string"
286+
"anyOf": [
287+
{
288+
"type": "string",
289+
"minLength": 1
290+
},
291+
{
292+
"type": "null"
293+
}
294+
]
178295
},
179296
"temporal": {
180297
"title":"Temporal",
181298
"description":"The range of temporal applicability of a dataset (i.e., a start and end date of applicability for the data).",
182-
"type": "string",
183-
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
299+
"anyOf": [
300+
{
301+
"type": "string",
302+
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
303+
},
304+
{
305+
"type": "null"
306+
}
307+
]
184308
},
185309
"theme": {
186310
"title":"Category",
187311
"description":"Main thematic category of the dataset.",
188-
"type": "array",
189-
"items": {
190-
"type": "string"
191-
},
192-
"minItems": 1,
193-
"uniqueItems": true
312+
"anyOf": [
313+
{
314+
"type": "array",
315+
"items": {
316+
"type": "string"
317+
},
318+
"minItems": 1,
319+
"uniqueItems": true
320+
},
321+
{
322+
"type": "null"
323+
}
324+
]
194325
},
195326
"title": {
196327
"title": "Title",
@@ -200,8 +331,15 @@
200331
"webService": {
201332
"title":"Endpoint",
202333
"description":"Endpoint of web service to access dataset.",
203-
"type": "string",
204-
"format": "uri"
334+
"anyOf": [
335+
{
336+
"type": "string",
337+
"format": "uri"
338+
},
339+
{
340+
"type": "null"
341+
}
342+
]
205343
}
206344
}
207-
}
345+
}

0 commit comments

Comments
 (0)