diff mod_rest/res/schema-xmpp.json @ 4917:3dc8e329d233

mod_rest: Move most of XEP-0432 handling into JSON mapping schema The pre- and post-processing is still needed to encode/decode the JSON since util.datamapper can't (currently) do this.
author Kim Alvefur <zash@zash.se>
date Thu, 07 Apr 2022 15:39:57 +0200
parents 52522c71ad1a
children a85efae90e21
line wrap: on
line diff
--- a/mod_rest/res/schema-xmpp.json	Thu Apr 07 15:39:11 2022 +0200
+++ b/mod_rest/res/schema-xmpp.json	Thu Apr 07 15:39:57 2022 +0200
@@ -149,6 +149,28 @@
             "namespace" : "http://jabber.org/protocol/nick"
          }
       },
+      "payload" : {
+         "properties" : {
+            "data" : {
+               "format" : "json",
+               "type" : "string",
+               "xml" : {
+                  "text" : true
+               }
+            },
+            "datatype" : {
+               "type" : "string",
+               "xml" : {
+                  "attribute" : true
+               }
+            }
+         },
+         "title" : "XEP-0432: Simple JSON Messaging",
+         "type" : "object",
+         "xml" : {
+            "namespace" : "urn:xmpp:json-msg:0"
+         }
+      },
       "rsm" : {
          "properties" : {
             "after" : {