diff --git a/lexicons/my/spoor/content/defs.json b/lexicons/my/spoor/content/defs.json new file mode 100644 index 0000000..f13f8fd --- /dev/null +++ b/lexicons/my/spoor/content/defs.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "my.spoor.content.defs", + "defs": { + "title": { + "type": "object", + "properties": { + "translationType": { + "type": "string", + "format": "nsid", + "knownValues": [ + "my.spoor.content.defs#titleHomophonic", + "my.spoor.content.defs#titleNative", + "my.spoor.content.defs#titleTranslation" + ] + }, + "lang": { + "type": "string", + "format": "language" + }, + "value": { "type": "string", "minLength": 1 } + } + }, + "titleHomophonic": { "type": "token", + "description": "A phonetic transcription of the native title such that when read it will sound like the native title." }, + "titleNative": { "type": "token", + "description": "The title in its native script" }, + "titleTranslation": { "type": "token", + "description": "A translation of the title" } + } +} diff --git a/lexicons/my/spoor/content/external.json b/lexicons/my/spoor/content/external.json index ae74ab0..6cd4f52 100644 --- a/lexicons/my/spoor/content/external.json +++ b/lexicons/my/spoor/content/external.json @@ -3,26 +3,30 @@ "id": "my.spoor.content.external", "defs": { "main": { - "type": "object", - "required": [ "source", "queryable" ], + "type": "record", "key": "nsid", - "properties": { - "source": { - "type": "string", - "description": "An nsid for a specific data source. The domain authority governs how to process the queryable", - "format": "nsid", - "knownValues": [ - "my.spoor.content.external#tvdb" - ] - }, - "queryable": { - "type": "union", - "description": "All the data needed to query the content from the source" - }, - "overrides": { - "type": "object", - "description": "User defined overrides for the returned content", - "properties": {} + "record": { + "type": "object", + "required": [ "source", "queryable" ], + "properties": { + "source": { + "type": "string", + "description": "An nsid for a specific data source. The domain authority governs how to process the queryable", + "format": "nsid", + "knownValues": [ + "my.spoor.content.external#tvdb" + ] + }, + "queryable": { + "type": "union", + "description": "All the data needed to query the content from the source", + "refs": [] + }, + "overrides": { + "type": "union", + "description": "User defined overrides for the returned content", + "refs": [] + } } } } diff --git a/lexicons/my/spoor/content/media.json b/lexicons/my/spoor/content/media.json index 3f18ad8..ec383d1 100644 --- a/lexicons/my/spoor/content/media.json +++ b/lexicons/my/spoor/content/media.json @@ -3,34 +3,37 @@ "id": "my.spoor.content.media", "defs": { "main": { - "type": "object", + "type": "record", "key": "nsid", - "required": [ "titles", "durationData", "lastUpdated" ], - "properties": { - "titles": { - "type": "array", - "minLength": 1, - "items": { - "type": "ref", - "ref": "my.spoor.content.title" + "record": { + "type": "object", + "required": [ "titles", "lastUpdated" ], + "properties": { + "titles": { + "type": "array", + "minLength": 1, + "items": { + "type": "ref", + "ref": "my.spoor.content.defs#title" + } + }, + "durationData": { + "type": "union", + "refs": [ + "my.spoor.content.media#television", + "my.spoor.content.media#book" + ] + }, + "posterImage": { + "type": "blob", + "accept": ["image/png", "image/jpeg"], + "maxSize": 1000000 + }, + "lastUpdated": { + "type": "string", + "format": "datetime", + "description": "Client-declared timestamp for when this activity was last updated" } - }, - "durationData": { - "type": "union", - "refs": [ - "my.spoor.content.media#television", - "my.spoor.content.media#book" - ] - }, - "posterImage": { - "type": "blob", - "accept": ["image/png", "image/jpeg"], - "maxSize": 1000000 - }, - "lastUpdated": { - "type": "string", - "format": "datetime", - "description": "Client-declared timestamp for when this activity was last updated" } } }, diff --git a/lexicons/my/spoor/content/title.json b/lexicons/my/spoor/content/title.json deleted file mode 100644 index 48f338d..0000000 --- a/lexicons/my/spoor/content/title.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "lexicon": 1, - "id": "my.spoor.content.title", - "defs": { - "main": { - "type": "object", - "properties": { - "language": { - "type": "string", - "format": "nsid", - "knownValues": [ - "my.spoor.content.title#romanization", - "my.spoor.content.title#english", - "my.spoor.content.title#native" - ] - }, - "value": { "type": "string", "minLength": 1 } - } - }, - "romanization": { "type": "token", - "description": "Romanization of the native title" }, - "english": { "type": "token", - "description": "English translation or title" }, - "native": { "type": "token", - "description": "Native title" } - } -}