changeset 4959:0989dea9b356

mod_rest: Add various things to openapi spec These are already in xmpp-schema.json
author Kim Alvefur <zash@zash.se>
date Sun, 05 Jun 2022 21:59:17 +0200
parents 2735e29cf94b
children 59bedf167910
files mod_rest/res/openapi.yaml
diffstat 1 files changed, 74 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/res/openapi.yaml	Sun Jun 05 21:56:22 2022 +0200
+++ b/mod_rest/res/openapi.yaml	Sun Jun 05 21:59:17 2022 +0200
@@ -284,6 +284,8 @@
           $ref: '#/components/schemas/markable'
         displayed:
           $ref: '#/components/schemas/displayed'
+        encryption:
+          $ref: '#/components/schemas/encryption'
 
         error:
           $ref: '#/components/schemas/error'
@@ -802,6 +804,70 @@
           example: urn:example:my-json#payload
           type: string
 
+    rsm:
+      title: 'XEP-0059: Result Set Management'
+      xml:
+        name: set
+        namespace: http://jabber.org/protocol/rsm
+      type: object
+      properties:
+        last:
+          type: string
+        max:
+          type: integer
+        index:
+          type: integer
+        count:
+          type: integer
+        before:
+          type: string
+        after:
+          type: string
+        first:
+          type: string
+
+    archive_query:
+      title: 'XEP-0313: Message Archive Management'
+      type: object
+      properties:
+        queryid:
+          xml:
+            attribute: true
+          type: string
+        page:
+          $ref: '#/components/schemas/rsm'
+        form:
+          $ref: '#/components/schemas/dataform'
+      xml:
+        name: query
+        namespace: urn:xmpp:mam:2
+
+    archive_result:
+      title: 'XEP-0313: Message Archive Management'
+      xml:
+        namespace: urn:xmpp:mam:2
+        name: result
+      type: object
+      properties:
+        queryid:
+          type: string
+          xml:
+            attribute: true
+        forward:
+          $ref: '#/components/schemas/forwarded'
+
+    forwarded:
+      title: 'XEP-0297: Stanza Forwarding'
+      xml:
+        name: forwarded
+        namespace: urn:xmpp:forward:0
+      type: object
+      properties:
+        message:
+          $ref: '#/components/schemas/message'
+        delay:
+          $ref: '#/components/schemas/delay'
+
     dataform:
       description: Data form
       type: object
@@ -1231,6 +1297,14 @@
           xml:
             attribute: true
 
+    encryption:
+      title: 'XEP-0380: Explicit Message Encryption'
+      type: string
+      xml:
+        x_single_attribute: namespace
+        name: encryption
+        namespace: urn:xmpp:eme:0
+
     error:
       description: Description of something gone wrong. See the Stanza Errors section in RFC 6120.
       type: object