changeset 4549:cce0e1ec8a74

mod_rest: Add XEP-0249: Direct MUC Invitations to schemas
author Kim Alvefur <zash@zash.se>
date Sun, 25 Apr 2021 16:53:08 +0200
parents c50fac0f3cbf
children 0befc680970b
files mod_rest/res/openapi.yaml mod_rest/res/schema-xmpp.json
diffstat 2 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/res/openapi.yaml	Sun Apr 25 16:45:06 2021 +0200
+++ b/mod_rest/res/openapi.yaml	Sun Apr 25 16:53:08 2021 +0200
@@ -420,6 +420,41 @@
       enum:
       - true
 
+    invite:
+      type: object
+      description: Invite to a group chat
+      required:
+      - jid
+      xml:
+        name: x
+        namespace: jabber:x:conference
+      properties:
+        jid:
+          type: string
+          description: Address of the group chat
+          format: xmpp-jid
+          xml:
+            attribute: true
+        reason:
+          type: string
+          description: Optional message by the inviter
+          xml:
+            attribute: true
+        password:
+          type: string
+          description: Password for the group chat, if required
+          xml:
+            attribute: true
+        thread:
+          type: string
+          xml:
+            attribute: true
+        continue:
+          type: boolean
+          description: Whether the group chat continues a one-to-one chat
+          xml:
+            attribute: true
+
     html:
       description: HTML version of 'body'
       example: <body><p>Hello!</p></body>
--- a/mod_rest/res/schema-xmpp.json	Sun Apr 25 16:45:06 2021 +0200
+++ b/mod_rest/res/schema-xmpp.json	Sun Apr 25 16:53:08 2021 +0200
@@ -306,6 +306,50 @@
                   "namespace" : "urn:xmpp:forward:0"
                }
             },
+            "invite" : {
+               "properties" : {
+                  "continue" : {
+                     "type" : "boolean",
+                     "xml" : {
+                        "attribute" : true
+                     }
+                  },
+                  "jid" : {
+                     "format" : "xmpp-jid",
+                     "type" : "string",
+                     "xml" : {
+                        "attribute" : true
+                     }
+                  },
+                  "password" : {
+                     "type" : "string",
+                     "xml" : {
+                        "attribute" : true
+                     }
+                  },
+                  "reason" : {
+                     "type" : "string",
+                     "xml" : {
+                        "attribute" : true
+                     }
+                  },
+                  "thread" : {
+                     "type" : "string",
+                     "xml" : {
+                        "attribute" : true
+                     }
+                  }
+               },
+               "required" : [
+                  "jid"
+               ],
+               "titel" : "XEP-0249: Direct MUC Invitations",
+               "type" : "object",
+               "xml" : {
+                  "name" : "x",
+                  "namespace" : "jabber:x:conference"
+               }
+            },
             "markable" : {
                "title" : "XEP-0333: Chat Markers",
                "type" : "boolean",