From c90f63d7657057209a97c47f2575cf146ac55684 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Fri, 30 Aug 2024 08:39:40 -0500 Subject: [PATCH] Fix :UPDATE and inheritance of @ID and @TYPE slots --- src/activity-vocabulary.lisp | 4 ++-- src/json-ld.lisp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/activity-vocabulary.lisp b/src/activity-vocabulary.lisp index 951a29f..fef201f 100644 --- a/src/activity-vocabulary.lisp +++ b/src/activity-vocabulary.lisp @@ -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 diff --git a/src/json-ld.lisp b/src/json-ld.lisp index e8639c3..062d252 100644 --- a/src/json-ld.lisp +++ b/src/json-ld.lisp @@ -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