diff --git a/schema/1_0_final/single_entry.json b/schema/1_0_final/single_entry.json index 90840d3d..ee385987 100644 --- a/schema/1_0_final/single_entry.json +++ b/schema/1_0_final/single_entry.json @@ -14,24 +14,46 @@ "accessLevelComment": { "title":"Access Level Comment", "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.", - "type": "string", - "maxLength":255 + "anyOf": [ + { + "type": "string", + "minLength": 1, + "maxLength":255 + }, + { + "type": "null" + } + ] }, "accrualPeriodicity": { "title":"Frequency", "description":"Frequency with which dataset is published.", - "enum": ["Annual", "Bimonthly", "Semiweekly", "Daily", "Biweekly", "Semiannual", "Biennial", "Triennial", - "Three times a week", "Three times a month", "Continuously updated", "Monthly", "Quarterly", "Semimonthly", - "Three times a year", "Weekly", "Completely irregular"] + "anyOf": [ + { + "enum": ["Annual", "Bimonthly", "Semiweekly", "Daily", "Biweekly", "Semiannual", "Biennial", "Triennial", + "Three times a week", "Three times a month", "Continuously updated", "Monthly", "Quarterly", "Semimonthly", + "Three times a year", "Weekly", "Completely irregular"] + }, + { + "type": "null" + } + ] }, "bureauCode": { "title":"Bureau Code", "description":"Federal agencies, combined agency and bureau code from OMB Circular A-11, Appendix C in the format of 015:010.", - "type": "array", - "items": { - "type": "string", - "pattern": "[0-9]{3}:[0-9]{2}" - }, + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "pattern": "[0-9]{3}:[0-9]{2}" + } + }, + { + "type": "null" + } + ], "minItems": 1, "uniqueItems": true }, @@ -43,13 +65,27 @@ "dataDictionary": { "title":"Data Dictionary", "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.", - "type": "string", - "format": "uri" + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] }, "dataQuality": { "title":"Data Quality", "description":"Whether the dataset meets the agency’s Information Quality Guidelines (true/false).", - "type": "boolean" + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "description": { "title" : "Description", @@ -59,26 +95,33 @@ "distribution": { "title":"Distribution", "description":"Holds multiple download URLs for datasets composed of multiple files and/or file types", - "type": "array", - "items": { - "type": "object", - "properties": { - "accessURL": { - "title":"Download URL", - "description":"URL providing direct access to the downloadable distribution of a dataset.", - "type": "string", - "format": "uri" + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "accessURL": { + "title":"Download URL", + "description":"URL providing direct access to the downloadable distribution of a dataset.", + "type": "string", + "format": "uri" + }, + "format": { + "title":"Format", + "description":"The file format or API type of the distribution.", + "pattern": "^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$", + "type": "string" + } + } }, - "format": { - "title":"Format", - "description":"The file format or API type of the distribution.", - "pattern": "^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$", - "type": "string" - } + "minItems": 1, + "uniqueItems": true + }, + { + "type": "null" } - }, - "minItems": 1, - "uniqueItems": true + ] }, "identifier": { "title":"Unique Identifier", @@ -89,38 +132,74 @@ "issued": { "title":"Release Date", "description":"Date of formal issuance.", - "type": "string", - "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)?)?)?)?$" + "anyOf": [ + { + "type": "string", + "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)?)?)?)?$" + }, + { + "type": "null" + } + ] }, "keyword": { "title": "Tags", "description": "Tags (or keywords) help users discover your dataset; please include terms that would be used by technical and non-technical users.", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "landingPage": { "title":"Homepage URL", "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.", - "type": "string", - "format": "uri" + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] }, "language": { "title":"Language", "description":"The language of the dataset.", - "type": "array", - "items": { - "type": "string", - "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)))$" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "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)))$" + } + }, + { + "type": "null" + } + ] }, "license": { "title":"License", "description":"The license dataset or API is published with. See Open Licenses for more information.", - "type": "string" + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] }, "mbox": { "title":"Contact Email", @@ -132,23 +211,38 @@ "title": "Last Update", "description": "Most recent date on which the dataset was changed, updated or modified.", "type": "string", - "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)?)?)?)?$" + "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)?)?)?)?$" }, "PrimaryITInvestmentUII": { "title":"Primary IT Investment UII", "description":"For linking a dataset with an IT Unique Investment Identifier (UII)", - "type": "string" + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] }, "programCode": { "title":"Program Code", "description":"Federal agencies, list the primary program related to this data asset, from the Federal Program Inventory. Use the format of 015:001", - "type": "array", - "items": { - "type": "string", - "pattern": "[0-9]{3}:[0-9]{3}" - }, - "minItems": 1, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "pattern": "[0-9]{3}:[0-9]{3}" + }, + "minItems": 1, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "publisher": { "title":"Publisher", @@ -158,39 +252,76 @@ "references": { "title":"Related Documents", "description":"Related documents such as technical information about a dataset, developer documentation, etc.", - "type": "array", - "items": { - "type": "string", - "format": "uri" - }, - "minItems": 1, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + }, + "minItems": 1, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "spatial": { "title":"Spatial", "description":"The range of spatial applicability of a dataset. Could include a spatial region like a bounding box or a named place.", - "type": "string" + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] }, "systemOfRecords": { "title":"System of Records", "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.", - "type": "string" + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "null" + } + ] }, "temporal": { "title":"Temporal", "description":"The range of temporal applicability of a dataset (i.e., a start and end date of applicability for the data).", - "type": "string", - "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)?)?)?)?$" + "anyOf": [ + { + "type": "string", + "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)?)?)?)?$" + }, + { + "type": "null" + } + ] }, "theme": { "title":"Category", "description":"Main thematic category of the dataset.", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "title": { "title": "Title", @@ -200,8 +331,15 @@ "webService": { "title":"Endpoint", "description":"Endpoint of web service to access dataset.", - "type": "string", - "format": "uri" + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] } } -} +}