Created
August 21, 2018 13:15
-
-
Save dmj/1627caac689c7e5902e2f46eb9a755f7 to your computer and use it in GitHub Desktop.
Schema for the IIIF Image API image information metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"title": "IIIF Image API 2.1", | |
"description": "Schema for the IIIF Image API image information metadata", | |
"definitions": { | |
"attribution": { | |
"oneOf": [ | |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/attributionValue" | |
} | |
}, | |
{ | |
"$ref": "#/definitions/attributionValue" | |
} | |
] | |
}, | |
"attributionValue": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"$ref": "#/definitions/localizedString" | |
} | |
] | |
}, | |
"logo": { | |
"oneOf": [ | |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/logoValue" | |
} | |
}, | |
{ | |
"$ref": "#/definitions/logoValue" | |
} | |
] | |
}, | |
"logoValue": { | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "object", | |
"required": ["@id", "service"], | |
"additionalProperties": false, | |
"properties": { | |
"@id": { | |
"type": "string" | |
}, | |
"service": { | |
"type": "object", | |
"required": ["@context", "@id", "profile"], | |
"additionalProperties": false, | |
"properties": { | |
"@context": { | |
"const": "http://iiif.io/api/image/2/context.json" | |
}, | |
"@id": { | |
"type": "string" | |
}, | |
"profile": { | |
"type": "string", | |
"enum": [ | |
"http://iiif.io/api/image/2/level0.json", | |
"http://iiif.io/api/image/2/level1.json", | |
"http://iiif.io/api/image/2/level2.json" | |
] | |
} | |
} | |
} | |
} | |
} | |
] | |
}, | |
"license": { | |
"oneOf": [ | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"localizedString": { | |
"type": "object", | |
"required": ["@value", "@language"], | |
"additionalProperties": false, | |
"properties": { | |
"@value": { | |
"type": "string" | |
}, | |
"@language": { | |
"type": "string" | |
} | |
} | |
}, | |
"profile": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "string", | |
"enum": [ | |
"http://iiif.io/api/image/2/level0.json", | |
"http://iiif.io/api/image/2/level1.json", | |
"http://iiif.io/api/image/2/level2.json" | |
] | |
} | |
], | |
"additionalItems": { | |
"type": "object", | |
"required": [], | |
"properties": { | |
"formats": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"maxArea": { | |
"type": "integer" | |
}, | |
"maxHeight": { | |
"type": "integer" | |
}, | |
"maxWidth": { | |
"type": "integer" | |
}, | |
"qualities": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"enum": [ | |
"color", "gray", "bitonal", "default" | |
] | |
} | |
}, | |
"supports": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"additionalProperties": false | |
} | |
} | |
}, | |
"type": "object", | |
"required": ["@context", "@id", "protocol", "width", "height", "profile"], | |
"additionalProperties": false, | |
"properties": { | |
"@context": { | |
"const": "http://iiif.io/api/image/2/context.json" | |
}, | |
"@id": { | |
"type": "string" | |
}, | |
"protocol": { | |
"const": "http://iiif.io/api/image" | |
}, | |
"width": { | |
"type": "integer" | |
}, | |
"height": { | |
"type": "integer" | |
}, | |
"profile": { | |
"$ref": "#/definitions/profile" | |
}, | |
"@type": { | |
"const": "iiif:Image" | |
}, | |
"sizes": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": ["width", "height"], | |
"additionalProperties": false, | |
"properties": { | |
"width": { | |
"type": "integer" | |
}, | |
"height": { | |
"type": "integer" | |
}, | |
"@type": { | |
"const": "iiif:Size" | |
} | |
} | |
} | |
}, | |
"tiles": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": ["scaleFactors", "width"], | |
"additionalProperties": false, | |
"properties": { | |
"scaleFactors": { | |
"type": "array", | |
"items": { | |
"type": "integer" | |
} | |
}, | |
"width": { | |
"type": "integer" | |
}, | |
"height": { | |
"type": "integer" | |
}, | |
"@type": { | |
"const": "iiif:Tile" | |
} | |
} | |
} | |
}, | |
"attribution": { | |
"$ref": "#/definitions/attribution" | |
}, | |
"logo": { | |
"$ref": "#/definitions/logo" | |
}, | |
"license": { | |
"$ref": "#/definitions/license" | |
}, | |
"service": { | |
"oneOf": [ | |
{ | |
"type": "array", | |
"items": { | |
"type": "object" | |
} | |
}, | |
{ | |
"type": "object" | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment