content, use primary types, move title to defs
So I sort of used "object" instead of "record" because I thought key was an option type ^_^ So I had to fix that. Also moves title to defs because it is not supposed to be a record
This commit is contained in:
parent
60262fed0c
commit
0beee2c8d0
4 changed files with 83 additions and 72 deletions
31
lexicons/my/spoor/content/defs.json
Normal file
31
lexicons/my/spoor/content/defs.json
Normal file
|
|
@ -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" }
|
||||
}
|
||||
}
|
||||
|
|
@ -3,9 +3,11 @@
|
|||
"id": "my.spoor.content.external",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "nsid",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": [ "source", "queryable" ],
|
||||
"key": "nsid",
|
||||
"properties": {
|
||||
"source": {
|
||||
"type": "string",
|
||||
|
|
@ -17,12 +19,14 @@
|
|||
},
|
||||
"queryable": {
|
||||
"type": "union",
|
||||
"description": "All the data needed to query the content from the source"
|
||||
"description": "All the data needed to query the content from the source",
|
||||
"refs": []
|
||||
},
|
||||
"overrides": {
|
||||
"type": "object",
|
||||
"type": "union",
|
||||
"description": "User defined overrides for the returned content",
|
||||
"properties": {}
|
||||
"refs": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,16 +3,18 @@
|
|||
"id": "my.spoor.content.media",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "object",
|
||||
"type": "record",
|
||||
"key": "nsid",
|
||||
"required": [ "titles", "durationData", "lastUpdated" ],
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": [ "titles", "lastUpdated" ],
|
||||
"properties": {
|
||||
"titles": {
|
||||
"type": "array",
|
||||
"minLength": 1,
|
||||
"items": {
|
||||
"type": "ref",
|
||||
"ref": "my.spoor.content.title"
|
||||
"ref": "my.spoor.content.defs#title"
|
||||
}
|
||||
},
|
||||
"durationData": {
|
||||
|
|
@ -33,6 +35,7 @@
|
|||
"description": "Client-declared timestamp for when this activity was last updated"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"television": {
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -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" }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue