Skip to content

Commit

Permalink
Adding specific resource to body
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson committed Mar 9, 2023
1 parent 6a6d937 commit 9c074fc
Showing 1 changed file with 64 additions and 46 deletions.
110 changes: 64 additions & 46 deletions schema/iiif_3_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,55 +194,73 @@
"required": ["type", "items"]
},
"resource": {
"title": "ContentResource",
"if": {
"type": "object",
"properties": {
"type": { "const": "TextualBody" }
}
},
"then": {
"title": "Annotation bodies which are TextualBody MUST have an type and value property.",
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"type": "string",
"pattern": "^TextualBody$",
"default": "TextualBody"
"allOf": [
{
"title": "ContentResource",
"if": {
"type": "object",
"properties": {
"type": { "const": "TextualBody" }
}
},
"value": { "type": "string" },
"format": { "$ref": "#/types/format" },
"language": { "type": "string"}
"then": {
"title": "Annotation bodies which are TextualBody MUST have an type and value property.",
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"type": "string",
"pattern": "^TextualBody$",
"default": "TextualBody"
},
"value": { "type": "string" },
"format": { "$ref": "#/types/format" },
"language": { "type": "string"}
},
"required": ["value", "type"]
}
},
"required": ["value", "type"]
},
"else": {
"title": "ContentResource: (not a TextualBody): ",
"description": "Annotation bodies MUST have an id and type property.",
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"type": "string"
},
"height": { "$ref": "#/types/dimension" },
"width": { "$ref": "#/types/dimension" },
"duration": { "$ref": "#/types/duration" },
"language": { "type": "string"},
"rendering": { "$ref": "#/types/external" },
"service": { "$ref": "#/classes/service" },
"format": { "$ref": "#/types/format" },
"label": {"$ref": "#/types/lngString" },
"thumbnail": {
"type": "array",
"items": { "$ref": "#/classes/resource" }
{
"title": "SpecificResource",
"if": {
"type":"object",
"properties": {
"type": {
"type": "string",
"const": "SpecificResource"
}
}
},
"annotations": { "$ref": "#/types/annotationsLink" }
"then": {
"$ref": "#/classes/specificResource"
}
},
"required": ["id", "type"]
}

{
"title": "ContentResource: (not a TextualBody): ",
"description": "Annotation bodies MUST have an id and type property.",
"type": "object",
"properties": {
"id": { "$ref": "#/types/id" },
"type": {
"type": "string"
},
"height": { "$ref": "#/types/dimension" },
"width": { "$ref": "#/types/dimension" },
"duration": { "$ref": "#/types/duration" },
"language": { "type": "string"},
"rendering": { "$ref": "#/types/external" },
"service": { "$ref": "#/classes/service" },
"format": { "$ref": "#/types/format" },
"label": {"$ref": "#/types/lngString" },
"thumbnail": {
"type": "array",
"items": { "$ref": "#/classes/resource" }
},
"annotations": { "$ref": "#/types/annotationsLink" }
},
"required": ["id", "type"]
}
]
},
"imgSvr": {
"allOf": [
Expand Down Expand Up @@ -1013,7 +1031,7 @@
}
}
},
"required": ["source", "selector"]
"required": ["source"]
},
"selector": {
"allOf": [
Expand Down

0 comments on commit 9c074fc

Please sign in to comment.