Compare commits
2 commits
44862216eb
...
92770f4eb2
Author | SHA1 | Date | |
---|---|---|---|
92770f4eb2 | |||
d13259c2b2 |
4 changed files with 26 additions and 18 deletions
|
@ -20,20 +20,18 @@
|
||||||
;http://www.w3.org/ns/activitystreams#attachment
|
;http://www.w3.org/ns/activitystreams#attachment
|
||||||
(s/def ::attachment
|
(s/def ::attachment
|
||||||
(s/and
|
(s/and
|
||||||
|
::owl/ObjectProperty
|
||||||
::Class
|
::Class
|
||||||
::Link
|
::Link
|
||||||
::Object
|
::Object))
|
||||||
::owl/ObjectProperty))
|
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#result
|
;http://www.w3.org/ns/activitystreams#result
|
||||||
;TODO: definition in progress
|
|
||||||
;How should we translate this?
|
|
||||||
;rdfs:range [
|
|
||||||
; a owl:Class ;
|
|
||||||
; owl:unionOf ( as:Object as:Link )
|
|
||||||
; ]
|
|
||||||
(s/def ::result
|
(s/def ::result
|
||||||
(s/and ::owl/ObjectProperty))
|
(s/and
|
||||||
|
::owl/ObjectProperty
|
||||||
|
::Class
|
||||||
|
::Object
|
||||||
|
::Link))
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#Activity
|
;http://www.w3.org/ns/activitystreams#Activity
|
||||||
;TODO: definition in progress
|
;TODO: definition in progress
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.activitystreams2-legacy :as sut]))
|
[org.domaindrivenarchitecture.activity-pub-poc.activitystreams2-legacy :as sut]))
|
||||||
|
|
||||||
(deftest id-test
|
|
||||||
(is (s/valid? ::sut/id "https://social.bla/alyssa/status/RANDOMHASH")))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;(deftest Note-test
|
;(deftest Note-test
|
||||||
; (is (s/valid?
|
; (is (s/valid?
|
||||||
|
|
|
@ -7,4 +7,11 @@
|
||||||
|
|
||||||
(deftest shoult-test-spec-for-having-functional-property
|
(deftest shoult-test-spec-for-having-functional-property
|
||||||
(is (sut/is-functional-property? ::sut/id))
|
(is (sut/is-functional-property? ::sut/id))
|
||||||
(is (not (sut/is-functional-property? ::sut/Like))))
|
(is (not (sut/is-functional-property? ::sut/Like))))
|
||||||
|
|
||||||
|
(deftest id-test
|
||||||
|
(is (s/valid? ::sut/id "https://social.bla/alyssa/status/RANDOMHASH"))
|
||||||
|
(is (not (s/valid? ::sut/id nil)))
|
||||||
|
(is (not (s/valid? ::sut/id 2)))
|
||||||
|
(is (not (s/valid? ::sut/id "no-uri")))
|
||||||
|
)
|
|
@ -1 +1,11 @@
|
||||||
{"@context":"https://www.w3.org/ns/activitystreams","id":"https://social.bla/alyssa#likes/RANDOMHASH","type":"Like","to":["https://chatty.bla/ben","https://chatty.bla/gen"],"actor":"https://social.bla/alyssa","object":"https://chatty.bla/ben/posts/234s23-2g34234-2hhj536"}
|
{
|
||||||
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
"id": "https://social.bla/alyssa#likes/RANDOMHASH",
|
||||||
|
"type": "Like",
|
||||||
|
"to": [
|
||||||
|
"https://chatty.bla/ben",
|
||||||
|
"https://chatty.bla/gen"
|
||||||
|
],
|
||||||
|
"actor": "https://social.bla/alyssa",
|
||||||
|
"object": "https://chatty.bla/ben/posts/234s23-2g34234-2hhj536"
|
||||||
|
}
|
Loading…
Reference in a new issue