Skip to content

Commit

Permalink
Added requirements based on OPDS 2.0 draft
Browse files Browse the repository at this point in the history
related #1
  • Loading branch information
Hadrien Gardeur committed Aug 22, 2018
1 parent 9b1f3ee commit 0101913
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
29 changes: 26 additions & 3 deletions schema/feed.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,23 @@
"links": {
"type": "array",
"items": {
"$ref": "https://drafts.opds.io/schema/link.schema.json"
}
"$ref": "https://drafts.opds.io/schema/link.schema.json",
},
"allOf": [
{
"description": "A feed must contain a self link.",
"contains": {
"properties": {
"rel": {
"anyOf": [
{ "type": "string", "const": "self" },
{ "type": "array", "contains": { "const": "self" } }
]
}
}
}
}
]
},
"publications": {
"type": "array",
Expand All @@ -23,7 +38,15 @@
"type": "array",
"items": {
"$ref": "https://drafts.opds.io/schema/link.schema.json"
}
},
"allOf": [
{
"description": "Each Link Object in a navigation collection must contain a title",
"items": {
"required": ["title"]
}
}
]
},
"facets": {
"type": "array",
Expand Down
17 changes: 16 additions & 1 deletion schema/publication.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,22 @@
"type": "array",
"items": {
"$ref": "https://drafts.opds.io/schema/link.schema.json"
}
},
"allOf": [
{
"description": "A publication must contain a self link.",
"contains": {
"properties": {
"rel": {
"anyOf": [
{ "type": "string", "const": "self" },
{ "type": "array", "contains": { "const": "self" } }
]
}
}
}
}
]
},
"images": {
"type": "array",
Expand Down

0 comments on commit 0101913

Please sign in to comment.