|
3 | 3 | "$comment": "IIIF basic types", |
4 | 4 | "types": { |
5 | 5 | "id": { |
| 6 | + "title":"id", |
| 7 | + "description": "Id must be present and must be a URI", |
6 | 8 | "type": "string", |
7 | 9 | "format": "uri", |
8 | | - "pattern": "^http.*$", |
9 | | - "title": "Id must be present and must be a URI" |
| 10 | + "pattern": "^http.*$" |
10 | 11 | }, |
11 | 12 | "lngString": { |
12 | | - "title": "Language string, must have a language and value must be an array.", |
| 13 | + "title":"LngString", |
| 14 | + "description": "Language string, must have a language and value must be an array.", |
13 | 15 | "type": "object", |
14 | 16 | "patternProperties": { |
15 | 17 | "^[a-zA-Z-][a-zA-Z-]*$": { |
|
24 | 26 | "additionalProperties": false |
25 | 27 | }, |
26 | 28 | "dimension": { |
| 29 | + "title": "dimension", |
27 | 30 | "type": "integer", |
28 | 31 | "exclusiveMinimum": 0 |
29 | 32 | }, |
30 | 33 | "keyValueString": { |
| 34 | + "title": "KeyValueString", |
31 | 35 | "type": "object", |
32 | 36 | "properties": { |
33 | 37 | "label": {"$ref": "#/types/lngString" }, |
|
36 | 40 | "required": ["label", "value"] |
37 | 41 | }, |
38 | 42 | "BCP47": { |
| 43 | + "title": "BCP47", |
39 | 44 | "anyOf": [ |
40 | 45 | { |
41 | 46 | "type":"string", |
|
48 | 53 | ] |
49 | 54 | }, |
50 | 55 | "format": { |
| 56 | + "title": "format", |
51 | 57 | "type": "string", |
52 | 58 | "pattern": "^[a-z][a-z]*/.*$" |
53 | 59 | }, |
54 | 60 | "class": { |
55 | | - "title": "Classes MUST have an id and type property and MAY have a label.", |
| 61 | + "title": "class", |
| 62 | + "description": "Classes MUST have an id and type property and MAY have a label.", |
56 | 63 | "type": "object", |
57 | 64 | "properties": { |
58 | 65 | "id": { "$ref": "#/types/id" }, |
|
62 | 69 | "required": ["id", "type"] |
63 | 70 | }, |
64 | 71 | "duration": { |
| 72 | + "title":"duration", |
65 | 73 | "type": "number", |
66 | 74 | "exclusiveMinimum": 0 |
67 | 75 | }, |
68 | 76 | "external": { |
| 77 | + "title":"external", |
69 | 78 | "type": "array", |
70 | 79 | "items": { |
71 | 80 | "allOf": [ |
|
155 | 164 | "resource": { |
156 | 165 | "oneOf": [ |
157 | 166 | { |
158 | | - "title": "Annotation bodies MUST have an id and type property.", |
| 167 | + "title": "resource", |
| 168 | + "description": "Annotation bodies MUST have an id and type property.", |
159 | 169 | "type": "object", |
160 | 170 | "properties": { |
161 | 171 | "id": { "$ref": "#/types/id" }, |
|
187 | 197 | "required": ["id", "type"] |
188 | 198 | }, |
189 | 199 | { |
190 | | - "title": "Annotation bodies which are TextualBody MUST have an type and value property.", |
| 200 | + "title":"AnnotationBody", |
| 201 | + "description": "Annotation bodies which are TextualBody MUST have an type and value property.", |
191 | 202 | "type": "object", |
192 | 203 | "properties": { |
193 | 204 | "id": { "$ref": "#/types/id" }, |
|
221 | 232 | "items": { |
222 | 233 | "oneOf": [ |
223 | 234 | { |
| 235 | + "title": "service", |
224 | 236 | "allOf": [ |
| 237 | + { "title": "test"}, |
225 | 238 | { "$ref": "#/types/class" }, |
226 | 239 | { |
| 240 | + "title": "Foobar2", |
227 | 241 | "type": "object", |
228 | 242 | "properties": { |
229 | 243 | "profile": { "type": "string" }, |
|
246 | 260 | } |
247 | 261 | }, |
248 | 262 | "rights": { |
249 | | - "title": "Rights URI isn't from either Creative Commons or RightsStatements.org. Both require http links.", |
| 263 | + "title": "rights", |
| 264 | + "description": "Rights URI isn't from either Creative Commons or RightsStatements.org. Both require http links.", |
250 | 265 | "oneOf": [ |
251 | 266 | { |
252 | 267 | "type": "string", |
|
411 | 426 | "type": "string", |
412 | 427 | "pattern": "^Collection", |
413 | 428 | "default": "Collection", |
414 | | - "title": "Are you validating a collection?", |
| 429 | + "title": "Collection", |
415 | 430 | "description":"If you are validating a manifest, you may get this error if there are errors in the manifest. The validator first validates it as a manifest and if that fails it will try and validate it using the other types." |
416 | 431 | }, |
417 | 432 | "metadata": { "$ref": "#/classes/metadata" }, |
|
618 | 633 | } |
619 | 634 | ] |
620 | 635 | }, |
| 636 | + "annotationCollectionRef": { |
| 637 | + "oneOf": [ |
| 638 | + { |
| 639 | + "type": "string" |
| 640 | + }, |
| 641 | + { |
| 642 | + "allOf": [ |
| 643 | + { "$ref": "#/types/reference" }, |
| 644 | + { |
| 645 | + "type": "object", |
| 646 | + "properties": { |
| 647 | + "type": { |
| 648 | + "type": "string", |
| 649 | + "pattern": "^AnnotationCollection$" |
| 650 | + } |
| 651 | + } |
| 652 | + } |
| 653 | + ] |
| 654 | + } |
| 655 | + ] |
| 656 | + }, |
621 | 657 | "canvas": { |
622 | 658 | "allOf": [ |
623 | 659 | { "$ref": "#/types/class" }, |
|
833 | 869 | "$ref": "#/classes/annotation" |
834 | 870 | } |
835 | 871 | } |
836 | | - } |
| 872 | + }, |
| 873 | + "required": ["items"] |
837 | 874 | } |
838 | 875 | ] |
839 | 876 | }, |
|
883 | 920 | "partOf": { |
884 | 921 | "type": "array", |
885 | 922 | "items": { |
886 | | - "$ref": "#/classes/annotationCollection" |
| 923 | + "oneOf": [ |
| 924 | + { "$ref": "#/classes/annotationCollection" }, |
| 925 | + { "$ref": "#/classes/annotationCollectionRef" } |
| 926 | + ] |
887 | 927 | } |
888 | 928 | }, |
889 | 929 | "next": { "$ref": "#/classes/annotationPageRef" }, |
|
979 | 1019 | }, |
980 | 1020 | { |
981 | 1021 | "$ref": "#/classes/specificResource" |
982 | | - }, |
983 | | - { |
984 | | - "title": "Annotation target can also contain just scope and source", |
985 | | - "type": "object", |
986 | | - "properties": { |
987 | | - "source": { "$ref": "#/types/id" }, |
988 | | - "scope": { "$ref": "#/types/id" } |
989 | | - }, |
990 | | - "required": ["source", "scope"] |
991 | 1022 | } |
992 | | - ] |
| 1023 | + ] |
993 | 1024 | }, |
994 | 1025 | "specificResource": { |
995 | 1026 | "type": "object", |
|
1008 | 1039 | { "$ref": "#/types/class" } |
1009 | 1040 | ] |
1010 | 1041 | }, |
| 1042 | + "scope": { "$ref": "#/types/id"}, |
1011 | 1043 | "selector": { |
1012 | 1044 | "oneOf": [ |
1013 | 1045 | { "$ref": "#/classes/selector" }, |
|
1020 | 1052 | ] |
1021 | 1053 | } |
1022 | 1054 | }, |
1023 | | - "required": ["source", "selector"] |
| 1055 | + "required": ["source"] |
1024 | 1056 | }, |
1025 | 1057 | "selector": { |
1026 | 1058 | "oneOf": [ |
|
1107 | 1139 | "default": "Range" |
1108 | 1140 | }, |
1109 | 1141 | "rendering": { "$ref": "#/types/external" }, |
1110 | | - "supplementary": { "$ref": "#/classes/annotationCollection" }, |
| 1142 | + "supplementary": { |
| 1143 | + "oneOf": [ |
| 1144 | + { "$ref": "#/classes/annotationCollection" }, |
| 1145 | + { "$ref": "#/classes/annotationCollectionRef" } |
| 1146 | + ] |
| 1147 | + }, |
1111 | 1148 | "service": { "$ref": "#/classes/service" }, |
1112 | 1149 | "placeholderCanvas": { "$ref": "#/classes/placeholderCanvas" }, |
1113 | 1150 | "accompanyingCanvas": { "$ref": "#/classes/accompanyingCanvas" }, |
|
0 commit comments