Definition

The definitions module adds named subschemas to the DataCatalog namespace. Definitions can range from simple enumerations or formats to compositions of JSON references.

Examples

temperature_unit
1
2
3
4
5
6
7
8
{
    "description": "unit of measurement for temperature",
    "enum": [
        "celsius",
        "fahrenheit"
    ],
    "type": "string"
}
temperature
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
    "description": "A growth condition or measurement temperature",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "value": {
            "description": "Numeric value",
            "type": "number"
        },
        "unit": {
            "$ref": "temperature_unit.json"
        }
    },
    "required": [
        "value",
        "unit"
    ]
}

Adding a sub-schema

To add a new subschema, create a new JSON document in the jsondocs directory and populate it with valid JSONschema. It is possible and encouraged to link with the rest of the SD2E schema for context and ease of validation.

Documentation

For details, please consult the datacatalog.definitions API documentation.