Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions schema/catalog-entry.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://drafts.opds.io/schema/catalog-entry.schema.json",
"title": "OPDS Catalog Entry",
"type": "object",
"properties": {
"metadata": {
"$ref": "https://readium.org/webpub-manifest/schema/metadata.schema.json"
},
"links": {
"type": "array",
"items": {
"$ref": "https://readium.org/webpub-manifest/schema/link.schema.json"
},
"contains": {
"description": "A catalog entry must contain at least one catalog link.",
"type": "object",
"properties": {
"rel": {
"anyOf": [
{
"type": "string",
"enum": [
"http://opds-spec.org/catalog"
]
},
{
"type": "array",
"contains": {
"type": "string",
"enum": [
"http://opds-spec.org/catalog"
]
}
}
]
}
}
}
},
"image": {
"type": "object",
"title": "Image meant to be displayed to the user when browsing catalogs",
"allOf": [
{
"$ref": "https://readium.org/webpub-manifest/schema/link.schema.json"
},
{
"description": "The image resource must use one of the following formats: image/jpeg, image/png or image/gif.",
"properties": {
"type": {
"enum": [
"image/jpeg",
"image/png",
"image/gif"
]
}
}
}
]
}
},
"required": [
"metadata",
"links"
]
}
15 changes: 15 additions & 0 deletions schema/feed.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"uniqueItems": true,
"contains": {
"type": "object",
"properties": {
"rel": {
"anyOf": [
Expand All @@ -37,6 +38,14 @@
]
}
},
"catalogs": {
"description": "A list of catalog-entry objects, to reference other OPDS feeds",
"type": "array",
"items": {
"$ref": "catalog-entry.schema.json"
},
"uniqueItems": true
},
"publications": {
"description": "A list of publications that can be acquired",
"type": "array",
Expand All @@ -56,6 +65,7 @@
{
"description": "Each Link Object in a navigation collection must contain a title",
"items": {
"type": "object",
"required": [
"title"
]
Expand Down Expand Up @@ -142,6 +152,11 @@
"required": [
"groups"
]
},
{
"required": [
"catalogs"
]
}
]
}
2 changes: 2 additions & 0 deletions schema/publication.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"contains": {
"description": "A publication must contain at least one acquisition link.",
"type": "object",
"properties": {
"rel": {
"anyOf": [
Expand Down Expand Up @@ -60,6 +61,7 @@
{
"description": "At least one image resource must use one of the following formats: image/jpeg, image/png or image/gif.",
"contains": {
"type": "object",
"properties": {
"type": {
"enum": [
Expand Down