{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/json-feed/_shared/latest--feed-1.json",
  "title": "JSON schema for the JSON Feed format",
  "x-lintel": {
    "source": "https://json.schemastore.org/feed-1",
    "sourceSha256": "20246cda4df9953cdf728fc8ca466705cf699a2e604c9470c0a1b44bcea1a6dc"
  },
  "type": "object",
  "properties": {
    "author": {
      "$ref": "#/$defs/author"
    },
    "description": {
      "description": "Provides more detail, beyond the title, on what the feed is about. A feed reader may display this text.",
      "type": "string"
    },
    "expired": {
      "description": "Says whether or not the feed is finished — that is, whether or not it will ever update again. A feed for a temporary event, such as an instance of the Olympics, could expire. If the value is true, then it's expired. Any other value, or the absence of expired, means the feed may continue to update.",
      "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": "#/$defs/uri"
        }
      ]
    },
    "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": "#/$defs/uri"
        }
      ]
    },
    "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": "#/$defs/uri"
        }
      ]
    },
    "hubs": {
      "description": "Describes endpoints that can be used to subscribe to real-time notifications from the publisher of this feed",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "type",
          "url"
        ],
        "properties": {
          "type": {
            "description": "Describes the protocol used to talk with the hub, such as \"rssCloud\" or \"WebSub\".",
            "type": "string"
          },
          "url": {
            "allOf": [
              {
                "$ref": "#/$defs/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": "#/$defs/uri"
        }
      ]
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/item"
      }
    },
    "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": "#/$defs/uri"
        }
      ]
    },
    "title": {
      "description": "The name of the feed, which will often correspond to the name of the website (blog, for instance), though not necessarily.",
      "type": "string"
    },
    "user_comment": {
      "description": "A description of the purpose of the feed. This is for the use of people looking at the raw JSON, and should be ignored by feed readers",
      "type": "string"
    },
    "version": {
      "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"
          ]
        },
        {
          "$ref": "#/$defs/uri"
        }
      ]
    }
  },
  "required": [
    "items",
    "title",
    "version"
  ],
  "$defs": {
    "attachment": {
      "type": "object",
      "required": [
        "mime_type",
        "url"
      ],
      "properties": {
        "duration_in_seconds": {
          "description": "Specifies how long the attachment takes to listen to or watch.",
          "type": "number"
        },
        "mime_type": {
          "description": "Specifies the type of the attachment, such as \"audio/mpeg\".",
          "type": "string"
        },
        "size_in_bytes": {
          "description": "Specifies how large the file is.",
          "type": "number"
        },
        "title": {
          "description": "Is a name for the attachment. Important: if there are multiple attachments, and two or more have the exact same title (when title is present), then they are considered as alternate representations of the same thing. In this way a podcaster, for instance, might provide an audio recording in different formats.",
          "type": "string"
        },
        "url": {
          "description": "Specifies the location of the attachment",
          "allOf": [
            {
              "$ref": "#/$defs/uri"
            }
          ]
        }
      },
      "additionalProperties": false,
      "patternProperties": {
        "^_[a-zA-Z]([^.]+)$": {
          "$ref": "#/$defs/extension"
        }
      }
    },
    "author": {
      "description": "Specifies the feed author",
      "type": "object",
      "minProperties": 1,
      "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": "#/$defs/uri"
            }
          ]
        },
        "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": "#/$defs/uri"
            }
          ]
        }
      },
      "additionalProperties": false,
      "patternProperties": {
        "^_[a-zA-Z]([^.]+)$": {
          "$ref": "#/$defs/extension"
        }
      }
    },
    "extension": {
      "description": "Custom extension to the JSON Feed format",
      "type": "object",
      "properties": {
        "about": {
          "description": "A description or URL to description of the custom extension.",
          "type": "string"
        }
      }
    },
    "item": {
      "required": [
        "id"
      ],
      "properties": {
        "attachments": {
          "description": "Lists related resources",
          "type": "array",
          "items": {
            "$ref": "#/$defs/attachment"
          }
        },
        "author": {
          "$ref": "#/$defs/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": "#/$defs/uri"
            }
          ]
        },
        "content_html": {
          "description": "The HTML representation of the content",
          "type": "string"
        },
        "content_text": {
          "description": "The plain text representation of the content",
          "type": "string"
        },
        "date_modified": {
          "description": "Specifies the date in ISO 8601 format. (Example: 2010-02-07T14:04:00-05:00.)",
          "type": "string",
          "format": "date-time"
        },
        "date_published": {
          "description": "Specifies the date in ISO 8601 format. (Example: 2010-02-07T14:04:00-05:00.)",
          "type": "string",
          "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": "#/$defs/uri"
            }
          ]
        },
        "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": [
            {
              "$ref": "#/$defs/uri"
            }
          ]
        },
        "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"
        },
        "tags": {
          "description": "Can have any plain text values you want. Tags tend to be just one word, but they may be anything. Note: they are not the equivalent of Twitter hashtags. Some blogging systems and other feed formats call these categories.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "title": {
          "description": "Is plain text. Microblog items in particular may omit titles.",
          "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": "#/$defs/uri"
            }
          ]
        }
      },
      "oneOf": [
        {
          "required": [
            "content_html"
          ],
          "not": {
            "required": [
              "content_text"
            ]
          }
        },
        {
          "required": [
            "content_text"
          ],
          "not": {
            "required": [
              "content_html"
            ]
          }
        },
        {
          "required": [
            "content_text",
            "content_html"
          ]
        }
      ],
      "additionalProperties": false,
      "patternProperties": {
        "^_[a-zA-Z]([^.]+)$": {
          "$ref": "#/$defs/extension"
        }
      },
      "type": "object"
    },
    "uri": {
      "type": "string",
      "format": "uri"
    }
  },
  "patternProperties": {
    "^_[a-zA-Z]([^.]+)$": {
      "$ref": "#/$defs/extension"
    }
  },
  "id": "https://json.schemastore.org/feed-1",
  "additionalProperties": false
}
