Skip to content

Commit

Permalink
Added validation for images in 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Gardeur committed Aug 20, 2018
1 parent d69875c commit 9b1f3ee
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion schema/publication.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@
"type": "array",
"items": {
"$ref": "https://drafts.opds.io/schema/link.schema.json"
}
},
"minItems": 1,
"allOf": [
{
"description": "At least one image resource must use one of the following formats: image/jpeg, image/png or image/gif.",
"contains": {
"properties": {
"type": { "enum": ["image/jpeg", "image/png", "image/gif"] }
}
}
}
]
}
},
"required": ["metadata", "links", "images"],
Expand Down

0 comments on commit 9b1f3ee

Please sign in to comment.