Diff

mod_rest/openapi.yaml @ 4477:8df6cc648963

mod_rest: Add more REST-looking way to send stanzas Example: POST /rest/message/chat/juliet@example.net { body: "Hello" } Becomes equivalent to POST /rest { kind: "message", type: "chat", to: "juliet@example.net", body: "Hello" } Sending messages as plain/text also becomes more convenient. IQ stazas are still weird, but we'll do something special for those.
author Kim Alvefur <zash@zash.se>
date Sun, 28 Feb 2021 19:25:45 +0100
parent 4476:125279f4a5b8
child 4478:7ab0c423688a
line wrap: on
line diff
--- a/mod_rest/openapi.yaml	Sun Feb 28 18:55:18 2021 +0100
+++ b/mod_rest/openapi.yaml	Sun Feb 28 19:25:45 2021 +0100
@@ -62,6 +62,31 @@
             payload.
         415:
           description: Unsupported mediatype.
+  /rest/{kind}/{type}/{to}:
+    post:
+      responses:
+        200:
+          description: Okay
+      security:
+      - basic: []
+      - token: []
+      summary: Even more RESTful mapping.
+      parameters:
+      - name: kind
+        in: path
+        required: true
+        schema:
+          $ref: '#/components/schemas/kind'
+      - name: type
+        in: path
+        required: true
+        schema:
+          $ref: '#/components/schemas/type'
+      - name: to
+        in: path
+        required: true
+        schema:
+          $ref: '#/components/schemas/to'
 components:
   schemas:
     stanza: