Created
October 15, 2020 15:03
-
-
Save kratsg/54aafa0878fcb399ce00e2a6034e1fdc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"$id": "http://example.com/measurement.json", | |
"type": "object", | |
"title": "The root schema", | |
"description": "The root schema comprises the entire JSON document.", | |
"default": {}, | |
"required": [ | |
"metadata", | |
"data" | |
], | |
"properties": { | |
"metadata": { | |
"$id": "#/properties/metadata", | |
"type": "object", | |
"title": "The metadata schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"additionalProperties": true | |
}, | |
"data": { | |
"$id": "#/properties/data", | |
"type": "array", | |
"title": "The data schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": [], | |
"additionalItems": true, | |
"items": { | |
"$id": "#/properties/data/items", | |
"anyOf": [ | |
{ | |
"$id": "#/properties/data/items/anyOf/0", | |
"type": "object", | |
"title": "The first anyOf schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"required": [ | |
"measurement", | |
"unit", | |
"values" | |
], | |
"properties": { | |
"measurement": { | |
"$id": "#/properties/data/items/anyOf/0/properties/measurement", | |
"type": "string", | |
"title": "The measurement schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "" | |
}, | |
"unit": { | |
"$id": "#/properties/data/items/anyOf/0/properties/unit", | |
"type": "string", | |
"title": "The unit schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "" | |
}, | |
"values": { | |
"$id": "#/properties/data/items/anyOf/0/properties/values", | |
"type": "array", | |
"title": "The values schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": [], | |
"additionalItems": true, | |
"items": { | |
"$id": "#/properties/data/items/anyOf/0/properties/values/items", | |
"anyOf": [ | |
{ | |
"$id": "#/properties/data/items/anyOf/0/properties/values/items/anyOf/0", | |
"type": "number", | |
"title": "The first anyOf schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": 0.0 | |
} | |
] | |
} | |
} | |
}, | |
"additionalProperties": true | |
} | |
] | |
} | |
} | |
}, | |
"additionalProperties": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment