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

Commit 7819587

Browse files
author
jlberryhill
committed
Merge pull request #397 from project-open-data/json-schema-update
First implementation of v1.1 JSON Schema for #385
2 parents e168573 + 4b1cfa1 commit 7819587

File tree

6 files changed

+604
-1
lines changed

6 files changed

+604
-1
lines changed

Diff for: v1.1/metadata-resources.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In addition to template and sample files we also produce Project Open Data Metad
2121

2222
### JSON Schema Files ###
2323

24-
* 1.1 Schema (Draft): [Dataset](/v1.1/schema/dataset.json) and [Catalog](/v1.1/schema/catalog.json)
24+
* [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.
2525

2626
### JSON-LD Context ###
2727

Diff for: v1.1/schema/catalog.json

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "https://project-open-data.cio.gov/v1.1/schema/catalog.json#",
4+
"title": "Project Open Data Catalog",
5+
"description": "Validates an entire collection of Project Open Data metadata JSON objects. Agencies produce said collections in the form of Data.json files.",
6+
"type": "object",
7+
"dependencies": {
8+
"@type": [
9+
"@context"
10+
]
11+
},
12+
"required": [
13+
"conformsTo",
14+
"dataset"
15+
],
16+
"properties": {
17+
"@context": {
18+
"title": "Metadata Context",
19+
"description": "URL or JSON object for the JSON-LD Context that defines the schema used",
20+
"type": "string",
21+
"format": "uri"
22+
},
23+
"@id": {
24+
"title": "Metadata Catalog ID",
25+
"description": "IRI for the JSON-LD Node Identifier of the Catalog. This should be the URL of the data.json file itself.",
26+
"type": "string",
27+
"format": "uri"
28+
},
29+
"@type": {
30+
"title": "Metadata Context",
31+
"description": "IRI for the JSON-LD data type. This should be dcat:Catalog for the Catalog",
32+
"enum": [
33+
"dcat:Catalog"
34+
]
35+
},
36+
"conformsTo": {
37+
"description": "Version of Schema",
38+
"title": "Version of Schema",
39+
"enum": [
40+
"https://project-open-data.cio.gov/v1.1/schema"
41+
]
42+
},
43+
"describedBy": {
44+
"description": "URL for the JSON Schema file that defines the schema used",
45+
"title": "Data Dictionary",
46+
"type": "string",
47+
"format": "uri"
48+
},
49+
"dataset": {
50+
"type": "array",
51+
"items": {
52+
"$ref": "dataset.json",
53+
"minItems": 1,
54+
"uniqueItems": true
55+
}
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)