# dog_and_duck/quack/picky/fault_messages.clj

001 (ns dog-and-duck.quack.picky.fault-messages
002 "Narrative values for fault reports of specific types, used by the picky
003 validator.")
004
005 ;;; Copyright (C) Simon Brooke, 2022
006
007 ;;; This program is free software; you can redistribute it and/or
008 ;;; modify it under the terms of the GNU General Public License
009 ;;; as published by the Free Software Foundation; either version 2
010 ;;; of the License, or (at your option) any later version.
011
012 ;;; This program is distributed in the hope that it will be useful,
013 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
014 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015 ;;; GNU General Public License for more details.
016
017 ;;; You should have received a copy of the GNU General Public License
018 ;;; along with this program; if not, write to the Free Software
019 ;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
020
021 (def messages
022 "Actual fault messages to which fault codes resolve."
023 {:expected-collection "A collection was expected, but was not found."
024 :id-not-https "Publicly facing content SHOULD use HTTPS URIs"
025 :id-not-uri "identifiers must be publicly dereferencable URIs"
026 :no-context "Section 3 of the ActivityPub specification states Implementers SHOULD include the ActivityPub context in their object definitions`."
027 :no-id-persistent "Persistent objects MUST have unique global identifiers."
028 :no-id-transient "The ActivityPub specification allows objects without `id` fields only if they are intentionally transient; even so it is preferred that the object should have an explicit null id."
029 :no-inbox "Actor objects MUST have an `inbox` property, whose value MUST be a reference to an ordered collection."
030 :no-items-collection "A collection expected to be simple had no items."
031 :no-outbox "Actor objects MUST have an `outbox` property, whose value MUST be a reference to an ordered collection."
032 :no-type "The ActivityPub specification states that the `type` field is optional, but it is hard to process objects with no known type."
033 :not-actor-type "The `type` value of the object was not a recognised actor type."
034 :null-id-persistent "Persistent objects MUST have non-null identifiers."
035 :not-an-object "ActivityStreams object must be JSON objects."})