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

First implementation of v1.1 JSON Schema for #385 #397

Merged
merged 1 commit into from
Nov 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v1.1/metadata-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In addition to template and sample files we also produce Project Open Data Metad

### JSON Schema Files ###

* 1.1 Schema (Draft): [Dataset](/v1.1/schema/dataset.json) and [Catalog](/v1.1/schema/catalog.json)
* [1.1 Schema](/v1.1/schema/catalog.json) (Draft). The [Catalog](/v1.1/schema/catalog.json) schema includes by reference the [Dataset](/v1.1/schema/dataset.json), [Distribution](/v1.1/schema/distribution.json), [Organization](/v1.1/schema/organization.json), and [vCard](/v1.1/schema/vcard.json) schemas.

### JSON-LD Context ###

Expand Down
58 changes: 58 additions & 0 deletions v1.1/schema/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://project-open-data.cio.gov/v1.1/schema/catalog.json#",
"title": "Project Open Data Catalog",
"description": "Validates an entire collection of Project Open Data metadata JSON objects. Agencies produce said collections in the form of Data.json files.",
"type": "object",
"dependencies": {
"@type": [
"@context"
]
},
"required": [
"conformsTo",
"dataset"
],
"properties": {
"@context": {
"title": "Metadata Context",
"description": "URL or JSON object for the JSON-LD Context that defines the schema used",
"type": "string",
"format": "uri"
},
"@id": {
"title": "Metadata Catalog ID",
"description": "IRI for the JSON-LD Node Identifier of the Catalog. This should be the URL of the data.json file itself.",
"type": "string",
"format": "uri"
},
"@type": {
"title": "Metadata Context",
"description": "IRI for the JSON-LD data type. This should be dcat:Catalog for the Catalog",
"enum": [
"dcat:Catalog"
]
},
"conformsTo": {
"description": "Version of Schema",
"title": "Version of Schema",
"enum": [
"https://project-open-data.cio.gov/v1.1/schema"
]
},
"describedBy": {
"description": "URL for the JSON Schema file that defines the schema used",
"title": "Data Dictionary",
"type": "string",
"format": "uri"
},
"dataset": {
"type": "array",
"items": {
"$ref": "dataset.json",
"minItems": 1,
"uniqueItems": true
}
}
}
}
Loading