Fix use of class-options in Litepub vocabulary
Apparently (:OPTION VALUE)(:OPTION VALUE) is correct, not (:OPTION VALUE :OPTION VALUE), according to DEFCLASS!
This commit is contained in:
parent
3e2f0d3b62
commit
22ad087a97
|
@ -178,15 +178,12 @@ Here is a brief example partially defining the “Place” type from ActivityStr
|
||||||
:documentation “The longitude of a place.”)))"
|
:documentation “The longitude of a place.”)))"
|
||||||
;; If the definition is an :UPDATE, remove that from OPTIONS and merge the old
|
;; If the definition is an :UPDATE, remove that from OPTIONS and merge the old
|
||||||
;; slots with the new.
|
;; slots with the new.
|
||||||
(let ((direct-slots (if (assoc :update options)
|
(let ((direct-slots
|
||||||
|
(if (assoc :update options)
|
||||||
(progn (setf options (remove-from-alist :update options))
|
(progn (setf options (remove-from-alist :update options))
|
||||||
(merge-alists direct-slots
|
(merge-alists direct-slots
|
||||||
(gethash (car names) *class-defs*)
|
(gethash (car names) *class-defs*) 't))
|
||||||
't))
|
|
||||||
direct-slots)))
|
direct-slots)))
|
||||||
;; Save the direct-slots, in case of future :UPDATEs.
|
|
||||||
(setf (gethash (car names) json-ld::*class-defs*) direct-slots)
|
|
||||||
|
|
||||||
;; Now, actually define the class, encoder, etc…
|
;; Now, actually define the class, encoder, etc…
|
||||||
`(let ((json-class
|
`(let ((json-class
|
||||||
(define-json-clos-class ,names
|
(define-json-clos-class ,names
|
||||||
|
@ -260,6 +257,10 @@ corresponding CLOS class) of a node."
|
||||||
(let* ((ctx (parse-context context))
|
(let* ((ctx (parse-context context))
|
||||||
(type-iri (getf (gethash (cadr names) ctx) :id))
|
(type-iri (getf (gethash (cadr names) ctx) :id))
|
||||||
(type-name (or type-iri (cadr names))))
|
(type-name (or type-iri (cadr names))))
|
||||||
|
;; Save the type’s direct-slots, in case of future :UPDATEs.
|
||||||
|
(setf (gethash (car names) *class-defs*)
|
||||||
|
direct-slots)
|
||||||
|
;; Now actually save the JSON-type.
|
||||||
(setf (gethash type-name *json-types*)
|
(setf (gethash type-name *json-types*)
|
||||||
(json-type-registry-list names direct-superclasses ctx direct-slots))))
|
(json-type-registry-list names direct-superclasses ctx direct-slots))))
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,8 @@ Seemingly may be set in the Activity modifying the Note, or the Note itself.")
|
||||||
Potentially deprecated/very uncommon.")
|
Potentially deprecated/very uncommon.")
|
||||||
(list-message
|
(list-message
|
||||||
"list-message"))
|
"list-message"))
|
||||||
(:documentation "An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken."
|
(:documentation "An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken.")
|
||||||
:update 't))
|
(:update 't))
|
||||||
|
|
||||||
|
|
||||||
;; https://schema.org/PropertyValue
|
;; https://schema.org/PropertyValue
|
||||||
|
@ -93,8 +93,8 @@ Potentially deprecated/very uncommon.")
|
||||||
:documentation "When an update is part of a distributed conversation, this is the URI of that conversation.
|
:documentation "When an update is part of a distributed conversation, this is the URI of that conversation.
|
||||||
Likely deprecated/highly uncommon."))
|
Likely deprecated/highly uncommon."))
|
||||||
(:documentation "Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism for describing the actual set of modifications made to object.
|
(:documentation "Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism for describing the actual set of modifications made to object.
|
||||||
The target and origin typically have no defined meaning."
|
The target and origin typically have no defined meaning.")
|
||||||
:update 't))
|
(:update 't))
|
||||||
|
|
||||||
|
|
||||||
;; https://codeberg.org/fediverse/fep/src/branch/main/fep/c0e0/fep-c0e0.md
|
;; https://codeberg.org/fediverse/fep/src/branch/main/fep/c0e0/fep-c0e0.md
|
||||||
|
@ -123,8 +123,8 @@ The target and origin typically have no defined meaning."
|
||||||
"capabilities"
|
"capabilities"
|
||||||
:documentation "Contains a hash-table of capability-names mapped to a boolean, marking this Person’s (server’s) support of capability.
|
:documentation "Contains a hash-table of capability-names mapped to a boolean, marking this Person’s (server’s) support of capability.
|
||||||
One known capabilitity-name is Pleroma’s “acceptsChatMessages”."))
|
One known capabilitity-name is Pleroma’s “acceptsChatMessages”."))
|
||||||
(:documentation "Represents an individual person."
|
(:documentation "Represents an individual person.")
|
||||||
:update 't))
|
(:update 't))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,8 +153,8 @@ It is, however, unclear which one will win out in the end. The implementer prefe
|
||||||
Effectively equivalent to QUOTE-URL.
|
Effectively equivalent to QUOTE-URL.
|
||||||
One of QUOTE-URL (as:quoteUrl) or QUOTE-URI (fedibird:quoteUri) is to be deprecated, and the other ought be preferred.
|
One of QUOTE-URL (as:quoteUrl) or QUOTE-URI (fedibird:quoteUri) is to be deprecated, and the other ought be preferred.
|
||||||
It is, however, unclear which one will win out in the end. The implementer prefers QUOTE-URL."))
|
It is, however, unclear which one will win out in the end. The implementer prefers QUOTE-URL."))
|
||||||
(:documentation "Represents a short written work typically less than a single paragraph in length."
|
(:documentation "Represents a short written work typically less than a single paragraph in length.")
|
||||||
:update 't))
|
(:update 't))
|
||||||
|
|
||||||
|
|
||||||
;; https://docs-develop.pleroma.social/backend/development/ap_extensions/#chatmessages
|
;; https://docs-develop.pleroma.social/backend/development/ap_extensions/#chatmessages
|
||||||
|
|
Ŝarĝante…
Reference in New Issue