From b459694d8630a986bc1d1ed6f39cdd61818e946d Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Mon, 31 Jul 2023 09:34:01 +0200 Subject: [PATCH] add bcc --- .../activity_pub_poc/activitystreams2.cljc | 8 +++++++- .../activity_pub_poc/activitystreams2_test.cljc | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc index 0be62e1..0a9a180 100644 --- a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc +++ b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc @@ -14,7 +14,7 @@ (s/def ::Object (s/and ::owl/Class - (sh/map-spec (s/keys :opt-un [::id ::type ::attachment])))) + (sh/map-spec (s/keys :opt-un [::id ::type ::attachment ::bcc])))) ;http://www.w3.org/ns/activitystreams#Link ;TODO: definition in progress @@ -61,6 +61,12 @@ ::owl/DeprecatedProperty ::xsd/anyURI)) +;http://www.w3.org/ns/activitystreams#bcc +(s/def ::bcc + (s/and ::owl/ObjectProperty + ::Object + ::Link)) + ;https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type ;TODO: this can not be found in the ttl / namespace. Where is this exactly defined? (s/def ::type diff --git a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc index 9735f68..faa5266 100644 --- a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc +++ b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc @@ -45,6 +45,10 @@ :id "http://sally.example.org", :name "Sally"}]))) +(deftest bcc-test + (is (s/valid? ::sut/bcc ["http://joe.example.org"]))) + + (deftest Activity-test (is (s/valid? ::sut/Activity {:type "Activity", -- 2.45.2