From 1931365e1c4e681ef5ccaa806202d5a8bc356f36 Mon Sep 17 00:00:00 2001 From: bom Date: Thu, 6 Jul 2023 14:37:49 +0200 Subject: [PATCH] Refactor common spec as Property --- .../activity_pub_poc/activitystreams2.clj | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.clj b/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.clj index f792e64..2501732 100644 --- a/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.clj +++ b/src/main/clj/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.clj @@ -46,35 +46,25 @@ (s/def ::attributedTo (s/or :object ::Object :link ::Link)) (s/def ::actor ::attributedTo) +(s/def ::Property (s/or :object ::Object + :link ::Link + :objects (s/coll-of ::Object) + :links (s/coll-of ::Link))) + (s/def ::object - (s/or :object ::Object - :link ::Link - :objects (s/coll-of ::Object) - :links (s/coll-of ::Link))) + ::Property) (s/def ::result - (s/or :object ::Object - :link ::Link - :objects (s/coll-of ::Object) - :links (s/coll-of ::Link))) + ::Property) (s/def ::target - (s/or :object ::Object - :link ::Link - :objects (s/coll-of ::Object) - :links (s/coll-of ::Link))) + ::Property) (s/def ::origin - (s/or :object ::Object - :link ::Link - :objects (s/coll-of ::Object) - :links (s/coll-of ::Link))) + ::Property) (s/def ::instrument - (s/or :object ::Object - :link ::Link - :objects (s/coll-of ::Object) - :links (s/coll-of ::Link))) + ::Property) (s/def ::verb core/uri-string?)