Changeset

4740:beeacb25dea9

mod_rest: Add XEP-0004 mapping for future reuse For use with MAM and such
author Kim Alvefur <zash@zash.se>
date Thu, 04 Nov 2021 19:36:11 +0100
parents 4739:fdd9e5d89d73
children 4741:3f2342eacb26
files mod_rest/res/schema-xmpp.json
diffstat 1 files changed, 107 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/res/schema-xmpp.json	Wed Nov 03 21:16:11 2021 +0100
+++ b/mod_rest/res/schema-xmpp.json	Thu Nov 04 19:36:11 2021 +0100
@@ -1,5 +1,112 @@
 {
    "_common" : {
+      "dataform" : {
+         "properties" : {
+            "fields" : {
+               "items" : {
+                  "properties" : {
+                     "desc" : {
+                        "type" : "string"
+                     },
+                     "label" : {
+                        "type" : "string",
+                        "xml" : {
+                           "attribute" : true
+                        }
+                     },
+                     "options" : {
+                        "items" : {
+                           "properties" : {
+                              "label" : {
+                                 "type" : "string",
+                                 "xml" : {
+                                    "attribute" : true
+                                 }
+                              },
+                              "value" : {
+                                 "type" : "string"
+                              }
+                           },
+                           "type" : "object",
+                           "xml" : {
+                              "name" : "option"
+                           }
+                        },
+                        "type" : "array"
+                     },
+                     "required" : {
+                        "type" : "boolean",
+                        "xml" : {
+                           "x_name_is_value" : true
+                        }
+                     },
+                     "type" : {
+                        "enum" : [
+                           "boolean",
+                           "fixed",
+                           "hidden",
+                           "jid-multi",
+                           "jid-single",
+                           "list-multi",
+                           "list-single",
+                           "text-multi",
+                           "text-private",
+                           "text-single"
+                        ],
+                        "type" : "string",
+                        "xml" : {
+                           "attribute" : true
+                        }
+                     },
+                     "values" : {
+                        "items" : {
+                           "type" : "string",
+                           "xml" : {
+                              "name" : "value"
+                           }
+                        },
+                        "type" : "array"
+                     },
+                     "var" : {
+                        "type" : "string",
+                        "xml" : {
+                           "attribute" : true
+                        }
+                     }
+                  },
+                  "type" : "object",
+                  "xml" : {
+                     "name" : "field"
+                  }
+               },
+               "type" : "array"
+            },
+            "instructions" : {
+               "type" : "string"
+            },
+            "title" : {
+               "type" : "string"
+            },
+            "type" : {
+               "enum" : [
+                  "cancel",
+                  "form",
+                  "result",
+                  "submit"
+               ],
+               "type" : "string",
+               "xml" : {
+                  "attribute" : true
+               }
+            }
+         },
+         "title" : "XEP-0004: Data Forms",
+         "type" : "object",
+         "xml" : {
+            "name" : "x",
+            "namespace" : "jabber:x:data"
+         }
+      },
       "delay" : {
          "format" : "date-time",
          "title" : "XEP-0203: Delayed Delivery",