Fairspec Data Schema
Updated Nov 12, 2026
| Authors | Evgeny Karev |
|---|---|
| Profile | https://fairspec.org/profiles/latest/data-schema.json |
Fairspec Data Schema is a simple JSON-based format that defines Data Schema to describe a class of structured data resources. It is fully compatible with the JSON Schema standard.
Language
The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in RFC 2119.
Descriptor
A Fairspec Data Schema is a JSON resource that MUST be an object compatible with the Data Schema structure outlined below.
Data Schema
A top-level descriptor object defining a schema of structured data resources. This includes a JSON file whose top-level value is an object, read without a jsonPointer: such a file is not a table, so a Table Schema does not apply to it. It MAY have the following properties (all optional unless otherwise stated):
$schema [#profile]
External Path to one of the officially published Fairspec Data Schema profiles or https://json-schema.org/draft/2020-12/schema with default value https://fairspec.org/profiles/latest/data-schema.json. Every one of them is the JSON Schema 2020-12 dialect: a Data Schema whose $schema names any other dialect, such as http://json-schema.org/draft-07/schema#, MUST be reported as a metadata error at $schema.
For example for version X.Y.Z of the profile:
{
"$schema": "https://fairspec.org/profiles/X.Y.Z/data-schema.json"
}<jsonSchema>
Data Schema supports all the properties defined in Json Schema Draft 2020-12, with these rules:
- A subschema
MAYbe a boolean schema,trueorfalse, as JSON Schema 2020-12 allows; the Data Schema itself is an object formatis asserted, not only annotated: a Data Schema is validated as with the Format-Assertion vocabulary of JSON Schema 2020-12 enabled, so a value that does not match aformatthe implementation knows is an error- A
$refMUSTresolve within the Data Schema itself, such as#/$defs/item. An implementationMUST NOTfetch a remote reference, and a$refthat does not resolve within the documentMUSTbe reported as a metadata error at the$ref
For example:
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"age": {
"type": "integer"
}
}
}Common
Common properties shared by multiple entities in the descriptor.
External Path
It MUST be a string representing an HTTP or HTTPS URL to a remote file.
For example:
{
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Extension
Properties not defined by this specification are allowed, as in JSON Schema, so that a descriptor written for a later version stays readable: an implementation MUST ignore them and MAY warn about them. Fairspec Data Schema has no extension mechanism: such properties carry no meaning.
Comparison
Created with ❤ and Livemark