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

Commit cfd0e1a

Browse files
committed
Adds fields and guidance to specify schema version
This is to help address #309
1 parent 540570a commit cfd0e1a

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

Diff for: v1.1/schema.md

+41-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ The Project Open Data schema is case sensitive. The schema uses a camel case con
5353
Links to downloadable examples of metadata files developed in this and other formats in [the metadata resources](/metadata-resources/). Tools to help agencies produce and maintain their data inventories are [available on GitHub](http://www.github.com/project-open-data) and hosted at [Labs.Data.gov](http://labs.data.gov).
5454

5555

56+
Schema Version Declaration (Required)
57+
-----------------------------
58+
In order to distinguish the schema version being used publishers are required to specify the relevant URI using the `$schema` field at the beginning of their data.json file. Version 1.1 of the schema should be identified with the following URI: http://projectopendata.PLACEHOLDER.gov/v1.1/schema. Optionally, publishers may also use the `$ref` field to reference the default [JSON Schema](http://json-schema.org/) file used to define the schema (http://projectopendata.PLACEHOLDER.gov/v1.1/schema/catalog.json) or they may refer to their own JSON Schema file where they have extended the schema. These fields are both part of a JSON object that also contains a listing of all datasets under the `dataset` field. See the [Catalog section](#Catalog) under *Further Metadata Field Guidance* for more details.
59+
60+
5661
"Common Core" Required Fields
5762
-----------------------------
5863
The following "common core" fields are required, to be used to describe each entry:
@@ -125,7 +130,42 @@ issued | Release Date | Date of formal issuance.
125130
systemOfRecords | System of Records | 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.
126131

127132

128-
Further Metadata Field Guidance (alphabetical by field)
133+
Further Metadata Field Guidance
134+
-------------------------------
135+
Additional details for each field are provided here broken down into sections for the overarching [Catalog](#Catalog), each [dataset](#dataset), and each dataset's [distribution](#distribution).
136+
137+
Catalog Fields {#Catalog}
138+
-------------------------------
139+
140+
{: .table .table-striped #schema}
141+
**Field [#](#schema){: .permalink}** | **$schema**
142+
----- | -----
143+
**Cardinality** | (1,1)
144+
**Required** | Yes, always
145+
**Accepted Values** | String (URL)
146+
**Usage Notes** | This is used to identify the schema version using a URI. The URI for version 1.1 of the schema is `http://projectopendata.PLACEHOLDER.gov/v1.1/schema`
147+
**Example** | `{"$schema": "http://projectopendata.PLACEHOLDER.gov/v1.1/schema"}`
148+
149+
{: .table .table-striped #ref}
150+
**Field [#](#ref){: .permalink}** | **$ref**
151+
----- | -----
152+
**Cardinality** | (0,1)
153+
**Required** | No
154+
**Accepted Values** | String (URL)
155+
**Usage Notes** | This is used to specify a [JSON Schema](http://json-schema.org/) file that defines all fields. By default, it is recommended that the canonical JSON Schema file is referenced (http://projectopendata.PLACEHOLDER.gov/v1.1/schema/catalog.json) but if the schema had been extended, publishers may reference a file that defines those extensions.
156+
**Example** | `{"$ref": "http://projectopendata.PLACEHOLDER.gov/v1.1/schema/catalog.json"}`
157+
158+
{: .table .table-striped #dataset}
159+
**Field [#](#dataset){: .permalink}** | **dataset**
160+
----- | -----
161+
**Cardinality** | (1,n)
162+
**Required** | Yes, always
163+
**Accepted Values** | Array of Objects
164+
**Usage Notes** | This field is a container for an array of Dataset objects. See [Dataset Fields](#Dataset) below for details
165+
**Example** | `{"dataset": [...]}`
166+
167+
168+
Dataset Fields {#Dataset}
129169
-------------------------------
130170

131171
{: .table .table-striped #accessLevel}

0 commit comments

Comments
 (0)