{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://wurl.com/epg-ingestion-schema.json", "definitions": { "program": { "type": "object", "properties": { "key": { "$ref": "#/definitions/string_255_not_null" }, "title": { "$ref": "#/definitions/string_255_not_null" }, "short_description": { "$ref": "#/definitions/string_255" }, "description": {"type": "string"}, "content_type": { "type": "string", "enum": ["episode", "movie", "shortFormVideo", "tvSpecial"] }, "iab_categories": { "type": "array", "items": [ { "$ref": "#/definitions/string_255" } ] }, "release_date": { "$ref": "#/definitions/release_date" }, "thumbnails": { "type": "array", "items": [ { "$ref": "#/definitions/thumbnail" } ] }, "genres": { "type": "array", "items": [ { "$ref": "#/definitions/genre" } ] }, "ratings": { "type": "array", "items": [ { "type": "object", "properties": { "source": {"type": "string"}, "rating": {"type": "string"} }, "required": ["source", "rating"] } ] }, "credits": { "type": "array", "items": [ { "type": "object", "properties": { "name": {"type": "string"}, "role": { "type": "string", "enum": ["actor", "director", "producer", "writer", "author"] }, "description": { "type": "string" } }, "required": ["name", "role"] } ] }, "series": { "type": "object", "properties": { "title": { "$ref": "#/definitions/string_255_not_null" }, "release_date": { "$ref": "#/definitions/release_date" }, "description": {"type": "string"}, "studio": { "$ref": "#/definitions/string_255" }, "thumbnails": { "type": "array", "items": [ { "$ref": "#/definitions/thumbnail" } ] }, "season": { "type": "object", "properties": { "title": { "$ref": "#/definitions/string_255" }, "number": {"type": "integer"}, "episode_number": {"type": "integer"}, "release_date": { "$ref": "#/definitions/release_date" } }, "required": ["number", "episode_number"] } }, "required": ["description", "thumbnails", "season"] } }, "required": ["key", "title", "content_type", "thumbnails"] }, "event": { "type": "object", "oneOf": [ { "properties": { "program_key": { "$ref": "#/definitions/string_255_not_null" }, "time_slot": {"type": "string", "format": "date-time"}, "duration": { "$ref": "#/definitions/duration" } }, "required": ["program_key", "time_slot", "duration"] }, { "properties": { "episode_guid": { "$ref": "#/definitions/string_255_not_null" }, "time_slot": {"type": "string", "format": "date-time"}, "duration": { "$ref": "#/definitions/duration" } }, "required": ["episode_guid", "time_slot", "duration"] } ] }, "wurl_episode": { "type": "object", "properties": { "title": { "type": "string" }, "guid": { "$ref": "#/definitions/string_255_not_null" }, "duration": { "$ref": "#/definitions/duration" } }, "required": ["guid", "duration"] }, "genre": { "type": "object", "properties": { "source": { "$ref": "#/definitions/string_255_not_null" }, "key": { "$ref": "#/definitions/string_255_not_null" }, "name": { "$ref": "#/definitions/string_255" } }, "required": ["source", "key"] }, "thumbnail": { "type": "object", "properties": { "url": { "$ref": "#/definitions/url" }, "type": {"type": "string"}, "width": {"type": "integer"}, "height": {"type": "integer"}, "ratio": {"type": "string"} }, "required": ["url", "width", "height"] }, "string_255": { "type": "string", "maxLength": 255 }, "string_255_not_null": { "type": "string", "minLength": 1, "maxLength": 255 }, "duration": { "type": "integer", "exclusiveMinimum": 180, "exclusiveMaximum": 21600 }, "url": { "type": "string", "pattern": "https?:\/\/[\\S]+" }, "release_date": { "type": "string", "format": "date" }, "language": { "type": "string", "enum": ["ab","aa", "af", "ak", "sq", "am","ar", "an", "hy", "as", "av","ae", "ay", "az", "bm", "ba","eu", "be", "bn", "bh", "bi","bs", "br", "bg", "my", "ca","ch", "ce", "ny", "zh", "zh","cv", "kw", "co", "cr", "hr","cs", "da", "dv", "nl", "dz","en", "eo", "et", "ee", "fo","fj", "fi", "fr", "ff", "gl","gd", "gv", "ka", "de", "el","kl", "gn", "gu", "ht", "ha","he", "hz", "hi", "ho", "hu","is", "io", "ig", "id", "in", "ia", "ie", "iu", "ik", "ga","it", "ja", "jv", "kl", "kn","kr", "ks", "kk", "km", "ki","rw", "rn", "ky", "kv", "kg","ko", "ku", "kj", "lo", "la","lv", "li", "ln", "lt", "lu","lg", "lb", "gv", "mk", "mg","ms", "ml", "mt", "mi", "mr","mh", "mo", "mn", "na", "nv","ng", "nd", "ne", "no", "nb","nn", "ii", "oc", "oj", "cu","or", "om", "os", "pi", "ps","fa", "pl", "pt", "pa", "qu","rm", "ro", "ru", "se", "sm","sg", "sa", "sr", "sh", "st","tn", "sn", "ii", "sd", "si","ss", "sk", "sl", "so", "nr","es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt","te", "th", "bo", "ti", "to","ts", "tr", "tk", "tw", "ug","uk", "ur", "uz", "ve", "vi","vo", "wa", "cy", "wo", "fy","xh", "yi", "ji", "yo", "za","zu"] } }, "type": "object", "properties": { "channel": { "type": "object", "oneOf": [ { "properties": { "wurl_channel_slug": { "$ref": "#/definitions/string_255_not_null" }, "title": { "$ref": "#/definitions/string_255_not_null" }, "broadcast_url": { "$ref": "#/definitions/url" }, "language": { "$ref": "#/definitions/language" }, "genres": {"type": "array", "items": [ { "$ref": "#/definitions/genre"} ] }, "events": {"type": "array", "items": [ {"$ref": "#/definitions/event"} ] }, "programs": {"type": "array", "items": [ {"$ref": "#/definitions/program"} ] } }, "required": ["wurl_channel_slug", "title", "broadcast_url", "language", "programs", "events"] }, { "properties": { "wurl_channel_slug": { "$ref": "#/definitions/string_255_not_null" }, "title": { "$ref": "#/definitions/string_255_not_null" }, "broadcast_url": { "$ref": "#/definitions/url" }, "language": { "$ref": "#/definitions/language" }, "genres": {"type": "array", "items": [ { "$ref": "#/definitions/genre"} ] }, "events": {"type": "array", "items": [ {"$ref": "#/definitions/event"} ] }, "wurl_episodes": {"type": "array", "items": [ {"$ref": "#/definitions/wurl_episode"} ] } }, "required": ["wurl_channel_slug", "title", "broadcast_url", "language", "wurl_episodes", "events"] } ] } }, "required": ["channel"] }