updated activitystreams2 namespace

This commit is contained in:
Clemens 2023-06-30 15:25:23 +02:00
parent 938c323dd2
commit d18ba9f117

View file

@ -1,9 +1,11 @@
(ns org.domaindrivenarchitecture.activity-pub-poc.core (ns org.domaindrivenarchitecture.activity-pub-poc.core
(:require [clojure.spec.alpha :as s])) (:require [clojure.spec.alpha :as s]))
(s/def ::Object (s/keys (s/def ::Object (s/or
:uri any?
:map (s/keys
:req-un [::id ::type] ;type darf nicht "Link" sein :req-un [::id ::type] ;type darf nicht "Link" sein
:opt-un [::attributedTo ::und-mehr])) :opt-un [::attributedTo ::und-mehr])))
(s/def ::id any?) (s/def ::id any?)
(s/def ::type any?);(fn [s] (s/or (uri? s) (= s "Link")))) (s/def ::type any?);(fn [s] (s/or (uri? s) (= s "Link"))))
@ -21,23 +23,22 @@
:opt-un [::result ::target ::origin ::instrument :opt-un [::result ::target ::origin ::instrument
::verb]))) ::verb])))
; "IntransitiveActivity" erbt von Activity, aber ohne ::object ; "IntransitiveActivity" erbt von Activity, aber ohne ::object
(s/def ::attributedTo (s/or :object ::Object :link ::Link))
(s/def ::actor ::attributedTo)
(s/def ::actor (s/* (s/or ::Object ::Link))) (s/def ::object (s/or :object ::Object :link ::Link))
(s/def ::attributedTo (s/* (s/or ::Object ::Link)))
(s/def ::object (s/* (s/or ::Object ::Link))) (s/def ::result (s/or :object ::Object :link ::Link))
(s/def ::result (s/* (s/or ::Object ::Link))) (s/def ::target (s/or :object ::Object :link ::Link))
(s/def ::target (s/* (s/or ::Object ::Link))) (s/def ::origin (s/or :object ::Object :link ::Link))
(s/def ::origin (s/* (s/or ::Object ::Link))) (s/def ::instrument (s/or :object ::Object :link ::Link))
(s/def ::instrument (s/* (s/or ::Object ::Link))) (s/def ::verb uri?)
(s/def ::verb (s/* uri?)) (s/def ::instrument (s/or :object ::Object :link ::Link))
(s/def ::instrument (s/* (s/or ::Object ::Link)))