-
Notifications
You must be signed in to change notification settings - Fork 23
/
link.schema.json
91 lines (91 loc) · 2.11 KB
/
link.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://readium.org/webpub-manifest/schema/link.schema.json",
"title": "Link Object for the Readium Web Publication Manifest",
"type": "object",
"properties": {
"href": {
"description": "URI or URI template of the linked resource",
"type": "string"
},
"type": {
"description": "MIME type of the linked resource",
"type": "string"
},
"templated": {
"description": "Indicates that a URI template is used in href",
"type": "boolean"
},
"title": {
"description": "Title of the linked resource",
"type": "string"
},
"rel": {
"description": "Relation between the linked resource and its containing collection",
"type": [
"string",
"array"
],
"items": {
"type": "string"
}
},
"properties": {
"description": "Properties associated to the linked resource",
"$ref": "properties.schema.json"
},
"height": {
"description": "Height of the linked resource in pixels",
"type": "integer",
"exclusiveMinimum": 0
},
"width": {
"description": "Width of the linked resource in pixels",
"type": "integer",
"exclusiveMinimum": 0
},
"bitrate": {
"description": "Bitrate of the linked resource in kbps",
"type": "number",
"exclusiveMinimum": 0
},
"duration": {
"description": "Length of the linked resource in seconds",
"type": "number",
"exclusiveMinimum": 0
},
"children": {
"description": "Resources that are children of the linked resource, in the context of a given collection role",
"type": "array",
"items": {
"$ref": "link.schema.json"
}
}
},
"required": [
"href"
],
"if": {
"properties": {
"templated": {
"enum": [
false, null
]
}
}
},
"then": {
"properties": {
"href": {
"format": "uri-reference"
}
}
},
"else": {
"properties": {
"href": {
"format": "uri-template"
}
}
}
}