Fix :UPDATE and inheritance of @ID and @TYPE slots

This commit is contained in:
Jaidyn Ann 2024-08-30 08:39:40 -05:00
parent de0fd8845c
commit c90f63d765
2 changed files with 5 additions and 3 deletions

View File

@ -81,10 +81,10 @@ Items of DIRECT-CHILDREN should be of the form,
;; https://www.w3.org/ns/activitystreams#Object ;; https://www.w3.org/ns/activitystreams#Object
;; The root of all evil in the world. ;; The root of all evil in the world.
(json-ld::define-json-type (object "Object") () "https://www.w3.org/ns/activitystreams" (json-ld::define-json-type (object "Object") () "https://www.w3.org/ns/activitystreams"
((@id ((json-ld:@id
"id" "id"
:documentation "Provides the globally unique identifier for an Object.") :documentation "Provides the globally unique identifier for an Object.")
(@type (json-ld:@type
"type" "type"
:documentation "Identifies the Object type. Multiple values may be specified.") :documentation "Identifies the Object type. Multiple values may be specified.")
(attachment (attachment

View File

@ -25,6 +25,8 @@
#:no-@context #:no-@context
;; Globals ;; Globals
#:*default-json-type* #:*default-json-type*
;; Objects
#:json-ld-object
;; Accessors ;; Accessors
#:json-ld-context #:json-ld-etc #:json-ld-id #:json-ld-type #:json-ld-context #:json-ld-etc #:json-ld-id #:json-ld-type
;; Slots ;; Slots
@ -183,7 +185,7 @@ Here is a brief example partially defining the “Place” type from ActivityStr
't)) 't))
direct-slots))) direct-slots)))
;; Save the direct-slots, in case of future :UPDATEs. ;; Save the direct-slots, in case of future :UPDATEs.
(setf (gethash (car names) *class-defs*) direct-slots) (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