appview/lexicons/my/spoor/content/media.json
Julia Lange f8ff1d63ce
Lexicons, 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
2025-05-07 16:47:30 -07:00

53 lines
1.3 KiB
JSON

{
"lexicon": 1,
"id": "my.spoor.content.media",
"defs": {
"main": {
"type": "record",
"key": "nsid",
"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"
}
}
}
},
"television": {
"type": "object",
"properties": {
"episodes": { "type": "integer", "minimum": 0}
}
},
"book": {
"type": "object",
"properties": {
"chapters": { "type": "integer", "minimum": 0}
}
}
}
}