2 次代碼提交 9b9079eb03 ... c8769a6378

作者 SHA1 備註 提交日期
  fr33domlover c8769a6378 Vocabulary spec: Add property 'currentVersion' 4 年之前
  fr33domlover fae153dccb Vocabulary spec: Add property 'previousVersions' 4 年之前
共有 2 個文件被更改,包括 78 次插入3 次删除
  1. 10 3
      rdf/context.jsonld
  2. 68 0
      spec/vocabulary.md

+ 10 - 3
rdf/context.jsonld

@@ -17,12 +17,22 @@
         "earlyItems": {
             "@id": "forge:earlyItems",
             "@type": "@id" },
+        "previousVersions": {
+            "@id": "forge:previousVersions",
+            "@type": "@id",
+            "@container": "@list" },
+        "currentVersion": {
+            "@id": "forge:currentVersion",
+            "@type": "@id" },
         "assignedTo": {
             "@id": "forge:assignedTo",
             "@type": "@id" },
         "isResolved": {
             "@id": "forge:isResolved",
             "@type": "xsd:boolean" },
+        "resolvedBy": {
+            "@id": "forge:resolvedBy",
+            "@type": "@id" },
         "dependsOn": {
             "@id": "forge:dependsOn",
             "@type": "@id" },
@@ -59,9 +69,6 @@
         "ref": {
             "@id": "forge:ref",
             "@type": "xsd:string" },
-        "resolvedBy": {
-            "@id": "forge:resolvedBy",
-            "@type": "@id" },
         "team": {
             "@id": "forge:team",
             "@type": "@id" },

+ 68 - 0
spec/vocabulary.md

@@ -297,6 +297,74 @@ examle, if `items` lists items in reverse chronogical order, then so does
 }
 ```
 
+## previousVersions {#prop-previousversions}
+
+**URI:** `https://forgefed.peers.community/ns#previousVersions`
+
+**Notes** Specifies the previous versions of the subject, as an ordered list in
+reverse chronological order.
+
+**Domain:** [Object][]
+
+**Range:** `rdf:List` of objects of the same `@type` as the subject
+
+**Functional:** Yes
+
+**Inverse of:** (None, but see [currentVersion](#prop-currentversion))
+
+**Example:**
+
+```json
+{
+    "@context": [
+        "https://www.w3.org/ns/activitystreams",
+        "https://forgefed.peers.community/ns"
+    ],
+    "id": "https://dev.example/aviva/notes/107",
+    "type": "Note",
+    "attributedTo": "https://dev.example/aviva",
+    "content": "I agree!!!!! (edit: fixed a typo)",
+    "previousVersions": [
+       "https://dev.example/aviva/notes/107_old_version",
+       "https://dev.example/aviva/notes/107_very_old_version",
+       "https://dev.example/aviva/notes/107_ancient_version"
+    ]
+}
+```
+
+## currentVersion {#prop-currentversion}
+
+**URI:** `https://forgefed.peers.community/ns#currentVersion`
+
+**Notes** Specifies the latest. current, up-to-date version of the subject.
+Once the subject specifies the `currentVersion` property, it SHOULD NOT get any
+changes to any other properties. The exception is `currentVersion` itself,
+which MUST be updated whenever needed, to always point to the latest version.
+
+**Domain:** [Object][]
+
+**Range:** [Object][], of the same `@type` as the subject
+
+**Functional:** Yes
+
+**Inverse of:** (None, but see [previousVersions](#prop-previousversions))
+
+**Example:**
+
+```json
+{
+    "@context": [
+        "https://www.w3.org/ns/activitystreams",
+        "https://forgefed.peers.community/ns"
+    ],
+    "id": "https://dev.example/aviva/notes/107_old_version",
+    "type": "Note",
+    "attributedTo": "https://dev.example/aviva",
+    "content": "I agree!!111",
+    "currentVersion": "https://dev.example/aviva/notes/107"
+}
+```
+
 ## assignedTo {#prop-assignedto}
 
 **URI:** `https://forgefed.peers.community/ns#assignedTo`