diff --git a/fixtures/3/annoPageMultipleMotivations.json b/fixtures/3/annoPageMultipleMotivations.json new file mode 100644 index 0000000..caf6c34 --- /dev/null +++ b/fixtures/3/annoPageMultipleMotivations.json @@ -0,0 +1,19 @@ +{ + "@context": "http://iiif.io/api/presentation/3/context.json", + "id": "https://preview.iiif.io/cookbook/0068-newspaper/recipe/0068-newspaper/newspaper_issue_1-anno_p1.json", + "type": "AnnotationPage", + "items": [ + { + "id": "https://data.europeana.eu/annotation/9200355/BibliographicResource_3000096302513/20b3b1f4cb15f062e53fd50d584d66ff", + "type": "Annotation", + "motivation": ["supplementing", "commenting"], + "body": { + "type": "TextualBody", + "format": "text/plain", + "language": "de", + "value": "84" + }, + "target": "https://iiif.europeana.eu/presentation/9200355/BibliographicResource_3000096302513/canvas/p1#xywh=182,476,59,43" + } + ] +} diff --git a/schema/iiif_3_0.json b/schema/iiif_3_0.json index 73e4354..02654e3 100644 --- a/schema/iiif_3_0.json +++ b/schema/iiif_3_0.json @@ -686,7 +686,15 @@ "pattern": "^Annotation$" }, "motivation": { - "type": "string" + "oneOf": [ + { "type": "string" }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "body": { "oneOf": [ diff --git a/tests/test_validator.py b/tests/test_validator.py index eda20a9..1896018 100644 --- a/tests/test_validator.py +++ b/tests/test_validator.py @@ -137,7 +137,8 @@ def test07_check_manifest3(self): 'fixtures/3/collection_of_collections.json', 'fixtures/3/version2image.json', 'fixtures/3/annoPage.json', - 'fixtures/3/anno_pointselector.json' + 'fixtures/3/anno_pointselector.json', + 'fixtures/3/annoPageMultipleMotivations.json' ]: with open(good, 'r') as fh: data = fh.read()