forked from jdorn/json-editor
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to add custom schemas as options
- Loading branch information
Showing
26 changed files
with
2,992 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,372 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://project-open-data.cio.gov/v1.1/schema/dataset.json#", | ||
"title": "Project Open Data Dataset", | ||
"description": "The metadata format for all federal open data. Validates a single JSON object entry (as opposed to entire Data.json catalog).", | ||
"type": "object", | ||
"required": [ | ||
"bureauCode", | ||
"programCode", | ||
"title", | ||
"description", | ||
"keyword", | ||
"modified", | ||
"publisher", | ||
"contactPoint", | ||
"identifier", | ||
"accessLevel" | ||
], | ||
"properties": { | ||
"@type": { | ||
"title": "Metadata Context", | ||
"description": "IRI for the JSON-LD data type. This should be dcat:Dataset for each Dataset", | ||
"enum": [ | ||
"dcat:Dataset" | ||
] | ||
}, | ||
"accessLevel": { | ||
"description": "The degree to which this dataset could be made publicly-available, regardless of whether it has been made available. Choices: public (Data asset is or could be made publicly available to all without restrictions), restricted public (Data asset is available under certain use restrictions), or non-public (Data asset is not available to members of the public)", | ||
"title": "Public Access Level", | ||
"enum": [ | ||
"public", | ||
"restricted public", | ||
"non-public" | ||
] | ||
}, | ||
"rights": { | ||
"title": "Rights", | ||
"description": "This may include information regarding access or restrictions based on privacy, security, or other policies. This should also provide 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.", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"minLength": 1, | ||
"maxLength": 255 | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"accrualPeriodicity": { | ||
"title": "Frequency", | ||
"description": "Frequency with which dataset is published.", | ||
"anyOf": [ | ||
{ | ||
"enum": [ | ||
"irregular" | ||
] | ||
}, | ||
{ | ||
"type": "string", | ||
"pattern": "^R\\/P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"bureauCode": { | ||
"title": "Bureau Code", | ||
"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>.", | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"pattern": "[0-9]{3}:[0-9]{2}" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"contactPoint": { | ||
"$ref": "vcard.json" | ||
}, | ||
"describedBy": { | ||
"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.", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"describedByType": { | ||
"title": "Data Dictionary Type", | ||
"description": "The machine-readable file format (IANA Media Type or MIME Type) of the distribution’s describedBy URL", | ||
"anyOf": [ | ||
{ | ||
"pattern": "^[-\\w]+/[-\\w]+(\\.[-\\w]+)*([+][-\\w]+)?$", | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"conformsTo": { | ||
"title": "Data Standard", | ||
"description": "URI used to identify a standardized specification the dataset conforms to", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"dataQuality": { | ||
"title": "Data Quality", | ||
"description": "Whether the dataset meets the agency’s Information Quality Guidelines (true/false).", | ||
"anyOf": [ | ||
{ | ||
"type": "boolean" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"description": { | ||
"title": "Description", | ||
"description": "Human-readable description (e.g., an abstract) with sufficient detail to enable a user to quickly understand whether the asset is of interest.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"distribution": { | ||
"title": "Distribution", | ||
"description": "A container for the array of Distribution objects", | ||
"anyOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"$ref": "distribution.json", | ||
"minItems": 1, | ||
"uniqueItems": true | ||
} | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"identifier": { | ||
"title": "Unique Identifier", | ||
"description": "A unique identifier for the dataset or API as maintained within an Agency catalog or database.", | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"issued": { | ||
"title": "Release Date", | ||
"description": "Date of formal issuance.", | ||
"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", | ||
"minLength": 1 | ||
}, | ||
"minItems": 1 | ||
}, | ||
"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.", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"language": { | ||
"title": "Language", | ||
"description": "The language of the dataset.", | ||
"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 <a href=\"https://project-open-data.cio.gov/open-licenses/\">Open Licenses</a> for more information.", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"modified": { | ||
"title": "Last Update", | ||
"description": "Most recent date on which the dataset was changed, updated or modified.", | ||
"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": "string", | ||
"pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" | ||
}, | ||
{ | ||
"type": "string", | ||
"pattern": "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([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+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" | ||
} | ||
] | ||
}, | ||
"primaryITInvestmentUII": { | ||
"title": "Primary IT Investment UII", | ||
"description": "For linking a dataset with an IT Unique Investment Identifier (UII)", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"pattern": "[0-9]{3}-[0-9]{9}" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"programCode": { | ||
"title": "Program Code", | ||
"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>", | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"pattern": "[0-9]{3}:[0-9]{3}" | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
"publisher": { | ||
"$ref": "organization.json" | ||
}, | ||
"references": { | ||
"title": "Related Documents", | ||
"description": "Related documents such as technical information about a dataset, developer documentation, etc.", | ||
"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.", | ||
"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.", | ||
"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).", | ||
"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": "string", | ||
"pattern": "^(R\\d*\\/)?([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([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+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?(\\/)P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$" | ||
}, | ||
{ | ||
"type": "string", | ||
"pattern": "^(R\\d*\\/)?P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?\\/([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\4([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+(?!:))?)?(\\18[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"isPartOf": { | ||
"title": "Collection", | ||
"description": "The collection of which the dataset is a subset", | ||
"anyOf": [ | ||
{ | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
] | ||
}, | ||
"theme": { | ||
"title": "Category", | ||
"description": "Main thematic category of the dataset.", | ||
"anyOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"minItems": 1, | ||
"uniqueItems": true | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"title": { | ||
"title": "Title", | ||
"description": "Human-readable name of the asset. Should be in plain English and include sufficient detail to facilitate search and discovery.", | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
} | ||
} |
Oops, something went wrong.