Skip to content

Commit cb02979

Browse files
committed
Validating simple Timeline and Scene
1 parent 1e4142c commit cb02979

51 files changed

Lines changed: 1918 additions & 70 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

schema/v4/AccompanyingCanvas.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/AccompanyingCanvas.json",
4+
"title":"AccompanyingCanvas",
5+
"type": "object",
6+
"allOf": [
7+
{
8+
"$ref": "Canvas.json"
9+
},
10+
{
11+
"type": "object",
12+
"not": {
13+
"required": [
14+
"placeholderCanvas",
15+
"accompanyingCanvas"
16+
]
17+
}
18+
}
19+
]
20+
}

schema/v4/AnnoTarget.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/AnnoTarget.json",
4+
"title": "AnnotationTarget",
5+
"if": {
6+
"type": "string"
7+
},
8+
"then": {
9+
"type": "string",
10+
"format": "uri",
11+
"pattern": "^http.*$"
12+
},
13+
"else": {
14+
"type": "object",
15+
"$ref": "SpecificResource.json"
16+
}
17+
}

schema/v4/Annotation.json

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/Annotation.json",
4+
"type": "object",
5+
"title": "Annotation",
6+
"properties": {
7+
"@context": {
8+
"$ref": "Context.json"
9+
},
10+
"created": {
11+
"type": "string"
12+
},
13+
"modified": {
14+
"type": "string"
15+
},
16+
"generated": {
17+
"type": "string"
18+
},
19+
"creator": {
20+
"oneOf": [
21+
{
22+
"type": "string"
23+
},
24+
{
25+
"$ref": "Agent.json"
26+
},
27+
{
28+
"type": "array",
29+
"items": {
30+
"oneOf": [
31+
{
32+
"type": "string"
33+
},
34+
{
35+
"$ref": "Agent.json"
36+
}
37+
]
38+
}
39+
}
40+
]
41+
},
42+
"generator": {
43+
"oneOf": [
44+
{
45+
"type": "string"
46+
},
47+
{
48+
"$ref": "Agent.json"
49+
},
50+
{
51+
"type": "array",
52+
"items": {
53+
"oneOf": [
54+
{
55+
"type": "string"
56+
},
57+
{
58+
"$ref": "Agent.json"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
},
65+
"audience": {
66+
"oneOf": [
67+
{
68+
"$ref": "Audiance.json"
69+
},
70+
{
71+
"type": "array",
72+
"items": {
73+
"$ref": "Audiance.json"
74+
}
75+
}
76+
]
77+
},
78+
"bodyValue": {
79+
"type": "string"
80+
},
81+
"canonical": {
82+
"type": "string",
83+
"format": "uri"
84+
},
85+
"via": {
86+
"oneOf": [
87+
{
88+
"type": "string",
89+
"format": "uri"
90+
},
91+
{
92+
"type": "array",
93+
"items": {
94+
"type": "string",
95+
"format": "uri"
96+
}
97+
}
98+
]
99+
},
100+
"stylesheet": {
101+
"$ref": "Stylesheet.json"
102+
},
103+
"type": {
104+
"type": "string",
105+
"pattern": "^Annotation$",
106+
"default": "Annotation"
107+
},
108+
"service": {
109+
"$ref": "Service.json"
110+
},
111+
"rendering": {
112+
"$ref": "External.json"
113+
},
114+
"thumbnail": {
115+
"type": "array",
116+
"items": {
117+
"$ref": "Resource.json"
118+
}
119+
},
120+
"motivation": {
121+
"type": "array",
122+
"items": {
123+
"type": "string"
124+
}
125+
},
126+
"body": {
127+
"type": "array",
128+
"items": {
129+
"anyOf": [
130+
{
131+
"$ref": "Resource.json"
132+
},
133+
{
134+
"$ref": "Choice.json"
135+
}
136+
]
137+
}
138+
},
139+
"target": {
140+
"type": "array",
141+
"items": {
142+
"$ref": "AnnoTarget.json"
143+
}
144+
}
145+
},
146+
"required": [
147+
"id",
148+
"target",
149+
"type"
150+
]
151+
}

schema/v4/AnnotationBody.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/AnnotationBody.json",
4+
"type": "object",
5+
"title": "AnnotationBody",
6+
"description": "Annotation bodies MUST have an id and type property.",
7+
"properties": {
8+
"id": {
9+
"$ref": "properties.json#/$defs/id"
10+
},
11+
"type": {
12+
"type": "string",
13+
"not": {
14+
"enum": [
15+
"TextualBody",
16+
"SpecificResource",
17+
"Choice"
18+
]
19+
}
20+
},
21+
"height": {
22+
"$ref": "properties.json#/$defs/dimension"
23+
},
24+
"width": {
25+
"$ref": "properties.json#/$defs/dimension"
26+
},
27+
"duration": {
28+
"$ref": "properties.json#/$defs/duration"
29+
},
30+
"language": {
31+
"type": "string"
32+
},
33+
"rendering": {
34+
"$ref": "External.json"
35+
},
36+
"service": {
37+
"$ref": "Service.json"
38+
},
39+
"format": {
40+
"$ref": "properties.json#/$defs/format"
41+
},
42+
"label": {
43+
"$ref": "properties.json#/$defs/lngString"
44+
},
45+
"thumbnail": {
46+
"type": "array",
47+
"items": {
48+
"$ref": "Resource.json"
49+
}
50+
},
51+
"annotations": {
52+
"type": "array",
53+
"items": {
54+
"oneOf": [
55+
{
56+
"$ref": "AnnotationPage.json"
57+
},
58+
{
59+
"$ref": "AnnotationPageRef.json"
60+
}
61+
]
62+
}
63+
}
64+
},
65+
"required": [
66+
"id",
67+
"type"
68+
]
69+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/AnnotationCollection.json",
4+
"title": "AnnotationCollection",
5+
"type": "object",
6+
"properties": {
7+
"@context": {
8+
"$ref": "Context.json"
9+
},
10+
"id": {
11+
"$ref": "properties.json#/$defs/id"
12+
},
13+
"type": {
14+
"type": "string",
15+
"pattern": "^AnnotationCollection$",
16+
"default": "AnnotationCollection"
17+
},
18+
"rendering": {
19+
"$ref": "External.json"
20+
},
21+
"partOf": {
22+
"$ref": "PartOf.json"
23+
},
24+
"next": {
25+
"$ref": "AnnotationPageRef.json"
26+
},
27+
"first": {
28+
"$ref": "AnnotationPageRef.json"
29+
},
30+
"last": {
31+
"$ref": "AnnotationPageRef.json"
32+
},
33+
"service": {
34+
"$ref": "Service.json"
35+
},
36+
"total": {
37+
"type": "integer",
38+
"exclusiveMinimum": 0
39+
},
40+
"thumbnail": {
41+
"type": "array",
42+
"items": {
43+
"$ref": "Resource.json"
44+
}
45+
},
46+
"items": {
47+
"type": "array",
48+
"items": {
49+
"$ref": "Annotation.json"
50+
}
51+
}
52+
},
53+
"required": [
54+
"id",
55+
"type",
56+
"items"
57+
]
58+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://iiif.io/api/presentation/4.0/schema/AnnotationCollectionRef.json",
4+
"title": "AnnotationCollectionRef",
5+
"if": {
6+
"type": "string"
7+
},
8+
"then": {
9+
"type": "string",
10+
"format": "uri",
11+
"pattern": "^http.*$"
12+
},
13+
"else": {
14+
"title": "AnnotationCollectionRefExtended",
15+
"allOf": [
16+
{
17+
"$ref": "Reference.json"
18+
},
19+
{
20+
"type": "object",
21+
"properties": {
22+
"type": {
23+
"type": "string",
24+
"pattern": "^AnnotationCollection$"
25+
}
26+
}
27+
}
28+
]
29+
}
30+
}

0 commit comments

Comments
 (0)