diff --git a/content/docs/overview/changelog.md b/content/docs/overview/changelog.md index 6a594c8b..89c0e38b 100644 --- a/content/docs/overview/changelog.md +++ b/content/docs/overview/changelog.md @@ -6,6 +6,48 @@ sidebar: This document includes all meaningful changes made to the **Data Package standard**. It does not cover changes made to other documents like Recipes or Guides. +## v2.1 + +##### `schema.fieldsMatch` (fixed) + +[fieldsMatch](/standard/table-schema/#fieldsMatch) has been corrected from array to string to match its definition ([#965](https://github.com/frictionlessdata/datapackage/issues/965)). + +##### `schema.name` (new) + +[`name`](/standard/table-schema/#name) allows to specify a name for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.title` (new) + +[`title`](/standard/table-schema/#title) allows to specify a title for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.description` (new) + +[`description`](/standard/table-schema/#description) allows to specify a description for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.homepage` (new) + +[`homepage`](/standard/table-schema/#homepage) allows to specify a homepage for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.version` (new) + +[`version`](/standard/table-schema/#version) allows to specify a version for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.created` (new) + +[`created`](/standard/table-schema/#created) allows to specify when a schema was created ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.keywords` (new) + +[`keywords`](/standard/table-schema/#keywords) allows to specify keywords for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.contributors` (new) + +[`contributors`](/standard/table-schema/#contributors) allows to specify contributors for a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + +##### `schema.examples` (new) + +[`examples`](/standard/table-schema/#examples) allows to specify a list of illustrative data resources that use a schema ([#961](https://github.com/frictionlessdata/datapackage/pull/961)). + ## v2.0 This release includes a rich set of specification improvements to make Data Package a finished product (see [announcement](https://frictionlessdata.io/blog/2023/11/15/frictionless-specs-update/)). All changes were reviewed and accepted by the Data Package Working Group. diff --git a/content/docs/recipes/category-tables.md b/content/docs/recipes/category-tables.md new file mode 100644 index 00000000..9c7de600 --- /dev/null +++ b/content/docs/recipes/category-tables.md @@ -0,0 +1,145 @@ +--- +title: Category Tables +--- + + + + + + +
AuthorsKyle Husmann, Jan van der Laan, Albert-Jan Roskam, Phil Schumm
+ +Category Table Resources are Tabular Data Resources that can be referenced in the `categories` property of a field descriptor. This is useful when there are many (e.g., thousands) of categorical levels (e.g., as with controlled vocabularies such as Medical Subject Headings (MeSH)), the same `categories` definitions are repeated across many fields (e.g., the same Likert scale applied to a series of items), or the categorical levels include a signficant amount of additional metadata (e.g., a hierarchical ontology such as the International Classification of Diseases (ICD)). Category Table Resources may be shared across data packages to facilitate harmonization, and provide support for categorical variables (e.g., as in Pandas, R, or Julia) or value labels (e.g., as in Stata, SAS, or SPSS). + +## Specification + +The Category Table Resource builds directly on the Tabular Data Resource specification. A Category Table Resource `MUST` be a Tabular Data Resource and conform to the [Tabular Data Resource specification](/standard/data-resource/#tabular). + +In addition to the requirements of a Tabular Data Resource, Category Table Resources MUST have an additional +`categoryFieldMap` property of type `object` with the following properties: + +- There `MUST` be a `value` property of type `string` that specifies the name of the field in the Category Table Resource containing the values for the categories as they would appear in a focal data resource. The field indicated by `value` `MUST` exist in the Category Table Resource and be of field type `string` or `integer`. + +- There `MAY` be an optional `label` property of type `string` that specificies the name of the field in the Category Table Resource containing labels for the categories. When specified, the field indicated by `label` `MUST` exist in the Category Table Resource and be of field type `string`. + +- There `MAY` be an optional `ordered` property of type `boolean`. When `ordered` is `true`, implementations `SHOULD` regard the order of appearance of the values in the Category Table Resource as their natural order. When `false` implementations `SHOULD` assume that the categories do not have a natural order. When the property is not present, no assumption about the ordered nature of the values `SHOULD` be made. + +For example, the following is a valid Category Table Resource: + +```json +{ + "name": "fruit-codes", + "type": "table", + "categoryFieldMap": { + "value": "code", + "label": "name", + "ordered": false + }, + "schema": { + "fields": [ + { "name": "code", "type": "string" }, + { "name": "name", "type": "string" } + ] + }, + "data": [ + { "code": "A", "name": "Apple" }, + { "code": "B", "name": "Banana" }, + { "code": "C", "name": "Cherry" } + ] +} +``` + +## Usage + +Category Table Resources are used by providing the `categories` property of a categorical field descriptor with an `object` with the following properties: + +- There `MUST` be a `resource` property of type `string` that specifies the name of the Category Table Resource to be used. + +- There `MAY` be an optional `package` property of type `string` that specifies the package containing the Category Table Resource to be used. As with the [External Foreign Keys](/recipes/external-foreign-keys/) recipe, the `package` property `MUST` be either a fully qualified HTTP address to a Data Package `datapackage.json` file or a data package name that can be resolved by a canonical data package registry. If omitted, implementations `SHOULD` assume the Category Table Resource is in the current data package. + +- There `MAY` be an optional `encodedAs` property of type `string` that specifies whether the values of the focal categorical field reference the `value` or `label` field of the Category Table Resource. When `encodedAs` is `"value"`, the values of the focal categorical field are mapped to the values of the `value` field in the Category Table Resource. When `encodedAs` is `"label"`, the values of the focal categorical field are mapped to the values of the `label` field in the Category Table Resource. When `encodedAs` is omitted, implementations `SHOULD` assume the values of the categorical field are the values of the `value` field in the Category Table Resource. + +For example, the following field definition references the `fruit-codes` Category Table Resource defined above if it was in the same data package used the `value`s of the Category Table Resource (in this case, the `code` field of `fruit-codes`): + +```json +{ + "name": "fruit", + "type": "string", + "categories": { + "resource": "fruit-codes" + } +} +``` + +Alternatively, if the `fruit-codes` Category Table Resource was in an external data package and used the Category Table Resource's `label`s to represent the field's options (in this case, the `name` field of `fruit-codes`), the field definition would be: + +```json +{ + "name": "fruit", + "type": "string", + "categories": { + "package": "http://example.com/package.json", + "resource": "fruit-codes", + "encodedAs": "label" + } +} +``` + +## Constraints + +In a Category Table Resource, the field referenced by the `value` property `MUST` validated with `"required": true` and `"unique": true` field constraints. Similarly, when `label` is specified, the field it references `MUST` be of type `string` and be validated with the `"unique": true` field constraint. + +Fields in a focal data resource referencing a Category Table Resource via the `categories` property `MUST` have a type identical to the type of the corresponding `value` field in the Category Table Resource. For example, the following is an invalid references to the `fruit-codes` Category Table Resource because the `type` of the categorical field being defined is `integer` while the `value` field in the `fruit-codes` Category Table Resource is of type `string`: + +```json +{ + "name": "fruit", + "type": "integer", + "categories": { + "resource": "fruit-codes" + } +} +``` + +## Internationalization + +Alternate translations of the category labels can be provided by way of the [Language Support](/recipes/language-support) recipe. The following example shows how the fruit-codes table from the previous example could be extended to support multiple languages: + +```json +{ + "name": "fruit-codes", + "type": "table", + "languages": ["en", "nl"], + "categoryFieldMap": { + "value": "code", + "label": "name", + "ordered": false + }, + "schema": { + "fields": [ + { "name": "code", "type": "string" }, + { "name": "name", "type": "string" }, + { "name": "name@nl", "type": "string" } + ] + }, + "data": [ + { "code": "A", "name": "Apple", "name@nl": "Appel" }, + { "code": "B", "name": "Banana", "name@nl": "Banaan" }, + { "code": "C", "name": "Cherry", "name@nl": "Kers" } + ] +} +``` + +## Discussion + +Being able to define lists of categories in a separate data resource has a number of advantages: + +- In case of a large number of categories it is often easier to maintain these in files, such as CSV files. This also keeps the `datapackage.json` file compact and readable for humans. + +- The data set in the category table resource can store additional information besides the 'value' and 'label'. For example, the categories could have descriptions or the categories could form a hierarchy. + +- It is also possible to store additional meta data in the category table resource. For example, it is possible to indicate the source, license, version and owner of the data resource. This is important for many 'official' categories lists where there can be many similar versions maintained by different organisations. + +- When different fields use the same categories they can all refer to the same category table resource. First, this allows to reuse of the categories. Second, by referring to the same data resource, the field descriptors can indicate that the categories are comparable between fields. + +- It is possible to refer to category table resources in other data packages. This makes it, for example, possible to create centrally maintained repositories of categories. diff --git a/content/docs/standard/data-package.mdx b/content/docs/standard/data-package.mdx index a15a1672..e2071e25 100644 --- a/content/docs/standard/data-package.mdx +++ b/content/docs/standard/data-package.mdx @@ -3,7 +3,7 @@ title: Data Package description: A simple container format for describing a coherent collection of data in a single package. It provides the basis for convenient delivery, installation and management of datasets. sidebar: order: 1 -profile: /profiles/2.0/datapackage.json +profile: /profiles/2.1/datapackage.json authors: - Rufus Pollock - Paul Walsh @@ -129,7 +129,7 @@ Packaged data resources are described in the `resources` property of the package A root level Data Package descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](/standard/glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification. -The default value is `https://datapackage.org/profiles/1.0/datapackage.json` and the recommended value is `https://datapackage.org/profiles/2.0/datapackage.json`. +The default value is `https://datapackage.org/profiles/1.0/datapackage.json` and the recommended value is `https://datapackage.org/profiles/2.1/datapackage.json`. :::note[Backward Compatibility] If the `$schema` property is not provided but a descriptor has the `profile` property a data consumer `MUST` validate the descriptor according to the [Profiles](https://specs.frictionlessdata.io/profiles/) specification. @@ -229,7 +229,7 @@ An Array of string keywords to assist users searching for the package in catalog ### `contributors` -The people or organizations who contributed to this Data Package. It `MUST` be an array. Each entry is a Contributor and `MUST` be an `object`. A Contributor `MUST` have at least one property. A Contributor is `RECOMMENDED` to have `title` property and `MAY` contain `givenName`, `familyName`, `path`, `email`, `roles`, and `organization` properties: +The people or organizations that contributed to this Data Package. It `MUST` be an array. Each entry is a Contributor and `MUST` be an `object`. A Contributor `MUST` have at least one property. A Contributor is `RECOMMENDED` to have `title` property and `MAY` contain `givenName`, `familyName`, `path`, `email`, `roles`, and `organization` properties: - `title`: A string containing a name of the contributor. - `givenName`: A string containing the name a person has been given, if the contributor is a person. diff --git a/content/docs/standard/data-resource.mdx b/content/docs/standard/data-resource.mdx index 7825a1e0..c9fb176a 100644 --- a/content/docs/standard/data-resource.mdx +++ b/content/docs/standard/data-resource.mdx @@ -3,7 +3,7 @@ title: Data Resource description: A simple format to describe and package a single data resource such as an individual table or file. The essence of a Data Resource is a locator for the data it describes. A range of other properties can be declared to provide a richer set of metadata. sidebar: order: 2 -profile: /profiles/2.0/dataresource.json +profile: /profiles/2.1/dataresource.json authors: - Rufus Pollock - Paul Walsh @@ -159,7 +159,7 @@ If a resource has `profile` property that equals to `tabular-data-resource` or ` A root level Data Resource descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](/standard/glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification. -The default value is `https://datapackage.org/profiles/1.0/dataresource.json` and the recommended value is `https://datapackage.org/profiles/2.0/dataresource.json`. +The default value is `https://datapackage.org/profiles/1.0/dataresource.json` and the recommended value is `https://datapackage.org/profiles/2.1/dataresource.json`. :::note[Backward Compatibility] If the `$schema` property is not provided but a descriptor has the `profile` property a data consumer `MUST` validate the descriptor according to the [Profiles](https://specs.frictionlessdata.io/profiles/) specification. diff --git a/content/docs/standard/table-dialect.mdx b/content/docs/standard/table-dialect.mdx index 49680f82..1f6f2984 100644 --- a/content/docs/standard/table-dialect.mdx +++ b/content/docs/standard/table-dialect.mdx @@ -3,7 +3,7 @@ title: Table Dialect description: Table Dialect describes how tabular data is stored in a file. It supports delimited text files like CSV, semi-structured formats like JSON and YAML, and spreadsheets like Microsoft Excel. The specification is designed to be expressible as a single JSON-compatible descriptor. sidebar: order: 3 -profile: /profiles/2.0/tabledialect.json +profile: /profiles/2.1/tabledialect.json authors: - Rufus Pollock - Paul Walsh @@ -148,7 +148,7 @@ Database formats is a group of formats accessing data from databases like SQLite A root level Table Dialect descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](/standard/glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification. -The default value is `https://datapackage.org/profiles/1.0/tabledialect.json` and the recommended value is `https://datapackage.org/profiles/2.0/tabledialect.json`. +The default value is `https://datapackage.org/profiles/1.0/tabledialect.json` and the recommended value is `https://datapackage.org/profiles/2.1/tabledialect.json`. ### `header` diff --git a/content/docs/standard/table-schema.mdx b/content/docs/standard/table-schema.mdx index 93ee830a..71e19cca 100644 --- a/content/docs/standard/table-schema.mdx +++ b/content/docs/standard/table-schema.mdx @@ -3,7 +3,7 @@ title: Table Schema description: A simple format to declare a schema for tabular data. The schema is designed to be expressible in JSON. sidebar: order: 4 -profile: /profiles/2.0/tableschema.json +profile: /profiles/2.1/tableschema.json authors: - Rufus Pollock - Paul Walsh @@ -86,7 +86,7 @@ The way Table Schema `fields` are mapped onto the data source fields are defined A root level Table Schema descriptor `MAY` have a `$schema` property that `MUST` be a profile as per [Profile](/standard/glossary/#profile) definition that `MUST` include all the metadata constraints required by this specification. -The default value is `https://datapackage.org/profiles/1.0/tableschema.json` and the recommended value is `https://datapackage.org/profiles/2.0/tableschema.json`. +The default value is `https://datapackage.org/profiles/1.0/tableschema.json` and the recommended value is `https://datapackage.org/profiles/2.1/tableschema.json`. #### `fieldsMatch` {#fieldsMatch} @@ -202,14 +202,14 @@ In contrast with `field.constraints.unique`, `uniqueKeys` allows to define uniqu #### `foreignKeys` {#foreignKeys} -A foreign key is a reference where values in a field (or fields) on the table ('resource' in data package terminology) described by this Table Schema connect to values a field (or fields) on this or a separate table (resource). They are directly modelled on the concept of foreign keys in SQL. +A foreign key is a reference where values in a field (or fields) of the table ('resource' in Data Package terminology) described by this Table Schema connect to values a field (or fields) of this or a separate table (resource). This concept is directly modelled on the concept of foreign keys in SQL. The `foreignKeys` property, if present, `MUST` be an Array. Each entry in the array `MUST` be a `foreignKey`. A `foreignKey` `MUST` be a `object` and `MUST` have the following properties: - `fields` - `fields` is an array of strings specifying the field or fields on this resource that form the source part of the foreign key. The structure of the array is as per `primaryKey` above. - `reference` - `reference` `MUST` be a `object`. The `object` - `MUST` have a property `fields` which is an array of strings of the same length as the outer `fields`, describing the field (or fields) references on the destination resource. The structure of the array is as per `primaryKey` above. - - `MAY` have a property `resource` which is the name of the resource within the current data package, i.e. the data package within which this Table Schema is located. For referencing another data resource the `resource` property `MUST` be provided. For self-referencing, i.e. references between fields in this Table Schema, the `resource` property `MUST` be omitted. + - `MAY` have a property `resource` which is the name of the resource within the current Data Package, i.e. the Data Package within which this Table Schema is located. For referencing another Data Resource the `resource` property `MUST` be provided. For self-referencing, i.e. references between fields in this Table Schema, the `resource` property `MUST` be omitted. Here's an example: @@ -277,6 +277,44 @@ If the value of the `foreignKey.reference.resource` property is an empty string Data consumer MUST support the `foreignKey.fields` and `foreignKey.reference.fields` properties in a form of a single string e.g. `"fields": "a"` which was a part of the `v1.0` of the specification. ::: +#### `name` + +A simple name or identifier for the schema (cf. [Data Package](https://datapackage.org/standard/data-package/#name)). + +#### `title` + +A string providing a title or one sentence description for the schema. + +#### `description` + +A description of the schema (cf. [Data Package](https://datapackage.org/standard/data-package/#description)). + +#### `homepage` + +A URL for the web page associated with the schema. + +#### `version` + +A version string identifying the version of the schema (cf. [Data Package](https://datapackage.org/standard/data-package/#version)). If not specified, the schema inherits from the Data Package if distributed in a Data Package descriptor. + +#### `created` + +The datetime on which the schema was created (cf. [Data Package](https://datapackage.org/standard/data-package/#created)). + +#### `keywords` + +An array of string keywords to assist users searching for the schema in catalogs. + +#### `contributors` + +The people or organizations that contributed to the schema (cf. [Data Package](https://datapackage.org/standard/data-package/#contributors)). If not specified the schema inherits from the Data Package if distributed in a Data Package descriptor. + +#### `examples` + +A list of Data Resources that use and illustrate the schema. + +If present, it `MUST` be a non-empty array of objects. Each object is a [Data Resource](https://datapackage.org/standard/data-resource/) that `MUST` at least have the `name` and `path` property. The `path` must be a URL. + ### Field A field descriptor `MUST` be a JSON `object` that describes a single field. The descriptor provides additional human-readable documentation for a field, as well as additional information that can be used to validate the field or create a user interface for data entry. diff --git a/package-lock.json b/package-lock.json index d72480e7..4bbff95e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datapackage.org", - "version": "2.0", + "version": "2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datapackage.org", - "version": "2.0", + "version": "2.1", "dependencies": { "@apidevtools/json-schema-ref-parser": "11.6.4", "@astrojs/markdown-remark": "5.1.1", diff --git a/package.json b/package.json index 929f52ad..950b661e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "datapackage.org", "type": "module", - "version": "2.0", + "version": "2.1", "engines": { "node": "^20.0.0", "npm": "^10.0.0" diff --git a/profiles/dictionary/common.yaml b/profiles/dictionary/common.yaml index 234a14df..c41efe39 100644 --- a/profiles/dictionary/common.yaml +++ b/profiles/dictionary/common.yaml @@ -22,7 +22,7 @@ id: a package is desired for common data handling workflows, such as updating an existing package. While at the level of the specification, global uniqueness cannot be validated, consumers using the `id` property `MUST` ensure identifiers - are globally unique. + are globally unique. When providing a DOI, it is `RECOMMENDED` to provide the full URL (e.g. `https://doi.org/10.5281/zenodo.10053903`). type: string examples: - | @@ -72,7 +72,7 @@ example: } homepage: title: Home Page - description: The home on the web that is related to this data package. + description: The home on the web that is related to this descriptor. type: string format: uri examples: @@ -149,7 +149,7 @@ created: } keywords: title: Keywords - description: A list of keywords that describe this package. + description: A list of keywords that describe this descriptor. type: array minItems: 1 items: diff --git a/profiles/dictionary/schema.yaml b/profiles/dictionary/schema.yaml index e25c9663..0eb2e7e7 100644 --- a/profiles/dictionary/schema.yaml +++ b/profiles/dictionary/schema.yaml @@ -81,6 +81,24 @@ tableSchema: } missingValues: "$ref": "#/definitions/tableSchemaMissingValues" + name: + "$ref": "#/definitions/name" + title: + "$ref": "#/definitions/title" + description: + "$ref": "#/definitions/description" + homepage: + "$ref": "#/definitions/homepage" + created: + "$ref": "#/definitions/created" + version: + "$ref": "#/definitions/version" + keywords: + "$ref": "#/definitions/keywords" + contributors: + "$ref": "#/definitions/contributors" + examples: + "$ref": "#/definitions/tableSchemaExamples" examples: - | { @@ -120,19 +138,18 @@ tableSchemaField: - "$ref": "#/definitions/tableSchemaFieldGeoPoint" - "$ref": "#/definitions/tableSchemaFieldGeoJSON" - "$ref": "#/definitions/tableSchemaFieldArray" + - "$ref": "#/definitions/tableSchemaFieldList" - "$ref": "#/definitions/tableSchemaFieldDuration" - "$ref": "#/definitions/tableSchemaFieldAny" tableSchemaFieldsMatch: - type: array - item: - type: string - enum: - - exact - - equal - - subset - - superset - - partial - default: exact + type: string + enum: + - exact + - equal + - subset + - superset + - partial + default: exact tableSchemaPrimaryKey: oneOf: - type: array @@ -263,6 +280,33 @@ tableSchemaMissingValues: { "missingValues": [] } +tableSchemaExamples: + title: Examples + description: A list of Data Resources that use and illustrate the schema. + type: array + minItems: 0 + items: + "$ref": "#/definitions/tableSchemaExample" + examples: + - | + { + "examples": [ + { + "name": "valid-data", + "path": "http://example.com/valid-data.csv" + } + ] + } +tableSchemaExample: + title: Example + description: A Data Resource that uses and illustrates the schema. + type: object + properties: + name: + "$ref": "#/definitions/name" + path: + "$ref": "#/definitions/path" + required: ["name", "path"] tableSchemaFieldString: type: object title: String Field diff --git a/public/profiles/2.1/datapackage.json b/public/profiles/2.1/datapackage.json new file mode 100644 index 00000000..3dadd30c --- /dev/null +++ b/public/profiles/2.1/datapackage.json @@ -0,0 +1,3467 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Data Package", + "description": "Data Package", + "type": "object", + "required": [ + "resources" + ], + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/datapackage.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "name": { + "propertyOrder": 20, + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "id": { + "propertyOrder": 30, + "title": "ID", + "description": "A property reserved for globally unique identifiers. Examples of identifiers that are unique include UUIDs and DOIs.", + "context": "A common usage pattern for Data Packages is as a packaging format within the bounds of a system or platform. In these cases, a unique identifier for a package is desired for common data handling workflows, such as updating an existing package. While at the level of the specification, global uniqueness cannot be validated, consumers using the `id` property `MUST` ensure identifiers are globally unique. When providing a DOI, it is `RECOMMENDED` to provide the full URL (e.g. `https://doi.org/10.5281/zenodo.10053903`).", + "type": "string", + "examples": [ + "{\n \"id\": \"b03ec84-77fd-4270-813b-0c698943f7ce\"\n}\n", + "{\n \"id\": \"http://dx.doi.org/10.1594/PANGAEA.726855\"\n}\n" + ] + }, + "title": { + "propertyOrder": 40, + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "propertyOrder": 50, + "format": "textarea", + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "homepage": { + "propertyOrder": 60, + "title": "Home Page", + "description": "The home on the web that is related to this descriptor.", + "type": "string", + "format": "uri", + "examples": [ + "{\n \"homepage\": \"http://example.com/\"\n}\n" + ] + }, + "version": { + "propertyOrder": 65, + "title": "Version", + "description": "A unique version number for this descriptor.", + "type": "string", + "examples": [ + "{\n \"version\": \"0.0.1\"\n}\n", + "{\n \"version\": \"1.0.1-beta\"\n}\n" + ] + }, + "created": { + "propertyOrder": 70, + "title": "Created", + "description": "The datetime on which this descriptor was created.", + "context": "The datetime must conform to the string formats for datetime as described in [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6)", + "type": "string", + "format": "date-time", + "examples": [ + "{\n \"created\": \"1985-04-12T23:20:50.52Z\"\n}\n" + ] + }, + "contributors": { + "propertyOrder": 80, + "title": "Contributors", + "description": "The contributors to this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "title": "Contributor", + "description": "A contributor to this descriptor.", + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + }, + "organization": { + "title": "Organization", + "description": "An organizational affiliation for this contributor.", + "type": "string" + }, + "roles": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "minProperties": 1, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "examples": [ + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\"\n }\n ]\n}\n", + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n" + ] + }, + "keywords": { + "propertyOrder": 90, + "title": "Keywords", + "description": "A list of keywords that describe this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "examples": [ + "{\n \"keywords\": [\n \"data\",\n \"fiscal\",\n \"transparency\"\n ]\n}\n" + ] + }, + "image": { + "propertyOrder": 100, + "title": "Image", + "description": "A image to represent this package.", + "type": "string", + "examples": [ + "{\n \"image\": \"http://example.com/image.jpg\"\n}\n", + "{\n \"image\": \"relative/to/image.jpg\"\n}\n" + ] + }, + "licenses": { + "propertyOrder": 110, + "title": "Licenses", + "description": "The license(s) under which this package is published.", + "type": "array", + "minItems": 1, + "items": { + "title": "License", + "description": "A license for this descriptor.", + "type": "object", + "anyOf": [ + { + "required": [ + "name" + ] + }, + { + "required": [ + "path" + ] + } + ], + "properties": { + "name": { + "title": "Open Definition license identifier", + "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", + "type": "string", + "pattern": "^([-a-zA-Z0-9._])+$" + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + } + }, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", + "examples": [ + "{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n" + ] + }, + "resources": { + "propertyOrder": 120, + "title": "Data Resources", + "description": "An `array` of Data Resource objects, each compliant with the [Data Resource](/data-resource/) specification.", + "type": "array", + "minItems": 1, + "items": { + "title": "Data Resource", + "description": "Data Resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "name", + "data" + ] + }, + { + "required": [ + "name", + "path" + ] + } + ], + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/dataresource.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "name": { + "propertyOrder": 20, + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "path": { + "propertyOrder": 30, + "title": "Path", + "description": "A reference to the data for this resource, as either a path as a string, or an array of paths as strings. of valid URIs.", + "oneOf": [ + { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + { + "type": "array", + "minItems": 1, + "items": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "examples": [ + "[ \"file.csv\" ]\n", + "[ \"http://example.com/file.csv\" ]\n" + ] + } + ], + "context": "The dereferenced value of each referenced data source in `path` `MUST` be commensurate with a native, dereferenced representation of the data the resource describes. For example, in a *Tabular* Data Resource, this means that the dereferenced value of `path` `MUST` be an array.", + "examples": [ + "{\n \"path\": [\n \"file.csv\",\n \"file2.csv\"\n ]\n}\n", + "{\n \"path\": [\n \"http://example.com/file.csv\",\n \"http://example.com/file2.csv\"\n ]\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ] + }, + "data": { + "propertyOrder": 230, + "title": "Data", + "description": "Inline data for this resource." + }, + "type": { + "propertyOrder": 235, + "type": "string", + "enum": [ + "table" + ] + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ], + "propertyOrder": 50 + }, + "description": { + "propertyOrder": 60, + "format": "textarea", + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "homepage": { + "propertyOrder": 70, + "title": "Home Page", + "description": "The home on the web that is related to this descriptor.", + "type": "string", + "format": "uri", + "examples": [ + "{\n \"homepage\": \"http://example.com/\"\n}\n" + ] + }, + "sources": { + "propertyOrder": 140, + "options": { + "hidden": true + }, + "title": "Sources", + "description": "The raw sources for this resource.", + "type": "array", + "minItems": 0, + "items": { + "title": "Source", + "description": "A source file.", + "type": "object", + "minProperties": 1, + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "version": { + "type": "string" + } + } + }, + "examples": [ + "{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n" + ] + }, + "licenses": { + "description": "The license(s) under which the resource is published.", + "propertyOrder": 150, + "options": { + "hidden": true + }, + "title": "Licenses", + "type": "array", + "minItems": 1, + "items": { + "title": "License", + "description": "A license for this descriptor.", + "type": "object", + "anyOf": [ + { + "required": [ + "name" + ] + }, + { + "required": [ + "path" + ] + } + ], + "properties": { + "name": { + "title": "Open Definition license identifier", + "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", + "type": "string", + "pattern": "^([-a-zA-Z0-9._])+$" + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + } + }, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", + "examples": [ + "{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n" + ] + }, + "format": { + "propertyOrder": 80, + "title": "Format", + "description": "The file format of this resource.", + "context": "`csv`, `xls`, `json` are examples of common formats.", + "type": "string", + "examples": [ + "{\n \"format\": \"xls\"\n}\n" + ] + }, + "mediatype": { + "propertyOrder": 90, + "title": "Media Type", + "description": "The media type of this resource. Can be any valid media type listed with [IANA](https://www.iana.org/assignments/media-types/media-types.xhtml).", + "type": "string", + "pattern": "^(.+)/(.+)$", + "examples": [ + "{\n \"mediatype\": \"text/csv\"\n}\n" + ] + }, + "encoding": { + "propertyOrder": 100, + "title": "Encoding", + "description": "The file encoding of this resource.", + "type": "string", + "default": "utf-8", + "examples": [ + "{\n \"encoding\": \"utf-8\"\n}\n" + ] + }, + "bytes": { + "propertyOrder": 110, + "options": { + "hidden": true + }, + "title": "Bytes", + "description": "The size of this resource in bytes.", + "type": "integer", + "examples": [ + "{\n \"bytes\": 2082\n}\n" + ] + }, + "hash": { + "propertyOrder": 120, + "options": { + "hidden": true + }, + "title": "Hash", + "type": "string", + "description": "The MD5 hash of this resource. Indicate other hashing algorithms with the {algorithm}:{hash} format.", + "pattern": "^([^:]+:[a-fA-F0-9]+|[a-fA-F0-9]{32}|)$", + "examples": [ + "{\n \"hash\": \"d25c9c77f588f5dc32059d2da1136c02\"\n}\n", + "{\n \"hash\": \"SHA256:5262f12512590031bbcc9a430452bfd75c2791ad6771320bb4b5728bfb78c4d0\"\n}\n" + ] + }, + "dialect": { + "propertyOrder": 130, + "title": "Table Dialect", + "description": "The Table dialect descriptor.", + "type": "object", + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/tabledialect.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "header": { + "title": "Header", + "description": "Specifies if the file includes a header row, always as the first row in the file.", + "type": "boolean", + "default": true, + "examples": [ + "{\n \"header\": true\n}\n" + ] + }, + "headerRows": { + "type": "array", + "default": [ + 1 + ], + "items": { + "type": "integer", + "minimum": 1 + } + }, + "headerJoin": { + "type": "string", + "default": " " + }, + "commentRows": { + "type": "array", + "default": [ + 1 + ], + "items": { + "type": "integer", + "minimum": 1 + } + }, + "commentChar": { + "title": "Comment Character", + "description": "Specifies that any row beginning with this one-character string, without preceeding whitespace, causes the entire line to be ignored.", + "type": "string", + "examples": [ + "{\n \"commentChar\": \"#\"\n}\n" + ] + }, + "delimiter": { + "title": "Delimiter", + "description": "A character sequence to use as the field separator.", + "type": "string", + "default": ",", + "examples": [ + "{\n \"delimiter\": \",\"\n}\n", + "{\n \"delimiter\": \";\"\n}\n" + ] + }, + "lineTerminator": { + "title": "Line Terminator", + "description": "Specifies the character sequence that must be used to terminate rows.", + "type": "string", + "default": "\r\n", + "examples": [ + "{\n \"lineTerminator\": \"\\r\\n\"\n}\n", + "{\n \"lineTerminator\": \"\\n\"\n}\n" + ] + }, + "quoteChar": { + "title": "Quote Character", + "description": "Specifies a one-character string to use as the quoting character.", + "type": "string", + "default": "\"", + "examples": [ + "{\n \"quoteChar\": \"'\"\n}\n" + ] + }, + "doubleQuote": { + "title": "Double Quote", + "description": "Specifies the handling of quotes inside fields.", + "context": "If Double Quote is set to true, two consecutive quotes must be interpreted as one.", + "type": "boolean", + "default": true, + "examples": [ + "{\n \"doubleQuote\": true\n}\n" + ] + }, + "escapeChar": { + "title": "Escape Character", + "description": "Specifies a one-character string to use as the escape character.", + "type": "string", + "examples": [ + "{\n \"escapeChar\": \"\\\\\"\n}\n" + ] + }, + "nullSequence": { + "title": "Null Sequence", + "description": "Specifies the null sequence, for example, `\\N`.", + "type": "string", + "examples": [ + "{\n \"nullSequence\": \"\\N\"\n}\n" + ] + }, + "skipInitialSpace": { + "title": "Skip Initial Space", + "description": "Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.", + "type": "boolean", + "default": false, + "examples": [ + "{\n \"skipInitialSpace\": true\n}\n" + ] + }, + "property": { + "type": "string" + }, + "itemType": { + "type": "string", + "enum": [ + "array", + "object" + ] + }, + "itemKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "sheetNumber": { + "type": "integer", + "minimum": 1 + }, + "sheetName": { + "type": "string" + }, + "table": { + "type": "string" + } + } + }, + "schema": { + "propertyOrder": 140, + "title": "Table Schema", + "description": "A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.", + "type": [ + "string", + "object" + ], + "required": [ + "fields" + ], + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/tableschema.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "fields": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Field", + "type": "object", + "oneOf": [ + { + "type": "object", + "title": "String Field", + "description": "The field contains strings, that is, sequences of characters.", + "required": [ + "name" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "categories": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ] + }, + "categoriesOrdered": { + "type": "boolean" + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `string`.", + "enum": [ + "string" + ] + }, + "format": { + "description": "The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.", + "context": "The following `format` options are supported:\n * **default**: any valid string.\n * **email**: A valid email address.\n * **uri**: A valid URI.\n * **binary**: A base64 encoded string representing binary data.\n * **uuid**: A string that is a uuid.", + "enum": [ + "default", + "email", + "uri", + "binary", + "uuid" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `string` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"name\",\n \"type\": \"string\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"format\": \"email\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"constraints\": {\n \"minLength\": 3,\n \"maxLength\": 35\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Number Field", + "description": "The field contains numbers of any kind including decimals.", + "context": "The lexical formatting follows that of decimal in [XMLSchema](https://www.w3.org/TR/xmlschema-2/#decimal): a non-empty finite-length sequence of decimal digits separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: '-1.23', '12678967.543233', '+100000.00', '210'.\n\nThe following special string values are permitted (case does not need to be respected):\n - NaN: not a number\n - INF: positive infinity\n - -INF: negative infinity\n\nA number `MAY` also have a trailing:\n - exponent: this `MUST` consist of an E followed by an optional + or - sign followed by one or more decimal digits (0-9)\n - percentage: the percentage sign: `%`. In conversion percentages should be divided by 100.\n\nIf both exponent and percentages are present the percentage `MUST` follow the exponent e.g. '53E10%' (equals 5.3).", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `number`.", + "enum": [ + "number" + ] + }, + "format": { + "description": "There are no format keyword options for `number`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "groupChar": { + "type": "string", + "title": "groupChar", + "description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'." + }, + "decimalChar": { + "type": "string", + "description": "A string whose value is used to represent a decimal point within the number. The default value is `.`." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `number` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "number" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"field-name\",\n \"type\": \"number\"\n}\n", + "{\n \"name\": \"field-name\",\n \"type\": \"number\",\n \"constraints\": {\n \"enum\": [ \"1.00\", \"1.50\", \"2.00\" ]\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Integer Field", + "description": "The field contains integers - that is whole numbers.", + "context": "Integer values are indicated in the standard way for any valid integer.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "categories": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer" + }, + "label": { + "type": "string" + } + } + } + } + ] + }, + "categoriesOrdered": { + "type": "boolean" + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `integer`.", + "enum": [ + "integer" + ] + }, + "format": { + "description": "There are no format keyword options for `integer`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "groupChar": { + "type": "string", + "title": "groupChar", + "description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `integer` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"age\",\n \"type\": \"integer\",\n \"constraints\": {\n \"unique\": true,\n \"minimum\": 100,\n \"maximum\": 9999\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Date Field", + "description": "The field contains temporal date values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `date`.", + "enum": [ + "date" + ] + }, + "format": { + "description": "The format keyword options for `date` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string of YYYY-MM-DD.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `date` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\"\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"constraints\": {\n \"minimum\": \"01-01-1900\"\n }\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"format\": \"MM-DD-YYYY\"\n}\n" + ] + }, + { + "type": "object", + "title": "Time Field", + "description": "The field contains temporal time values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `time`.", + "enum": [ + "time" + ] + }, + "format": { + "description": "The format keyword options for `time` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for time.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `time` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\"\n}\n", + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\",\n \"format\": \"any\"\n}\n" + ] + }, + { + "type": "object", + "title": "Date Time Field", + "description": "The field contains temporal datetime values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `datetime`.", + "enum": [ + "datetime" + ] + }, + "format": { + "description": "The format keyword options for `datetime` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for datetime.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `datetime` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\"\n}\n", + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\",\n \"format\": \"default\"\n}\n" + ] + }, + { + "type": "object", + "title": "Year Field", + "description": "A calendar year, being an integer with 4 digits. Equivalent to [gYear in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYear)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `year`.", + "enum": [ + "year" + ] + }, + "format": { + "description": "There are no format keyword options for `year`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `year` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"year\",\n \"type\": \"year\"\n}\n", + "{\n \"name\": \"year\",\n \"type\": \"year\",\n \"constraints\": {\n \"minimum\": 1970,\n \"maximum\": 2003\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Year Month Field", + "description": "A calendar year month, being an integer with 1 or 2 digits. Equivalent to [gYearMonth in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYearMonth)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `yearmonth`.", + "enum": [ + "yearmonth" + ] + }, + "format": { + "description": "There are no format keyword options for `yearmonth`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `yearmonth` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\"\n}\n", + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\",\n \"constraints\": {\n \"minimum\": 1,\n \"maximum\": 6\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Boolean Field", + "description": "The field contains boolean (true/false) data.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `boolean`.", + "enum": [ + "boolean" + ] + }, + "format": { + "description": "There are no format keyword options for `boolean`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "trueValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "true", + "True", + "TRUE", + "1" + ] + }, + "falseValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "false", + "False", + "FALSE", + "0" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `boolean` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "boolean" + } + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"registered\",\n \"type\": \"boolean\"\n}\n" + ] + }, + { + "type": "object", + "title": "Object Field", + "description": "The field contains data which can be parsed as a valid JSON object.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `object`.", + "enum": [ + "object" + ] + }, + "format": { + "description": "There are no format keyword options for `object`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `object` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + }, + "jsonSchema": { + "type": "object", + "description": "A valid JSON Schema object to validate field values. If a field value conforms to the provided JSON Schema then this field value is valid." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"extra\"\n \"type\": \"object\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoPoint Field", + "description": "The field contains data describing a geographic point.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geopoint`.", + "enum": [ + "geopoint" + ] + }, + "format": { + "description": "The format keyword options for `geopoint` are `default`,`array`, and `object`.", + "context": "The following `format` options are supported:\n * **default**: A string of the pattern 'lon, lat', where `lon` is the longitude and `lat` is the latitude.\n * **array**: An array of exactly two items, where each item is either a number, or a string parsable as a number, and the first item is `lon` and the second item is `lat`.\n * **object**: A JSON object with exactly two keys, `lat` and `lon`", + "notes": [ + "Implementations `MUST` strip all white space in the default format of `lon, lat`." + ], + "enum": [ + "default", + "array", + "object" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geopoint` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\"\n}\n", + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\",\n \"format\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoJSON Field", + "description": "The field contains a JSON object according to GeoJSON or TopoJSON", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geojson`.", + "enum": [ + "geojson" + ] + }, + "format": { + "description": "The format keyword options for `geojson` are `default` and `topojson`.", + "context": "The following `format` options are supported:\n * **default**: A geojson object as per the [GeoJSON spec](http://geojson.org/).\n * **topojson**: A topojson object as per the [TopoJSON spec](https://github.com/topojson/topojson-specification/blob/master/README.md)", + "enum": [ + "default", + "topojson" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geojson` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\"\n}\n", + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\",\n \"format\": \"topojson\"\n}\n" + ] + }, + { + "type": "object", + "title": "Array Field", + "description": "The field contains data which can be parsed as a valid JSON array.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `array`.", + "enum": [ + "array" + ] + }, + "format": { + "description": "There are no format keyword options for `array`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `array` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + }, + "jsonSchema": { + "type": "object", + "description": "A valid JSON Schema object to validate field values. If a field value conforms to the provided JSON Schema then this field value is valid." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "List Field", + "description": "The field contains data that is an ordered one-level depth collection of primitive values with a fixed item type.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `list`.", + "enum": [ + "list" + ] + }, + "format": { + "description": "There are no format keyword options for `list`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "delimiter": { + "title": "Delimiter", + "description": "A character sequence to use as the field separator.", + "type": "string", + "default": ",", + "examples": [ + "{\n \"delimiter\": \",\"\n}\n", + "{\n \"delimiter\": \";\"\n}\n" + ] + }, + "itemType": { + "title": "Item type.", + "description": "Specifies the list item type.", + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "datetime", + "date", + "time" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `list` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"list\"\n}\n" + ] + }, + { + "type": "object", + "title": "Duration Field", + "description": "The field contains a duration of time.", + "context": "The lexical representation for duration is the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) extended format `PnYnMnDTnHnMnS`, where `nY` represents the number of years, `nM` the number of months, `nD` the number of days, 'T' is the date/time separator, `nH` the number of hours, `nM` the number of minutes and `nS` the number of seconds. The number of seconds can include decimal digits to arbitrary precision. Date and time elements including their designator may be omitted if their value is zero, and lower order elements may also be omitted for reduced precision. Here we follow the definition of [XML Schema duration datatype](http://www.w3.org/TR/xmlschema-2/#duration) directly and that definition is implicitly inlined here.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `duration`.", + "enum": [ + "duration" + ] + }, + "format": { + "description": "There are no format keyword options for `duration`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `duration` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"period\"\n \"type\": \"duration\"\n}\n" + ] + }, + { + "type": "object", + "title": "Any Field", + "description": "Any value is accepted, including values that are not captured by the type/format/constraint requirements of the specification.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `any`.", + "enum": [ + "any" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply to `any` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"notes\",\n \"type\": \"any\"\n" + ] + } + ] + }, + "description": "An `array` of Table Schema Field objects.", + "examples": [ + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\"\n }\n ]\n}\n", + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\",\n \"type\": \"number\"\n },\n {\n \"name\": \"my-field-name-2\",\n \"type\": \"string\",\n \"format\": \"email\"\n }\n ]\n}\n" + ] + }, + "fieldsMatch": { + "type": "string", + "enum": [ + "exact", + "equal", + "subset", + "superset", + "partial" + ], + "default": "exact" + }, + "primaryKey": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], + "description": "A primary key is a field name or an array of field names, whose values `MUST` uniquely identify each row in the table.", + "context": "Field name in the `primaryKey` `MUST` be unique, and `MUST` match a field name in the associated table. It is acceptable to have an array with a single value, indicating that the value of a single field is the primary key.", + "examples": [ + "{\n \"primaryKey\": [\n \"name\"\n ]\n}\n", + "{\n \"primaryKey\": [\n \"first_name\",\n \"last_name\"\n ]\n}\n" + ] + }, + "uniqueKeys": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "foreignKeys": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Foreign Key", + "description": "Table Schema Foreign Key", + "type": "object", + "required": [ + "fields", + "reference" + ], + "oneOf": [ + { + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string", + "minItems": 1, + "uniqueItems": true, + "description": "Fields that make up the primary key." + } + }, + "reference": { + "type": "object", + "required": [ + "fields" + ], + "properties": { + "resource": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + } + } + }, + { + "properties": { + "fields": { + "type": "string", + "description": "Fields that make up the primary key." + }, + "reference": { + "type": "object", + "required": [ + "fields" + ], + "properties": { + "resource": { + "type": "string" + }, + "fields": { + "type": "string" + } + } + } + } + } + ] + }, + "examples": [ + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"the-resource\",\n \"fields\": \"state_id\"\n }\n }\n ]\n}\n", + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"fields\": \"id\"\n }\n }\n ]\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "name": { + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "homepage": { + "title": "Home Page", + "description": "The home on the web that is related to this descriptor.", + "type": "string", + "format": "uri", + "examples": [ + "{\n \"homepage\": \"http://example.com/\"\n}\n" + ] + }, + "created": { + "title": "Created", + "description": "The datetime on which this descriptor was created.", + "context": "The datetime must conform to the string formats for datetime as described in [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6)", + "type": "string", + "format": "date-time", + "examples": [ + "{\n \"created\": \"1985-04-12T23:20:50.52Z\"\n}\n" + ] + }, + "version": { + "title": "Version", + "description": "A unique version number for this descriptor.", + "type": "string", + "examples": [ + "{\n \"version\": \"0.0.1\"\n}\n", + "{\n \"version\": \"1.0.1-beta\"\n}\n" + ] + }, + "keywords": { + "title": "Keywords", + "description": "A list of keywords that describe this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "examples": [ + "{\n \"keywords\": [\n \"data\",\n \"fiscal\",\n \"transparency\"\n ]\n}\n" + ] + }, + "contributors": { + "title": "Contributors", + "description": "The contributors to this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "title": "Contributor", + "description": "A contributor to this descriptor.", + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + }, + "organization": { + "title": "Organization", + "description": "An organizational affiliation for this contributor.", + "type": "string" + }, + "roles": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "minProperties": 1, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "examples": [ + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\"\n }\n ]\n}\n", + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n" + ] + }, + "examples": { + "title": "Examples", + "description": "A list of Data Resources that use and illustrate the schema.", + "type": "array", + "minItems": 0, + "items": { + "title": "Example", + "description": "A Data Resource that uses and illustrates the schema.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + } + }, + "required": [ + "name", + "path" + ] + }, + "examples": [ + "{\n \"examples\": [\n {\n \"name\": \"valid-data\",\n \"path\": \"http://example.com/valid-data.csv\"\n }\n ]\n}\n" + ] + } + }, + "examples": [ + "{\n \"schema\": {\n \"fields\": [\n {\n \"name\": \"first_name\",\n \"type\": \"string\"\n \"constraints\": {\n \"required\": true\n }\n },\n {\n \"name\": \"age\",\n \"type\": \"integer\"\n },\n ],\n \"primaryKey\": [\n \"name\"\n ]\n }\n}\n" + ] + } + } + }, + "examples": [ + "{\n \"resources\": [\n {\n \"name\": \"my-data\",\n \"data\": [\n \"data.csv\"\n ],\n \"mediatype\": \"text/csv\"\n }\n ]\n}\n" + ] + }, + "sources": { + "propertyOrder": 200, + "options": { + "hidden": true + }, + "title": "Sources", + "description": "The raw sources for this resource.", + "type": "array", + "minItems": 0, + "items": { + "title": "Source", + "description": "A source file.", + "type": "object", + "minProperties": 1, + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "version": { + "type": "string" + } + } + }, + "examples": [ + "{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n" + ] + } + } +} \ No newline at end of file diff --git a/public/profiles/2.1/dataresource.json b/public/profiles/2.1/dataresource.json new file mode 100644 index 00000000..89cb50fc --- /dev/null +++ b/public/profiles/2.1/dataresource.json @@ -0,0 +1,3173 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Data Resource", + "description": "Data Resource.", + "type": "object", + "oneOf": [ + { + "required": [ + "name", + "data" + ] + }, + { + "required": [ + "name", + "path" + ] + } + ], + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/dataresource.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "name": { + "propertyOrder": 20, + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "path": { + "propertyOrder": 30, + "title": "Path", + "description": "A reference to the data for this resource, as either a path as a string, or an array of paths as strings. of valid URIs.", + "oneOf": [ + { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + { + "type": "array", + "minItems": 1, + "items": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "examples": [ + "[ \"file.csv\" ]\n", + "[ \"http://example.com/file.csv\" ]\n" + ] + } + ], + "context": "The dereferenced value of each referenced data source in `path` `MUST` be commensurate with a native, dereferenced representation of the data the resource describes. For example, in a *Tabular* Data Resource, this means that the dereferenced value of `path` `MUST` be an array.", + "examples": [ + "{\n \"path\": [\n \"file.csv\",\n \"file2.csv\"\n ]\n}\n", + "{\n \"path\": [\n \"http://example.com/file.csv\",\n \"http://example.com/file2.csv\"\n ]\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ] + }, + "data": { + "propertyOrder": 230, + "title": "Data", + "description": "Inline data for this resource." + }, + "type": { + "propertyOrder": 235, + "type": "string", + "enum": [ + "table" + ] + }, + "title": { + "propertyOrder": 50, + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "propertyOrder": 60, + "format": "textarea", + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "homepage": { + "propertyOrder": 70, + "title": "Home Page", + "description": "The home on the web that is related to this descriptor.", + "type": "string", + "format": "uri", + "examples": [ + "{\n \"homepage\": \"http://example.com/\"\n}\n" + ] + }, + "sources": { + "propertyOrder": 140, + "options": { + "hidden": true + }, + "title": "Sources", + "description": "The raw sources for this resource.", + "type": "array", + "minItems": 0, + "items": { + "title": "Source", + "description": "A source file.", + "type": "object", + "minProperties": 1, + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "version": { + "type": "string" + } + } + }, + "examples": [ + "{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n" + ] + }, + "licenses": { + "description": "The license(s) under which the resource is published.", + "propertyOrder": 150, + "options": { + "hidden": true + }, + "title": "Licenses", + "type": "array", + "minItems": 1, + "items": { + "title": "License", + "description": "A license for this descriptor.", + "type": "object", + "anyOf": [ + { + "required": [ + "name" + ] + }, + { + "required": [ + "path" + ] + } + ], + "properties": { + "name": { + "title": "Open Definition license identifier", + "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", + "type": "string", + "pattern": "^([-a-zA-Z0-9._])+$" + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + } + }, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", + "examples": [ + "{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n" + ] + }, + "format": { + "propertyOrder": 80, + "title": "Format", + "description": "The file format of this resource.", + "context": "`csv`, `xls`, `json` are examples of common formats.", + "type": "string", + "examples": [ + "{\n \"format\": \"xls\"\n}\n" + ] + }, + "mediatype": { + "propertyOrder": 90, + "title": "Media Type", + "description": "The media type of this resource. Can be any valid media type listed with [IANA](https://www.iana.org/assignments/media-types/media-types.xhtml).", + "type": "string", + "pattern": "^(.+)/(.+)$", + "examples": [ + "{\n \"mediatype\": \"text/csv\"\n}\n" + ] + }, + "encoding": { + "propertyOrder": 100, + "title": "Encoding", + "description": "The file encoding of this resource.", + "type": "string", + "default": "utf-8", + "examples": [ + "{\n \"encoding\": \"utf-8\"\n}\n" + ] + }, + "bytes": { + "propertyOrder": 110, + "options": { + "hidden": true + }, + "title": "Bytes", + "description": "The size of this resource in bytes.", + "type": "integer", + "examples": [ + "{\n \"bytes\": 2082\n}\n" + ] + }, + "hash": { + "propertyOrder": 120, + "options": { + "hidden": true + }, + "title": "Hash", + "type": "string", + "description": "The MD5 hash of this resource. Indicate other hashing algorithms with the {algorithm}:{hash} format.", + "pattern": "^([^:]+:[a-fA-F0-9]+|[a-fA-F0-9]{32}|)$", + "examples": [ + "{\n \"hash\": \"d25c9c77f588f5dc32059d2da1136c02\"\n}\n", + "{\n \"hash\": \"SHA256:5262f12512590031bbcc9a430452bfd75c2791ad6771320bb4b5728bfb78c4d0\"\n}\n" + ] + }, + "dialect": { + "propertyOrder": 130, + "title": "Table Dialect", + "description": "The Table dialect descriptor.", + "type": "object", + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/tabledialect.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "header": { + "title": "Header", + "description": "Specifies if the file includes a header row, always as the first row in the file.", + "type": "boolean", + "default": true, + "examples": [ + "{\n \"header\": true\n}\n" + ] + }, + "headerRows": { + "type": "array", + "default": [ + 1 + ], + "items": { + "type": "integer", + "minimum": 1 + } + }, + "headerJoin": { + "type": "string", + "default": " " + }, + "commentRows": { + "type": "array", + "default": [ + 1 + ], + "items": { + "type": "integer", + "minimum": 1 + } + }, + "commentChar": { + "title": "Comment Character", + "description": "Specifies that any row beginning with this one-character string, without preceeding whitespace, causes the entire line to be ignored.", + "type": "string", + "examples": [ + "{\n \"commentChar\": \"#\"\n}\n" + ] + }, + "delimiter": { + "title": "Delimiter", + "description": "A character sequence to use as the field separator.", + "type": "string", + "default": ",", + "examples": [ + "{\n \"delimiter\": \",\"\n}\n", + "{\n \"delimiter\": \";\"\n}\n" + ] + }, + "lineTerminator": { + "title": "Line Terminator", + "description": "Specifies the character sequence that must be used to terminate rows.", + "type": "string", + "default": "\r\n", + "examples": [ + "{\n \"lineTerminator\": \"\\r\\n\"\n}\n", + "{\n \"lineTerminator\": \"\\n\"\n}\n" + ] + }, + "quoteChar": { + "title": "Quote Character", + "description": "Specifies a one-character string to use as the quoting character.", + "type": "string", + "default": "\"", + "examples": [ + "{\n \"quoteChar\": \"'\"\n}\n" + ] + }, + "doubleQuote": { + "title": "Double Quote", + "description": "Specifies the handling of quotes inside fields.", + "context": "If Double Quote is set to true, two consecutive quotes must be interpreted as one.", + "type": "boolean", + "default": true, + "examples": [ + "{\n \"doubleQuote\": true\n}\n" + ] + }, + "escapeChar": { + "title": "Escape Character", + "description": "Specifies a one-character string to use as the escape character.", + "type": "string", + "examples": [ + "{\n \"escapeChar\": \"\\\\\"\n}\n" + ] + }, + "nullSequence": { + "title": "Null Sequence", + "description": "Specifies the null sequence, for example, `\\N`.", + "type": "string", + "examples": [ + "{\n \"nullSequence\": \"\\N\"\n}\n" + ] + }, + "skipInitialSpace": { + "title": "Skip Initial Space", + "description": "Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.", + "type": "boolean", + "default": false, + "examples": [ + "{\n \"skipInitialSpace\": true\n}\n" + ] + }, + "property": { + "type": "string" + }, + "itemType": { + "type": "string", + "enum": [ + "array", + "object" + ] + }, + "itemKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "sheetNumber": { + "type": "integer", + "minimum": 1 + }, + "sheetName": { + "type": "string" + }, + "table": { + "type": "string" + } + } + }, + "schema": { + "propertyOrder": 140, + "title": "Table Schema", + "description": "A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.", + "type": [ + "string", + "object" + ], + "required": [ + "fields" + ], + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/tableschema.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "fields": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Field", + "type": "object", + "oneOf": [ + { + "type": "object", + "title": "String Field", + "description": "The field contains strings, that is, sequences of characters.", + "required": [ + "name" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "categories": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ] + }, + "categoriesOrdered": { + "type": "boolean" + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `string`.", + "enum": [ + "string" + ] + }, + "format": { + "description": "The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.", + "context": "The following `format` options are supported:\n * **default**: any valid string.\n * **email**: A valid email address.\n * **uri**: A valid URI.\n * **binary**: A base64 encoded string representing binary data.\n * **uuid**: A string that is a uuid.", + "enum": [ + "default", + "email", + "uri", + "binary", + "uuid" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `string` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"name\",\n \"type\": \"string\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"format\": \"email\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"constraints\": {\n \"minLength\": 3,\n \"maxLength\": 35\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Number Field", + "description": "The field contains numbers of any kind including decimals.", + "context": "The lexical formatting follows that of decimal in [XMLSchema](https://www.w3.org/TR/xmlschema-2/#decimal): a non-empty finite-length sequence of decimal digits separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: '-1.23', '12678967.543233', '+100000.00', '210'.\n\nThe following special string values are permitted (case does not need to be respected):\n - NaN: not a number\n - INF: positive infinity\n - -INF: negative infinity\n\nA number `MAY` also have a trailing:\n - exponent: this `MUST` consist of an E followed by an optional + or - sign followed by one or more decimal digits (0-9)\n - percentage: the percentage sign: `%`. In conversion percentages should be divided by 100.\n\nIf both exponent and percentages are present the percentage `MUST` follow the exponent e.g. '53E10%' (equals 5.3).", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `number`.", + "enum": [ + "number" + ] + }, + "format": { + "description": "There are no format keyword options for `number`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "groupChar": { + "type": "string", + "title": "groupChar", + "description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'." + }, + "decimalChar": { + "type": "string", + "description": "A string whose value is used to represent a decimal point within the number. The default value is `.`." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `number` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "number" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"field-name\",\n \"type\": \"number\"\n}\n", + "{\n \"name\": \"field-name\",\n \"type\": \"number\",\n \"constraints\": {\n \"enum\": [ \"1.00\", \"1.50\", \"2.00\" ]\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Integer Field", + "description": "The field contains integers - that is whole numbers.", + "context": "Integer values are indicated in the standard way for any valid integer.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "categories": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer" + }, + "label": { + "type": "string" + } + } + } + } + ] + }, + "categoriesOrdered": { + "type": "boolean" + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `integer`.", + "enum": [ + "integer" + ] + }, + "format": { + "description": "There are no format keyword options for `integer`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "groupChar": { + "type": "string", + "title": "groupChar", + "description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `integer` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"age\",\n \"type\": \"integer\",\n \"constraints\": {\n \"unique\": true,\n \"minimum\": 100,\n \"maximum\": 9999\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Date Field", + "description": "The field contains temporal date values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `date`.", + "enum": [ + "date" + ] + }, + "format": { + "description": "The format keyword options for `date` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string of YYYY-MM-DD.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `date` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\"\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"constraints\": {\n \"minimum\": \"01-01-1900\"\n }\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"format\": \"MM-DD-YYYY\"\n}\n" + ] + }, + { + "type": "object", + "title": "Time Field", + "description": "The field contains temporal time values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `time`.", + "enum": [ + "time" + ] + }, + "format": { + "description": "The format keyword options for `time` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for time.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `time` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\"\n}\n", + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\",\n \"format\": \"any\"\n}\n" + ] + }, + { + "type": "object", + "title": "Date Time Field", + "description": "The field contains temporal datetime values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `datetime`.", + "enum": [ + "datetime" + ] + }, + "format": { + "description": "The format keyword options for `datetime` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for datetime.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `datetime` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\"\n}\n", + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\",\n \"format\": \"default\"\n}\n" + ] + }, + { + "type": "object", + "title": "Year Field", + "description": "A calendar year, being an integer with 4 digits. Equivalent to [gYear in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYear)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `year`.", + "enum": [ + "year" + ] + }, + "format": { + "description": "There are no format keyword options for `year`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `year` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"year\",\n \"type\": \"year\"\n}\n", + "{\n \"name\": \"year\",\n \"type\": \"year\",\n \"constraints\": {\n \"minimum\": 1970,\n \"maximum\": 2003\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Year Month Field", + "description": "A calendar year month, being an integer with 1 or 2 digits. Equivalent to [gYearMonth in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYearMonth)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `yearmonth`.", + "enum": [ + "yearmonth" + ] + }, + "format": { + "description": "There are no format keyword options for `yearmonth`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `yearmonth` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\"\n}\n", + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\",\n \"constraints\": {\n \"minimum\": 1,\n \"maximum\": 6\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Boolean Field", + "description": "The field contains boolean (true/false) data.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `boolean`.", + "enum": [ + "boolean" + ] + }, + "format": { + "description": "There are no format keyword options for `boolean`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "trueValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "true", + "True", + "TRUE", + "1" + ] + }, + "falseValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "false", + "False", + "FALSE", + "0" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `boolean` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "boolean" + } + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"registered\",\n \"type\": \"boolean\"\n}\n" + ] + }, + { + "type": "object", + "title": "Object Field", + "description": "The field contains data which can be parsed as a valid JSON object.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `object`.", + "enum": [ + "object" + ] + }, + "format": { + "description": "There are no format keyword options for `object`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `object` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + }, + "jsonSchema": { + "type": "object", + "description": "A valid JSON Schema object to validate field values. If a field value conforms to the provided JSON Schema then this field value is valid." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"extra\"\n \"type\": \"object\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoPoint Field", + "description": "The field contains data describing a geographic point.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geopoint`.", + "enum": [ + "geopoint" + ] + }, + "format": { + "description": "The format keyword options for `geopoint` are `default`,`array`, and `object`.", + "context": "The following `format` options are supported:\n * **default**: A string of the pattern 'lon, lat', where `lon` is the longitude and `lat` is the latitude.\n * **array**: An array of exactly two items, where each item is either a number, or a string parsable as a number, and the first item is `lon` and the second item is `lat`.\n * **object**: A JSON object with exactly two keys, `lat` and `lon`", + "notes": [ + "Implementations `MUST` strip all white space in the default format of `lon, lat`." + ], + "enum": [ + "default", + "array", + "object" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geopoint` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\"\n}\n", + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\",\n \"format\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoJSON Field", + "description": "The field contains a JSON object according to GeoJSON or TopoJSON", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geojson`.", + "enum": [ + "geojson" + ] + }, + "format": { + "description": "The format keyword options for `geojson` are `default` and `topojson`.", + "context": "The following `format` options are supported:\n * **default**: A geojson object as per the [GeoJSON spec](http://geojson.org/).\n * **topojson**: A topojson object as per the [TopoJSON spec](https://github.com/topojson/topojson-specification/blob/master/README.md)", + "enum": [ + "default", + "topojson" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geojson` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\"\n}\n", + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\",\n \"format\": \"topojson\"\n}\n" + ] + }, + { + "type": "object", + "title": "Array Field", + "description": "The field contains data which can be parsed as a valid JSON array.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `array`.", + "enum": [ + "array" + ] + }, + "format": { + "description": "There are no format keyword options for `array`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `array` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + }, + "jsonSchema": { + "type": "object", + "description": "A valid JSON Schema object to validate field values. If a field value conforms to the provided JSON Schema then this field value is valid." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "List Field", + "description": "The field contains data that is an ordered one-level depth collection of primitive values with a fixed item type.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `list`.", + "enum": [ + "list" + ] + }, + "format": { + "description": "There are no format keyword options for `list`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "delimiter": { + "title": "Delimiter", + "description": "A character sequence to use as the field separator.", + "type": "string", + "default": ",", + "examples": [ + "{\n \"delimiter\": \",\"\n}\n", + "{\n \"delimiter\": \";\"\n}\n" + ] + }, + "itemType": { + "title": "Item type.", + "description": "Specifies the list item type.", + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "datetime", + "date", + "time" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `list` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"list\"\n}\n" + ] + }, + { + "type": "object", + "title": "Duration Field", + "description": "The field contains a duration of time.", + "context": "The lexical representation for duration is the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) extended format `PnYnMnDTnHnMnS`, where `nY` represents the number of years, `nM` the number of months, `nD` the number of days, 'T' is the date/time separator, `nH` the number of hours, `nM` the number of minutes and `nS` the number of seconds. The number of seconds can include decimal digits to arbitrary precision. Date and time elements including their designator may be omitted if their value is zero, and lower order elements may also be omitted for reduced precision. Here we follow the definition of [XML Schema duration datatype](http://www.w3.org/TR/xmlschema-2/#duration) directly and that definition is implicitly inlined here.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `duration`.", + "enum": [ + "duration" + ] + }, + "format": { + "description": "There are no format keyword options for `duration`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `duration` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"period\"\n \"type\": \"duration\"\n}\n" + ] + }, + { + "type": "object", + "title": "Any Field", + "description": "Any value is accepted, including values that are not captured by the type/format/constraint requirements of the specification.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `any`.", + "enum": [ + "any" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply to `any` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"notes\",\n \"type\": \"any\"\n" + ] + } + ] + }, + "description": "An `array` of Table Schema Field objects.", + "examples": [ + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\"\n }\n ]\n}\n", + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\",\n \"type\": \"number\"\n },\n {\n \"name\": \"my-field-name-2\",\n \"type\": \"string\",\n \"format\": \"email\"\n }\n ]\n}\n" + ] + }, + "fieldsMatch": { + "type": "string", + "enum": [ + "exact", + "equal", + "subset", + "superset", + "partial" + ], + "default": "exact" + }, + "primaryKey": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], + "description": "A primary key is a field name or an array of field names, whose values `MUST` uniquely identify each row in the table.", + "context": "Field name in the `primaryKey` `MUST` be unique, and `MUST` match a field name in the associated table. It is acceptable to have an array with a single value, indicating that the value of a single field is the primary key.", + "examples": [ + "{\n \"primaryKey\": [\n \"name\"\n ]\n}\n", + "{\n \"primaryKey\": [\n \"first_name\",\n \"last_name\"\n ]\n}\n" + ] + }, + "uniqueKeys": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "foreignKeys": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Foreign Key", + "description": "Table Schema Foreign Key", + "type": "object", + "required": [ + "fields", + "reference" + ], + "oneOf": [ + { + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string", + "minItems": 1, + "uniqueItems": true, + "description": "Fields that make up the primary key." + } + }, + "reference": { + "type": "object", + "required": [ + "fields" + ], + "properties": { + "resource": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + } + } + }, + { + "properties": { + "fields": { + "type": "string", + "description": "Fields that make up the primary key." + }, + "reference": { + "type": "object", + "required": [ + "fields" + ], + "properties": { + "resource": { + "type": "string" + }, + "fields": { + "type": "string" + } + } + } + } + } + ] + }, + "examples": [ + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"the-resource\",\n \"fields\": \"state_id\"\n }\n }\n ]\n}\n", + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"fields\": \"id\"\n }\n }\n ]\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "name": { + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "homepage": { + "title": "Home Page", + "description": "The home on the web that is related to this descriptor.", + "type": "string", + "format": "uri", + "examples": [ + "{\n \"homepage\": \"http://example.com/\"\n}\n" + ] + }, + "created": { + "title": "Created", + "description": "The datetime on which this descriptor was created.", + "context": "The datetime must conform to the string formats for datetime as described in [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6)", + "type": "string", + "format": "date-time", + "examples": [ + "{\n \"created\": \"1985-04-12T23:20:50.52Z\"\n}\n" + ] + }, + "version": { + "title": "Version", + "description": "A unique version number for this descriptor.", + "type": "string", + "examples": [ + "{\n \"version\": \"0.0.1\"\n}\n", + "{\n \"version\": \"1.0.1-beta\"\n}\n" + ] + }, + "keywords": { + "title": "Keywords", + "description": "A list of keywords that describe this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "examples": [ + "{\n \"keywords\": [\n \"data\",\n \"fiscal\",\n \"transparency\"\n ]\n}\n" + ] + }, + "contributors": { + "title": "Contributors", + "description": "The contributors to this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "title": "Contributor", + "description": "A contributor to this descriptor.", + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + }, + "organization": { + "title": "Organization", + "description": "An organizational affiliation for this contributor.", + "type": "string" + }, + "roles": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "minProperties": 1, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "examples": [ + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\"\n }\n ]\n}\n", + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n" + ] + }, + "examples": { + "title": "Examples", + "description": "A list of Data Resources that use and illustrate the schema.", + "type": "array", + "minItems": 0, + "items": { + "title": "Example", + "description": "A Data Resource that uses and illustrates the schema.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + } + }, + "required": [ + "name", + "path" + ] + }, + "examples": [ + "{\n \"examples\": [\n {\n \"name\": \"valid-data\",\n \"path\": \"http://example.com/valid-data.csv\"\n }\n ]\n}\n" + ] + } + }, + "examples": [ + "{\n \"schema\": {\n \"fields\": [\n {\n \"name\": \"first_name\",\n \"type\": \"string\"\n \"constraints\": {\n \"required\": true\n }\n },\n {\n \"name\": \"age\",\n \"type\": \"integer\"\n },\n ],\n \"primaryKey\": [\n \"name\"\n ]\n }\n}\n" + ] + } + } +} \ No newline at end of file diff --git a/public/profiles/2.1/tabledialect.json b/public/profiles/2.1/tabledialect.json new file mode 100644 index 00000000..00293e71 --- /dev/null +++ b/public/profiles/2.1/tabledialect.json @@ -0,0 +1,146 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Table Dialect", + "description": "The Table dialect descriptor.", + "type": "object", + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/tabledialect.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "header": { + "title": "Header", + "description": "Specifies if the file includes a header row, always as the first row in the file.", + "type": "boolean", + "default": true, + "examples": [ + "{\n \"header\": true\n}\n" + ] + }, + "headerRows": { + "type": "array", + "default": [ + 1 + ], + "items": { + "type": "integer", + "minimum": 1 + } + }, + "headerJoin": { + "type": "string", + "default": " " + }, + "commentRows": { + "type": "array", + "default": [ + 1 + ], + "items": { + "type": "integer", + "minimum": 1 + } + }, + "commentChar": { + "title": "Comment Character", + "description": "Specifies that any row beginning with this one-character string, without preceeding whitespace, causes the entire line to be ignored.", + "type": "string", + "examples": [ + "{\n \"commentChar\": \"#\"\n}\n" + ] + }, + "delimiter": { + "title": "Delimiter", + "description": "A character sequence to use as the field separator.", + "type": "string", + "default": ",", + "examples": [ + "{\n \"delimiter\": \",\"\n}\n", + "{\n \"delimiter\": \";\"\n}\n" + ] + }, + "lineTerminator": { + "title": "Line Terminator", + "description": "Specifies the character sequence that must be used to terminate rows.", + "type": "string", + "default": "\r\n", + "examples": [ + "{\n \"lineTerminator\": \"\\r\\n\"\n}\n", + "{\n \"lineTerminator\": \"\\n\"\n}\n" + ] + }, + "quoteChar": { + "title": "Quote Character", + "description": "Specifies a one-character string to use as the quoting character.", + "type": "string", + "default": "\"", + "examples": [ + "{\n \"quoteChar\": \"'\"\n}\n" + ] + }, + "doubleQuote": { + "title": "Double Quote", + "description": "Specifies the handling of quotes inside fields.", + "context": "If Double Quote is set to true, two consecutive quotes must be interpreted as one.", + "type": "boolean", + "default": true, + "examples": [ + "{\n \"doubleQuote\": true\n}\n" + ] + }, + "escapeChar": { + "title": "Escape Character", + "description": "Specifies a one-character string to use as the escape character.", + "type": "string", + "examples": [ + "{\n \"escapeChar\": \"\\\\\"\n}\n" + ] + }, + "nullSequence": { + "title": "Null Sequence", + "description": "Specifies the null sequence, for example, `\\N`.", + "type": "string", + "examples": [ + "{\n \"nullSequence\": \"\\N\"\n}\n" + ] + }, + "skipInitialSpace": { + "title": "Skip Initial Space", + "description": "Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.", + "type": "boolean", + "default": false, + "examples": [ + "{\n \"skipInitialSpace\": true\n}\n" + ] + }, + "property": { + "type": "string" + }, + "itemType": { + "type": "string", + "enum": [ + "array", + "object" + ] + }, + "itemKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "sheetNumber": { + "type": "integer", + "minimum": 1 + }, + "sheetName": { + "type": "string" + }, + "table": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/public/profiles/2.1/tableschema.json b/public/profiles/2.1/tableschema.json new file mode 100644 index 00000000..77c13313 --- /dev/null +++ b/public/profiles/2.1/tableschema.json @@ -0,0 +1,2737 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Table Schema", + "description": "A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.", + "type": [ + "string", + "object" + ], + "required": [ + "fields" + ], + "properties": { + "$schema": { + "default": "https://datapackage.org/profiles/1.0/tableschema.json", + "propertyOrder": 10, + "title": "Profile", + "description": "The profile of this descriptor.", + "type": "string" + }, + "fields": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Field", + "type": "object", + "oneOf": [ + { + "type": "object", + "title": "String Field", + "description": "The field contains strings, that is, sequences of characters.", + "required": [ + "name" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "categories": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ] + }, + "categoriesOrdered": { + "type": "boolean" + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `string`.", + "enum": [ + "string" + ] + }, + "format": { + "description": "The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.", + "context": "The following `format` options are supported:\n * **default**: any valid string.\n * **email**: A valid email address.\n * **uri**: A valid URI.\n * **binary**: A base64 encoded string representing binary data.\n * **uuid**: A string that is a uuid.", + "enum": [ + "default", + "email", + "uri", + "binary", + "uuid" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `string` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "pattern": { + "type": "string", + "description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.", + "context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"name\",\n \"type\": \"string\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"format\": \"email\"\n}\n", + "{\n \"name\": \"name\",\n \"type\": \"string\",\n \"constraints\": {\n \"minLength\": 3,\n \"maxLength\": 35\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Number Field", + "description": "The field contains numbers of any kind including decimals.", + "context": "The lexical formatting follows that of decimal in [XMLSchema](https://www.w3.org/TR/xmlschema-2/#decimal): a non-empty finite-length sequence of decimal digits separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: '-1.23', '12678967.543233', '+100000.00', '210'.\n\nThe following special string values are permitted (case does not need to be respected):\n - NaN: not a number\n - INF: positive infinity\n - -INF: negative infinity\n\nA number `MAY` also have a trailing:\n - exponent: this `MUST` consist of an E followed by an optional + or - sign followed by one or more decimal digits (0-9)\n - percentage: the percentage sign: `%`. In conversion percentages should be divided by 100.\n\nIf both exponent and percentages are present the percentage `MUST` follow the exponent e.g. '53E10%' (equals 5.3).", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `number`.", + "enum": [ + "number" + ] + }, + "format": { + "description": "There are no format keyword options for `number`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "groupChar": { + "type": "string", + "title": "groupChar", + "description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'." + }, + "decimalChar": { + "type": "string", + "description": "A string whose value is used to represent a decimal point within the number. The default value is `.`." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `number` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "number" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"field-name\",\n \"type\": \"number\"\n}\n", + "{\n \"name\": \"field-name\",\n \"type\": \"number\",\n \"constraints\": {\n \"enum\": [ \"1.00\", \"1.50\", \"2.00\" ]\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Integer Field", + "description": "The field contains integers - that is whole numbers.", + "context": "Integer values are indicated in the standard way for any valid integer.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "categories": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "integer" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer" + }, + "label": { + "type": "string" + } + } + } + } + ] + }, + "categoriesOrdered": { + "type": "boolean" + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `integer`.", + "enum": [ + "integer" + ] + }, + "format": { + "description": "There are no format keyword options for `integer`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "bareNumber": { + "type": "boolean", + "title": "bareNumber", + "description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.", + "default": true + }, + "groupChar": { + "type": "string", + "title": "groupChar", + "description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'." + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `integer` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"age\",\n \"type\": \"integer\",\n \"constraints\": {\n \"unique\": true,\n \"minimum\": 100,\n \"maximum\": 9999\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Date Field", + "description": "The field contains temporal date values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `date`.", + "enum": [ + "date" + ] + }, + "format": { + "description": "The format keyword options for `date` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string of YYYY-MM-DD.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `date` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\"\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"constraints\": {\n \"minimum\": \"01-01-1900\"\n }\n}\n", + "{\n \"name\": \"date_of_birth\",\n \"type\": \"date\",\n \"format\": \"MM-DD-YYYY\"\n}\n" + ] + }, + { + "type": "object", + "title": "Time Field", + "description": "The field contains temporal time values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `time`.", + "enum": [ + "time" + ] + }, + "format": { + "description": "The format keyword options for `time` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for time.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `time` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\"\n}\n", + "{\n \"name\": \"appointment_start\",\n \"type\": \"time\",\n \"format\": \"any\"\n}\n" + ] + }, + { + "type": "object", + "title": "Date Time Field", + "description": "The field contains temporal datetime values.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `datetime`.", + "enum": [ + "datetime" + ] + }, + "format": { + "description": "The format keyword options for `datetime` are `default`, `any`, and `{PATTERN}`.", + "context": "The following `format` options are supported:\n * **default**: An ISO8601 format string for datetime.\n * **any**: Any parsable representation of a date. The implementing library can attempt to parse the datetime via a range of strategies.\n * **{PATTERN}**: The value can be parsed according to `{PATTERN}`, which `MUST` follow the date formatting syntax of C / Python [strftime](http://strftime.org/).", + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `datetime` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\"\n}\n", + "{\n \"name\": \"timestamp\",\n \"type\": \"datetime\",\n \"format\": \"default\"\n}\n" + ] + }, + { + "type": "object", + "title": "Year Field", + "description": "A calendar year, being an integer with 4 digits. Equivalent to [gYear in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYear)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `year`.", + "enum": [ + "year" + ] + }, + "format": { + "description": "There are no format keyword options for `year`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `year` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "integer" + } + } + ] + }, + "minimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMinimum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "exclusiveMaximum": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"year\",\n \"type\": \"year\"\n}\n", + "{\n \"name\": \"year\",\n \"type\": \"year\",\n \"constraints\": {\n \"minimum\": 1970,\n \"maximum\": 2003\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Year Month Field", + "description": "A calendar year month, being an integer with 1 or 2 digits. Equivalent to [gYearMonth in XML Schema](https://www.w3.org/TR/xmlschema-2/#gYearMonth)", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `yearmonth`.", + "enum": [ + "yearmonth" + ] + }, + "format": { + "description": "There are no format keyword options for `yearmonth`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `yearmonth` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\"\n}\n", + "{\n \"name\": \"month\",\n \"type\": \"yearmonth\",\n \"constraints\": {\n \"minimum\": 1,\n \"maximum\": 6\n }\n}\n" + ] + }, + { + "type": "object", + "title": "Boolean Field", + "description": "The field contains boolean (true/false) data.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `boolean`.", + "enum": [ + "boolean" + ] + }, + "format": { + "description": "There are no format keyword options for `boolean`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "trueValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "true", + "True", + "TRUE", + "1" + ] + }, + "falseValues": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "default": [ + "false", + "False", + "FALSE", + "0" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `boolean` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "boolean" + } + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"registered\",\n \"type\": \"boolean\"\n}\n" + ] + }, + { + "type": "object", + "title": "Object Field", + "description": "The field contains data which can be parsed as a valid JSON object.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `object`.", + "enum": [ + "object" + ] + }, + "format": { + "description": "There are no format keyword options for `object`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `object` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + }, + "jsonSchema": { + "type": "object", + "description": "A valid JSON Schema object to validate field values. If a field value conforms to the provided JSON Schema then this field value is valid." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"extra\"\n \"type\": \"object\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoPoint Field", + "description": "The field contains data describing a geographic point.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geopoint`.", + "enum": [ + "geopoint" + ] + }, + "format": { + "description": "The format keyword options for `geopoint` are `default`,`array`, and `object`.", + "context": "The following `format` options are supported:\n * **default**: A string of the pattern 'lon, lat', where `lon` is the longitude and `lat` is the latitude.\n * **array**: An array of exactly two items, where each item is either a number, or a string parsable as a number, and the first item is `lon` and the second item is `lat`.\n * **object**: A JSON object with exactly two keys, `lat` and `lon`", + "notes": [ + "Implementations `MUST` strip all white space in the default format of `lon, lat`." + ], + "enum": [ + "default", + "array", + "object" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geopoint` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\"\n}\n", + "{\n \"name\": \"post_office\",\n \"type\": \"geopoint\",\n \"format\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "GeoJSON Field", + "description": "The field contains a JSON object according to GeoJSON or TopoJSON", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `geojson`.", + "enum": [ + "geojson" + ] + }, + "format": { + "description": "The format keyword options for `geojson` are `default` and `topojson`.", + "context": "The following `format` options are supported:\n * **default**: A geojson object as per the [GeoJSON spec](http://geojson.org/).\n * **topojson**: A topojson object as per the [TopoJSON spec](https://github.com/topojson/topojson-specification/blob/master/README.md)", + "enum": [ + "default", + "topojson" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `geojson` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\"\n}\n", + "{\n \"name\": \"city_limits\",\n \"type\": \"geojson\",\n \"format\": \"topojson\"\n}\n" + ] + }, + { + "type": "object", + "title": "Array Field", + "description": "The field contains data which can be parsed as a valid JSON array.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `array`.", + "enum": [ + "array" + ] + }, + "format": { + "description": "There are no format keyword options for `array`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `array` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array" + } + } + ] + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + }, + "jsonSchema": { + "type": "object", + "description": "A valid JSON Schema object to validate field values. If a field value conforms to the provided JSON Schema then this field value is valid." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"array\"\n}\n" + ] + }, + { + "type": "object", + "title": "List Field", + "description": "The field contains data that is an ordered one-level depth collection of primitive values with a fixed item type.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `list`.", + "enum": [ + "list" + ] + }, + "format": { + "description": "There are no format keyword options for `list`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "delimiter": { + "title": "Delimiter", + "description": "A character sequence to use as the field separator.", + "type": "string", + "default": ",", + "examples": [ + "{\n \"delimiter\": \",\"\n}\n", + "{\n \"delimiter\": \";\"\n}\n" + ] + }, + "itemType": { + "title": "Item type.", + "description": "Specifies the list item type.", + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "datetime", + "date", + "time" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply for `list` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "minLength": { + "type": "integer", + "description": "An integer that specifies the minimum length of a value." + }, + "maxLength": { + "type": "integer", + "description": "An integer that specifies the maximum length of a value." + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"options\"\n \"type\": \"list\"\n}\n" + ] + }, + { + "type": "object", + "title": "Duration Field", + "description": "The field contains a duration of time.", + "context": "The lexical representation for duration is the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) extended format `PnYnMnDTnHnMnS`, where `nY` represents the number of years, `nM` the number of months, `nD` the number of days, 'T' is the date/time separator, `nH` the number of hours, `nM` the number of minutes and `nS` the number of seconds. The number of seconds can include decimal digits to arbitrary precision. Date and time elements including their designator may be omitted if their value is zero, and lower order elements may also be omitted for reduced precision. Here we follow the definition of [XML Schema duration datatype](http://www.w3.org/TR/xmlschema-2/#duration) directly and that definition is implicitly inlined here.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `duration`.", + "enum": [ + "duration" + ] + }, + "format": { + "description": "There are no format keyword options for `duration`: only `default` is allowed.", + "enum": [ + "default" + ], + "default": "default" + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints are supported for `duration` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "exclusiveMinimum": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "string" + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"period\"\n \"type\": \"duration\"\n}\n" + ] + }, + { + "type": "object", + "title": "Any Field", + "description": "Any value is accepted, including values that are not captured by the type/format/constraint requirements of the specification.", + "required": [ + "name", + "type" + ], + "properties": { + "name": { + "title": "Name", + "description": "A name for this field.", + "type": "string" + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "example": { + "title": "Example", + "description": "An example value for the field.", + "type": "string", + "examples": [ + "{\n \"example\": \"Put here an example value for your field\"\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "type": { + "description": "The type keyword, which `MUST` be a value of `any`.", + "enum": [ + "any" + ] + }, + "constraints": { + "title": "Constraints", + "description": "The following constraints apply to `any` fields.", + "type": "object", + "properties": { + "required": { + "type": "boolean", + "description": "Indicates whether a property must have a value for each instance.", + "context": "An empty string is considered to be a missing value." + }, + "unique": { + "type": "boolean", + "description": "When `true`, each value for the property `MUST` be unique." + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + } + } + }, + "rdfType": { + "type": "string", + "description": "The RDF type for this field." + } + }, + "examples": [ + "{\n \"name\": \"notes\",\n \"type\": \"any\"\n" + ] + } + ] + }, + "description": "An `array` of Table Schema Field objects.", + "examples": [ + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\"\n }\n ]\n}\n", + "{\n \"fields\": [\n {\n \"name\": \"my-field-name\",\n \"type\": \"number\"\n },\n {\n \"name\": \"my-field-name-2\",\n \"type\": \"string\",\n \"format\": \"email\"\n }\n ]\n}\n" + ] + }, + "fieldsMatch": { + "type": "string", + "enum": [ + "exact", + "equal", + "subset", + "superset", + "partial" + ], + "default": "exact" + }, + "primaryKey": { + "oneOf": [ + { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ], + "description": "A primary key is a field name or an array of field names, whose values `MUST` uniquely identify each row in the table.", + "context": "Field name in the `primaryKey` `MUST` be unique, and `MUST` match a field name in the associated table. It is acceptable to have an array with a single value, indicating that the value of a single field is the primary key.", + "examples": [ + "{\n \"primaryKey\": [\n \"name\"\n ]\n}\n", + "{\n \"primaryKey\": [\n \"first_name\",\n \"last_name\"\n ]\n}\n" + ] + }, + "uniqueKeys": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string" + } + } + }, + "foreignKeys": { + "type": "array", + "minItems": 1, + "items": { + "title": "Table Schema Foreign Key", + "description": "Table Schema Foreign Key", + "type": "object", + "required": [ + "fields", + "reference" + ], + "oneOf": [ + { + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string", + "minItems": 1, + "uniqueItems": true, + "description": "Fields that make up the primary key." + } + }, + "reference": { + "type": "object", + "required": [ + "fields" + ], + "properties": { + "resource": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + } + } + } + } + }, + { + "properties": { + "fields": { + "type": "string", + "description": "Fields that make up the primary key." + }, + "reference": { + "type": "object", + "required": [ + "fields" + ], + "properties": { + "resource": { + "type": "string" + }, + "fields": { + "type": "string" + } + } + } + } + } + ] + }, + "examples": [ + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"resource\": \"the-resource\",\n \"fields\": \"state_id\"\n }\n }\n ]\n}\n", + "{\n \"foreignKeys\": [\n {\n \"fields\": \"state\",\n \"reference\": {\n \"fields\": \"id\"\n }\n }\n ]\n}\n" + ] + }, + "missingValues": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "label": { + "type": "string" + } + } + } + } + ], + "default": [ + "" + ], + "description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.", + "context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).", + "examples": [ + "{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n", + "{\n \"missingValues\": []\n}\n" + ] + }, + "name": { + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "description": { + "title": "Description", + "description": "A text description. Markdown is encouraged.", + "type": "string", + "examples": [ + "{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n" + ] + }, + "homepage": { + "title": "Home Page", + "description": "The home on the web that is related to this descriptor.", + "type": "string", + "format": "uri", + "examples": [ + "{\n \"homepage\": \"http://example.com/\"\n}\n" + ] + }, + "created": { + "title": "Created", + "description": "The datetime on which this descriptor was created.", + "context": "The datetime must conform to the string formats for datetime as described in [RFC3339](https://tools.ietf.org/html/rfc3339#section-5.6)", + "type": "string", + "format": "date-time", + "examples": [ + "{\n \"created\": \"1985-04-12T23:20:50.52Z\"\n}\n" + ] + }, + "version": { + "title": "Version", + "description": "A unique version number for this descriptor.", + "type": "string", + "examples": [ + "{\n \"version\": \"0.0.1\"\n}\n", + "{\n \"version\": \"1.0.1-beta\"\n}\n" + ] + }, + "keywords": { + "title": "Keywords", + "description": "A list of keywords that describe this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + }, + "examples": [ + "{\n \"keywords\": [\n \"data\",\n \"fiscal\",\n \"transparency\"\n ]\n}\n" + ] + }, + "contributors": { + "title": "Contributors", + "description": "The contributors to this descriptor.", + "type": "array", + "minItems": 1, + "items": { + "title": "Contributor", + "description": "A contributor to this descriptor.", + "properties": { + "title": { + "title": "Title", + "description": "A human-readable title.", + "type": "string", + "examples": [ + "{\n \"title\": \"My Package Title\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + }, + "email": { + "title": "Email", + "description": "An email address.", + "type": "string", + "format": "email", + "examples": [ + "{\n \"email\": \"example@example.com\"\n}\n" + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "type": "string" + }, + "organization": { + "title": "Organization", + "description": "An organizational affiliation for this contributor.", + "type": "string" + }, + "roles": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + }, + "minProperties": 1, + "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." + }, + "examples": [ + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\"\n }\n ]\n}\n", + "{\n \"contributors\": [\n {\n \"title\": \"Joe Bloggs\",\n \"email\": \"joe@example.com\",\n \"role\": \"author\"\n }\n ]\n}\n" + ] + }, + "examples": { + "title": "Examples", + "description": "A list of Data Resources that use and illustrate the schema.", + "type": "array", + "minItems": 0, + "items": { + "title": "Example", + "description": "A Data Resource that uses and illustrates the schema.", + "type": "object", + "properties": { + "name": { + "title": "Name", + "description": "An identifier string.", + "type": "string", + "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", + "examples": [ + "{\n \"name\": \"my-nice-name\"\n}\n" + ] + }, + "path": { + "title": "Path", + "description": "A fully qualified URL, or a POSIX file path.", + "type": "string", + "pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$", + "examples": [ + "{\n \"path\": \"file.csv\"\n}\n", + "{\n \"path\": \"http://example.com/file.csv\"\n}\n" + ], + "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." + } + }, + "required": [ + "name", + "path" + ] + }, + "examples": [ + "{\n \"examples\": [\n {\n \"name\": \"valid-data\",\n \"path\": \"http://example.com/valid-data.csv\"\n }\n ]\n}\n" + ] + } + }, + "examples": [ + "{\n \"schema\": {\n \"fields\": [\n {\n \"name\": \"first_name\",\n \"type\": \"string\"\n \"constraints\": {\n \"required\": true\n }\n },\n {\n \"name\": \"age\",\n \"type\": \"integer\"\n },\n ],\n \"primaryKey\": [\n \"name\"\n ]\n }\n}\n" + ] +} \ No newline at end of file