Skip to content

Commit

Permalink
Update term schema for media types (#653)
Browse files Browse the repository at this point in the history
* update term schema for media types

* change photo to image

Co-authored-by: Pierre-Anthony Lemieux <[email protected]>

* change "photo" to "image"

* update terms test

---------

Co-authored-by: Pierre-Anthony Lemieux <[email protected]>
  • Loading branch information
SteveLLamb and palemieux authored Jun 20, 2023
1 parent 8333b23 commit a690a31
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
11 changes: 11 additions & 0 deletions src/main/data/terms.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@
},
{
"definition": "The DX115DC system, manufactured by CRU, Inc., consists of portable cartridges into which 2.5in or 3.5in SATA hard drives can be installed, and readers that are integrated into DCP servers and TMS computers. Its purpose is to protect drives in shipping, and to enable quick and easy insertion and removal of DCP hard drives in the theater. External readers with USB connectivity are available for use with servers that do not have them built in. CRU DX115DC cartridges are the industry standard for the distribution of DCPs on physical media, used by all the major studios and many independent distributors.",
"media": {
"image": [
"https://www.cru-inc.com/scripts/thumbnail.php?w=800&h=450&pic=/product_image_galleries/Digital_Cinema_DX115/2-Data_Express_DX115_Carrier.png",
"https://www.cru-inc.com/scripts/thumbnail.php?w=800&h=450&pic=/product_image_galleries/Digital_Cinema_DX115/1-Data_Express_DX115.png"
]
},
"relatedTerms": [
"DCP Server",
"Theater Management System"
Expand Down Expand Up @@ -474,6 +480,11 @@
"abbreviations": [
"IAB"
],
"media": {
"video": [
"https://www.youtube.com/embed/U50WYIvo98k"
]
},
"sources": [
"https://doi.org/10.5594/SMPTE.RDD57.2021"
],
Expand Down
39 changes: 31 additions & 8 deletions src/main/schemas/terms.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/schema#",
"$id": "http://isdcf.com/ns/json-schemas/registries/terms/1.0.0-beta.1",
"$id": "http://isdcf.com/ns/json-schemas/registries/terms/1.0.0-beta.2",
"$comment": "Copyright, ISDCF <[email protected]>",
"title": "Schema for the Terms Registry of the ISDCF",
"type": "array",
Expand All @@ -16,13 +16,36 @@
"definition": {
"type": "string"
},
"media": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
}
},
"media": {
"type": "object",
"additionalProperties": false,
"properties": {
"image": {
"type": "array",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "string",
"format": "uri"
}
]
}
},
"video": {
"type": "array",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "string",
"format": "uri"
}
]
}
}
}
},
"relatedTerms": {
"type": "array",
"items": {
Expand Down
5 changes: 4 additions & 1 deletion src/main/scripts/terms.validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ module.exports = async (registry, name) => {
}
let media = registry[e].media
for (let m in media) {
urls.push(media[m])
let ms = media[m]
for (let s in ms) {
urls.push(ms[s])
}
}
}
const badURLs = await areBadURLs(urls);
Expand Down

0 comments on commit a690a31

Please sign in to comment.