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
;; The root of all evil in the world.
(json-ld::define-json-type (object "Object") () "https://www.w3.org/ns/activitystreams"
((@id
((json-ld:@id
"id"
:documentation "Provides the globally unique identifier for an Object.")
(@type
(json-ld:@type
"type"
:documentation "Identifies the Object type. Multiple values may be specified.")
(attachment

View File

@ -25,6 +25,8 @@
#:no-@context
;; Globals
#:*default-json-type*
;; Objects
#:json-ld-object
;; Accessors
#:json-ld-context #:json-ld-etc #:json-ld-id #:json-ld-type
;; Slots
@ -183,7 +185,7 @@ Here is a brief example partially defining the “Place” type from ActivityStr
't))
direct-slots)))
;; 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…
`(let ((json-class