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 b90e766..b5a25d5 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 ::bcc ::bto])))) + (sh/map-spec (s/keys :opt-un [::id ::type ::attachment ::bcc ::bto ::cc ::to])))) ;http://www.w3.org/ns/activitystreams#Link ;TODO: definition in progress @@ -73,6 +73,18 @@ ::Object ::Link)) +;http://www.w3.org/ns/activitystreams#cc +(s/def ::cc + (s/and ::owl/ObjectProperty + ::Object + ::Link)) + +;http://www.w3.org/ns/activitystreams#to +(s/def ::to + (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 22c7596..f9ce1fe 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 @@ -51,6 +51,12 @@ (deftest bto-test (is (s/valid? ::sut/bto ["http://joe.example.org"]))) +(deftest cc-test + (is (s/valid? ::sut/cc ["http://joe.example.org"]))) + +(deftest to-test + (is (s/valid? ::sut/to ["http://joe.example.org"]))) + (deftest Activity-test (is (s/valid? ::sut/Activity {:type "Activity",