UNPKG

@bbc/object-based-media-schema

Version:

JSON schemas which describe a common language for object-based media

92 lines (91 loc) 3.31 kB
{ "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "ptp_timestamp": { "type": "string", "pattern": "^[0-9]+:[0-9]{1,9}$" }, "uuid": { "type": "string", "pattern": "^[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-4[A-Fa-f0-9]{3}-[89aAbB][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$" }, "date": { "type": "string", "pattern": "^(?:(?:31(\/|-|\\.)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)(\/|-|\\.)(?:0?[1,3-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29(\/|-|\\.)0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])(\/|-|\\.)(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$" }, "time": { "type": "string", "pattern": "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$" }, "gps": { "type": "string", "pattern": "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?),\\s*[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" }, "tags": { "type": "object", "description": "Dictionary of arrays of tags", "patternProperties": { ".{1,}": { "type": "array", "items": { "title": "tag", "type": "string" } } } }, "schema_version": { "type": "string", "description": "Version of schema that this object validates against", "pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" }, "full_base": { "type": "object", "properties": { "id": { "$ref": "#/definitions/uuid" }, "name": { "type": "string", "description": "Name to use in editing tools" }, "description": { "type": "string", "description": "Description to use in editing tools" }, "version": { "$ref": "#/definitions/ptp_timestamp", "description": "Time of last update to this object in PTP TAI timestamp format" }, "tags": { "$ref": "#/definitions/tags" }, "meta": { "$ref": "/meta/meta.json#" }, "schema_version": { "$ref": "#/definitions/schema_version" } }, "required": ["id", "version", "name", "tags", "object_class", "schema_version"] }, "update_base": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "tags": { "$ref": "#/definitions/tags" }, "meta": { "$ref": "/meta/meta.json#" } }, "required": ["name", "tags"] } } }