Skip to content

Commit

Permalink
Merge pull request #86 from IIIF/motivation_array
Browse files Browse the repository at this point in the history
Allowing motivation to be an array
  • Loading branch information
glenrobson authored Dec 19, 2019
2 parents 55d217c + 12784bd commit bd49884
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
19 changes: 19 additions & 0 deletions fixtures/3/annoPageMultipleMotivations.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
10 changes: 9 additions & 1 deletion schema/iiif_3_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,15 @@
"pattern": "^Annotation$"
},
"motivation": {
"type": "string"
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"body": {
"oneOf": [
Expand Down
3 changes: 2 additions & 1 deletion tests/test_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bd49884

Please sign in to comment.