Changeset

4840:e9b7c8db3ebd

mod_rest: Fixup internal schema references for correctness With JSON Pointer support in util.datamapper, it is now possible to use the schema file as-is without the fixups mod_rest does.
author Kim Alvefur <zash@zash.se>
date Wed, 29 Dec 2021 18:31:40 +0100
parents 4839:797b51043767
children 4841:f69c5a443156
files mod_rest/res/schema-xmpp.json
diffstat 1 files changed, 87 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/res/schema-xmpp.json	Mon Dec 27 19:48:25 2021 +0100
+++ b/mod_rest/res/schema-xmpp.json	Wed Dec 29 18:31:40 2021 +0100
@@ -203,10 +203,10 @@
             "archive" : {
                "properties" : {
                   "form" : {
-                     "$ref" : "#_common/dataform"
+                     "$ref" : "#/_common/dataform"
                   },
                   "page" : {
-                     "$ref" : "#_common/rsm"
+                     "$ref" : "#/_common/rsm"
                   },
                   "queryid" : {
                      "type" : "string",
@@ -221,6 +221,12 @@
                   "namespace" : "urn:xmpp:mam:2"
                }
             },
+            "dataform" : {
+               "$ref" : "#/_common/dataform"
+            },
+            "delay" : {
+               "$ref" : "#/_common/delay"
+            },
             "extdisco" : {
                "properties" : {
                   "services" : {
@@ -307,6 +313,9 @@
                   "namespace" : "urn:xmpp:extdisco:2"
                }
             },
+            "from" : {
+               "$ref" : "#/_common/from"
+            },
             "gateway" : {
                "properties" : {
                   "desc" : {
@@ -326,6 +335,12 @@
                   "namespace" : "jabber:iq:gateway"
                }
             },
+            "id" : {
+               "$ref" : "#/_common/id"
+            },
+            "lang" : {
+               "$ref" : "#/_common/lang"
+            },
             "lastactivity" : {
                "properties" : {
                   "seconds" : {
@@ -349,6 +364,9 @@
                   "namespace" : "jabber:iq:last"
                }
             },
+            "nick" : {
+               "$ref" : "#/_common/nick"
+            },
             "oob" : {
                "properties" : {
                   "desc" : {
@@ -463,7 +481,7 @@
             "result" : {
                "properties" : {
                   "page" : {
-                     "$ref" : "#_common/rsm"
+                     "$ref" : "#/_common/rsm"
                   }
                },
                "type" : "object",
@@ -472,6 +490,9 @@
                   "namespace" : "urn:xmpp:mam:2"
                }
             },
+            "rsm" : {
+               "$ref" : "#/_common/rsm"
+            },
             "stats" : {
                "description" : "Simple statistics gathering, array of (name, unit, value) tuples.",
                "items" : {
@@ -508,6 +529,12 @@
                   "wrapped" : true
                }
             },
+            "to" : {
+               "$ref" : "#/_common/to"
+            },
+            "type" : {
+               "$ref" : "#/_common/type"
+            },
             "version" : {
                "description" : "Ask about software version information",
                "properties" : {
@@ -546,7 +573,7 @@
             "archive" : {
                "properties" : {
                   "forward" : {
-                     "$ref" : "#_common/forwarded"
+                     "$ref" : "#/properties/message/properties/forwarded"
                   },
                   "queryid" : {
                      "type" : "string",
@@ -575,6 +602,12 @@
                "example" : "Hello, World!",
                "type" : "string"
             },
+            "dataform" : {
+               "$ref" : "#/_common/dataform"
+            },
+            "delay" : {
+               "$ref" : "#/_common/delay"
+            },
             "displayed" : {
                "description" : "Message ID of a message that has been displayed",
                "title" : "XEP-0333: Chat Markers",
@@ -595,13 +628,10 @@
             "forwarded" : {
                "properties" : {
                   "delay" : {
-                     "$ref" : "#_common/delay"
+                     "$ref" : "#/_common/delay"
                   },
                   "message" : {
-                     "type" : "object",
-                     "xml" : {
-                        "namespace" : "jabber:client"
-                     }
+                     "$ref" : "#/message"
                   }
                },
                "title" : "XEP-0297: Stanza Forwarding",
@@ -611,6 +641,12 @@
                   "namespace" : "urn:xmpp:forward:0"
                }
             },
+            "from" : {
+               "$ref" : "#/_common/from"
+            },
+            "id" : {
+               "$ref" : "#/_common/id"
+            },
             "invite" : {
                "properties" : {
                   "continue" : {
@@ -655,6 +691,9 @@
                   "namespace" : "jabber:x:conference"
                }
             },
+            "lang" : {
+               "$ref" : "#/_common/lang"
+            },
             "markable" : {
                "title" : "XEP-0333: Chat Markers",
                "type" : "boolean",
@@ -663,6 +702,9 @@
                   "x_name_is_value" : true
                }
             },
+            "nick" : {
+               "$ref" : "#/_common/nick"
+            },
             "occupant_id" : {
                "title" : "XEP-0421: Anonymous unique occupant identifiers for MUCs",
                "type" : "string",
@@ -771,6 +813,9 @@
                   "x_single_attribute" : "id"
                }
             },
+            "rsm" : {
+               "$ref" : "#/_common/rsm"
+            },
             "stanza_ids" : {
                "items" : {
                   "properties" : {
@@ -839,6 +884,12 @@
                   }
                },
                "type" : "object"
+            },
+            "to" : {
+               "$ref" : "#/_common/to"
+            },
+            "type" : {
+               "$ref" : "#/_common/type"
             }
          },
          "type" : "object",
@@ -882,6 +933,18 @@
                   "namespace" : "http://jabber.org/protocol/caps"
                }
             },
+            "dataform" : {
+               "$ref" : "#/_common/dataform"
+            },
+            "delay" : {
+               "$ref" : "#/_common/delay"
+            },
+            "from" : {
+               "$ref" : "#/_common/from"
+            },
+            "id" : {
+               "$ref" : "#/_common/id"
+            },
             "idle_since" : {
                "format" : "date-time",
                "title" : "XEP-0319: Last User Interaction in Presence",
@@ -892,12 +955,21 @@
                   "x_single_attribute" : "since"
                }
             },
+            "lang" : {
+               "$ref" : "#/_common/lang"
+            },
+            "nick" : {
+               "$ref" : "#/_common/nick"
+            },
             "priority" : {
                "description" : "Presence priority",
                "maximum" : 127,
                "minimum" : -128,
                "type" : "integer"
             },
+            "rsm" : {
+               "$ref" : "#/_common/rsm"
+            },
             "show" : {
                "description" : "indicator of availability, ie away or not",
                "enum" : [
@@ -912,6 +984,12 @@
                "description" : "Textual status message.",
                "type" : "string"
             },
+            "to" : {
+               "$ref" : "#/_common/to"
+            },
+            "type" : {
+               "$ref" : "#/_common/type"
+            },
             "vcard_update" : {
                "properties" : {
                   "photo" : {