Validation of a feed map by the tag registry.
A validation reports what the specifications say is wrong:
The :requirements option adds the required and recommended elements of a directory or a standard: :psp-1 for the baseline of the Podcast Standards Project, and :apple, :spotify and :youtube for those directories.
A diagnostic has the shape of those of the parse report: an :id, a :level of :error, :warning or :info, a :path into the feed, and a :message. Validation never throws on a value, since a shape that the element doesn't take is a diagnostic like any other.
Validation of a feed map by the tag registry. A validation reports what the specifications say is wrong: - a required attribute that's missing - a value outside an enumeration, or one that doesn't coerce to its type - a deprecated element - a broken structure, e.g. an alternate enclosure without a source - an element that the registry doesn't know The :requirements option adds the required and recommended elements of a directory or a standard: :psp-1 for the baseline of the Podcast Standards Project, and :apple, :spotify and :youtube for those directories. A diagnostic has the shape of those of the parse report: an :id, a :level of :error, :warning or :info, a :path into the feed, and a :message. Validation never throws on a value, since a shape that the element doesn't take is a diagnostic like any other.
(location path)(location path registry)The path into a feed of a diagnostic as people read it, by the
registry of spec, spec/default unless given: each element by its XML
name, one of several by its number from 1, and an attribute by its name.
The items of the channel as a whole are every item.
(location [:rss/items 6 :rss/enclosure :url])
;; => "item 7 › enclosure › url"
The `path` into a feed of a diagnostic as people read it, by the
`registry` of spec, spec/default unless given: each element by its XML
name, one of several by its number from 1, and an attribute by its name.
The items of the channel as a whole are every item.
(location [:rss/items 6 :rss/enclosure :url])
;; => "item 7 › enclosure › url"(report answer)(report {:keys [error feed] :as answer} opts)The diagnostics of the answer of fetch!, with the opts of validate:
the :error of the fetch or of the parse, the :report of the parse, and
those of validating its :feed. Give them to diagnostics/verdict for the
verdict on the feed.
The :error is an error here, whatever its level elsewhere, e.g. a 404, since a feed that can't be read fails as a whole.
The diagnostics of the `answer` of fetch!, with the `opts` of validate: the :error of the fetch or of the parse, the :report of the parse, and those of validating its :feed. Give them to diagnostics/verdict for the verdict on the feed. The :error is an error here, whatever its level elsewhere, e.g. a 404, since a feed that can't be read fails as a whole.
The required and recommended elements of the channel and of an item, for each standard or directory by name, and the levels that it raises above those of the catalogue.
A requirement is a model key, or a vector of a key, a predicate of its value, and a description. The key can be a set of keys, of which one will do. They're the requirements of these, as of October 2026:
PSP-1 and Apple require a category from Apple's list, which a name from before 2019 still is, and Apple keeps only the first of the items that share an enclosure URL. YouTube makes a video of each episode from the audio and the show's image, and sends a code to the owner's email.
The required and recommended elements of the channel and of an item, for each standard or directory by name, and the levels that it raises above those of the catalogue. A requirement is a model key, or a vector of a key, a predicate of its value, and a description. The key can be a set of keys, of which one will do. They're the requirements of these, as of October 2026: - PSP-1 of the Podcast Standards Project - Apple's A Podcaster's Guide to RSS - Spotify's Podcast Delivery Specification 1.10 - YouTube's Deliver podcasts using an RSS feed, with the limits on the title and description of a video of its Data API PSP-1 and Apple require a category from Apple's list, which a name from before 2019 still is, and Apple keeps only the first of the items that share an enclosure URL. YouTube makes a video of each episode from the audio and the show's image, and sends a code to the owner's email.
(valid? feed)(valid? feed opts)Whether feed has no errors, with the opts of validate.
Whether `feed` has no errors, with the `opts` of validate.
(validate feed)(validate feed
{chosen :requirements
:keys [registry categories renamed-categories]
:or {registry spec/default
categories spec/categories
renamed-categories spec/renamed-categories}
:as opts})The diagnostics of feed with the opts below: the checks of the
registry, the basics of RSS 2.0, and the requirements that opts name.
The feed is normalized first, so the shorthand that a producer can write passes too. The chosen requirements can raise the level of a diagnostic, e.g. a repeated enclosure URL is an error for Apple. A requirement that an error of the other checks already covers isn't reported again, so one fix counts once.
The diagnostics of `feed` with the `opts` below: the checks of the registry, the basics of RSS 2.0, and the requirements that `opts` name. - :registry, the tag registry to check against, spec/default by default - :requirements, a name in requirements, or a map of the shape of its entries - :categories and :renamed-categories, the tables of spec that the categories of a podcast are checked by The feed is normalized first, so the shorthand that a producer can write passes too. The chosen requirements can raise the level of a diagnostic, e.g. a repeated enclosure URL is an error for Apple. A requirement that an error of the other checks already covers isn't reported again, so one fix counts once.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |