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
5 changes: 1 addition & 4 deletions src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@
"expo-42.0.0.json",
"expo-46.0.0.json",
"expo-50.0.0.json",
"feed-1.json",
"feed.json",
"flatpak-manifest.json",
"foundryvtt-module-manifest.json",
"foundryvtt-system-manifest.json",
Expand Down Expand Up @@ -1092,8 +1090,7 @@
"externalSchema": ["base.json"]
},
"feed.json": {
"externalSchema": ["feed-1.json"],
"unknownKeywords": ["deprecated"]
"externalSchema": ["feed-1.json"]
},
"foundryvtt-base-package-manifest.json": {
"unknownKeywords": ["deprecationMessage"]
Expand Down
141 changes: 49 additions & 92 deletions src/schemas/json/feed-1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/feed-1",
"additionalProperties": false,
"definitions": {
"attachment": {
Expand Down Expand Up @@ -29,12 +30,8 @@
"type": "string"
},
"url": {
"description": "Specifies the location of the attachment",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "Specifies the location of the attachment"
}
}
},
Expand All @@ -50,24 +47,16 @@
},
"properties": {
"avatar": {
"description": "the URL for an image for the author. As with icon, it should be square and relatively large — such as 512 x 512 pixels — and should use transparency where appropriate, since it may be rendered on a non-white background.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "the URL for an image for the author. As with icon, it should be square and relatively large — such as 512 x 512 pixels — and should use transparency where appropriate, since it may be rendered on a non-white background."
},
"name": {
"description": "Is the author's name",
"type": "string"
},
"url": {
"description": "Is the URL of a site owned by the author. It could be a blog, micro-blog, Twitter account, and so on. Ideally the linked-to page provides a way to contact the author, but that's not required.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "Is the URL of a site owned by the author. It could be a blog, micro-blog, Twitter account, and so on. Ideally the linked-to page provides a way to contact the author, but that's not required."
}
}
},
Expand All @@ -82,23 +71,25 @@
}
},
"item": {
"type": "object",
"required": ["id"],
"additionalProperties": false,
"oneOf": [
{
"required": ["content_html"],
"not": {
"required": ["content_text"]
}
},
"anyOf": [
{
"required": ["content_text"],
"not": {
"required": ["content_html"]
}
"properties": {
"content_html": {
"$ref": "#/definitions/item/properties/content_html"
}
},
"required": ["content_html"]
},
{
"required": ["content_text", "content_html"]
"properties": {
"content_text": {
"$ref": "#/definitions/item/properties/content_text"
}
},
"required": ["content_text"]
}
],
"patternProperties": {
Expand All @@ -118,12 +109,8 @@
"$ref": "#/definitions/author"
},
"banner_image": {
"description": "The URL of an image to use as a banner. Some blogging systems (such as Medium) display a different banner image chosen to go with each post, but that image wouldn't otherwise appear in the \"content_html\". A feed reader with a detail view may choose to show this banner image at the top of the detail view, possibly with the title overlaid.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "The URL of an image to use as a banner. Some blogging systems (such as Medium) display a different banner image chosen to go with each post, but that image wouldn't otherwise appear in the \"content_html\". A feed reader with a detail view may choose to show this banner image at the top of the detail view, possibly with the title overlaid."
},
"content_html": {
"description": "The HTML representation of the content",
Expand All @@ -144,25 +131,24 @@
"format": "date-time"
},
"external_url": {
"description": "Is the URL of a page elsewhere. This is especially useful for linkblogs. If \"url\" links to where you're talking about a thing, then \"external_url\" links to the thing you're talking about.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "Is the URL of a page elsewhere. This is especially useful for linkblogs. If \"url\" links to where you're talking about a thing, then \"external_url\" links to the thing you're talking about."
},
"id": {
"description": "Is unique for that item for that feed over time. If an item is ever updated, the id should be unchanged. New items should never use a previously-used id. If an id is presented as a number or other type, a JSON Feed reader must coerce it to a string. Ideally, the id is the full URL of the resource described by the item, since URLs make great unique identifiers.",
"type": ["string", "number"]
},
"image": {
"description": "The URL of the main image for the item. This image may also appear in the \"content_html\" — if so, it's a hint to the feed reader that this is the main, featured image. Feed readers may use the image as a preview.",
"allOf": [
"anyOf": [
{
"$ref": "#/definitions/uri"
"type": "string"
},
{
"type": "number"
}
]
},
"image": {
"$ref": "#/definitions/uri",
"description": "The URL of the main image for the item. This image may also appear in the \"content_html\" — if so, it's a hint to the feed reader that this is the main, featured image. Feed readers may use the image as a preview."
},
"summary": {
"description": "A plain text sentence or two describing the item. This might be presented in a timeline, for instance, where a detail view would display all of \"content_html\" or \"content_text\".",
"type": "string"
Expand All @@ -180,12 +166,8 @@
"type": "string"
},
"url": {
"description": "Is the URL of the resource described by the item. It's the permalink. This may be the same as the id — but should be present regardless.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "Is the URL of the resource described by the item. It's the permalink. This may be the same as the id — but should be present regardless."
}
}
},
Expand All @@ -194,7 +176,6 @@
"format": "uri"
}
},
"id": "https://json.schemastore.org/feed-1",
"patternProperties": {
"^_[a-zA-Z]([^.]+)$": {
"$ref": "#/definitions/extension"
Expand All @@ -213,28 +194,16 @@
"type": "boolean"
},
"favicon": {
"description": "The URL of an image for the feed suitable to be used in a source list. It should be square and relatively small, but not smaller than 64 x 64 pixels (so that it can look good on retina displays). As with icon, this image should use transparency where appropriate, since it may be rendered on a non-white background.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "The URL of an image for the feed suitable to be used in a source list. It should be square and relatively small, but not smaller than 64 x 64 pixels (so that it can look good on retina displays). As with icon, this image should use transparency where appropriate, since it may be rendered on a non-white background."
},
"feed_url": {
"description": "The URL of the feed, and serves as the unique identifier for the feed. As with 'home_page_url', this should be considered required for feeds on the public web.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "The URL of the feed, and serves as the unique identifier for the feed. As with 'home_page_url', this should be considered required for feeds on the public web."
},
"home_page_url": {
"description": "The URL of the resource that the feed describes. This resource may or may not actually be a \"home\" page, but it should be an HTML page. If a feed is published on the public web, this should be considered as required. But it may not make sense in the case of a file created on a desktop computer, when that file is not shared or is shared only privately.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "The URL of the resource that the feed describes. This resource may or may not actually be a \"home\" page, but it should be an HTML page. If a feed is published on the public web, this should be considered as required. But it may not make sense in the case of a file created on a desktop computer, when that file is not shared or is shared only privately."
},
"hubs": {
"description": "Describes endpoints that can be used to subscribe to real-time notifications from the publisher of this feed",
Expand All @@ -248,22 +217,14 @@
"type": "string"
},
"url": {
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri"
}
}
}
},
"icon": {
"description": "The URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used. It should be square and relatively large — such as 512 x 512 — so that it can be scaled-down and so that it can look good on retina displays. It should use transparency where appropriate, since it may be rendered on a non-white background.",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "The URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used. It should be square and relatively large — such as 512 x 512 — so that it can be scaled-down and so that it can look good on retina displays. It should use transparency where appropriate, since it may be rendered on a non-white background."
},
"items": {
"type": "array",
Expand All @@ -272,12 +233,8 @@
}
},
"next_url": {
"description": "The URL of a feed that provides the next n items, where n is determined by the publisher. This allows for pagination, but with the expectation that reader software is not required to use it and probably won't use it very often. next_url must not be the same as feed_url, and it must not be the same as a previous next_url (to avoid infinite loops).",
"allOf": [
{
"$ref": "#/definitions/uri"
}
]
"$ref": "#/definitions/uri",
"description": "The URL of a feed that provides the next n items, where n is determined by the publisher. This allows for pagination, but with the expectation that reader software is not required to use it and probably won't use it very often. next_url must not be the same as feed_url, and it must not be the same as a previous next_url (to avoid infinite loops)."
},
"title": {
"description": "The name of the feed, which will often correspond to the name of the website (blog, for instance), though not necessarily.",
Expand All @@ -291,7 +248,7 @@
"description": "The URL of the version of the format the feed uses. This should appear at the very top, though we recognize that not all JSON generators allow for ordering.",
"anyOf": [
{
"enum": ["https://jsonfeed.org/version/1"]
"const": "https://jsonfeed.org/version/1"
},
{
"$ref": "#/definitions/uri"
Expand Down
50 changes: 22 additions & 28 deletions src/schemas/json/feed.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/feed.json",
"additionalProperties": false,
"definitions": {
"item": {
"type": "object",
"required": ["id"],
"additionalProperties": false,
"oneOf": [
{
"required": ["content_html"],
"not": {
"required": ["content_text"]
}
},
"anyOf": [
{
"required": ["content_text"],
"not": {
"required": ["content_html"]
}
"properties": {
"content_html": {
"$ref": "#/definitions/item/properties/content_html"
}
},
"required": ["content_html"]
},
{
"required": ["content_text", "content_html"]
"properties": {
"content_text": {
"$ref": "#/definitions/item/properties/content_text"
}
},
"required": ["content_text"]
}
],
"patternProperties": {
Expand All @@ -32,13 +35,9 @@
"$ref": "feed-1#/definitions/item/properties/attachments"
},
"author": {
"$ref": "feed-1#/definitions/author",
"description": "Use the \"authors\" key instead, even when there is only one author. Existing feeds can include both \"author\" and \"authors\" for compatibility with existing feed readers. Feed readers should always prefer `authors` if present.",
"deprecated": true,
"allOf": [
{
"$ref": "feed-1#/definitions/author"
}
]
"deprecated": true
},
"authors": {
"type": "array",
Expand Down Expand Up @@ -66,7 +65,7 @@
},
"id": {
"description": "Is unique for that item for that feed over time. If an item is ever updated, the id should be unchanged. New items should never use a previously-used id. Ideally, the id is the full URL of the resource described by the item, since URLs make great unique identifiers.",
"type": ["string"]
"type": "string"
},
"image": {
"$ref": "feed-1#/definitions/item/properties/image"
Expand All @@ -90,21 +89,16 @@
}
}
},
"id": "https://json.schemastore.org/feed.json",
"patternProperties": {
"^_[a-zA-Z]([^.]+)$": {
"$ref": "feed-1#/definitions/extension"
}
},
"properties": {
"author": {
"$ref": "feed-1#/definitions/author",
"deprecated": true,
"description": "Use the \"authors\" key instead, even when there is only one author. Existing feeds can include both \"author\" and \"authors\" for compatibility with existing feed readers. Feed readers should always prefer `authors` if present.",
"allOf": [
{
"$ref": "feed-1#/definitions/author"
}
]
"description": "Use the \"authors\" key instead, even when there is only one author. Existing feeds can include both \"author\" and \"authors\" for compatibility with existing feed readers. Feed readers should always prefer `authors` if present."
},
"authors": {
"type": "array",
Expand Down Expand Up @@ -156,7 +150,7 @@
"description": "The URL of the version of the format the feed uses. This should appear at the very top, though we recognize that not all JSON generators allow for ordering.",
"anyOf": [
{
"enum": ["https://jsonfeed.org/version/1.1"]
"const": "https://jsonfeed.org/version/1.1"
},
{
"$ref": "feed-1#/definitions/uri"
Expand Down