diff mod_rest/res/openapi.yaml @ 4547:a9e997d5eb94

mod_rest: Replace 'oob_url' with datamapper-native 'oob' While 'oob_url' is simpler and covers all current use, it's harder to describe the XML mapping.
author Kim Alvefur <zash@zash.se>
date Sun, 25 Apr 2021 16:38:20 +0200
parents cfe196f88e96
children c50fac0f3cbf
line wrap: on
line diff
--- a/mod_rest/res/openapi.yaml	Sun Apr 25 16:20:32 2021 +0200
+++ b/mod_rest/res/openapi.yaml	Sun Apr 25 16:38:20 2021 +0200
@@ -191,8 +191,8 @@
 
         html:
           $ref: '#/components/schemas/html'
-        oob_url:
-          $ref: '#/components/schemas/oob_url'
+        oob:
+          $ref: '#/components/schemas/oob'
 
         error:
           $ref: '#/components/schemas/error'
@@ -558,10 +558,21 @@
       - type: string
         description: Call a command by 'node' id, without arguments
 
-    oob_url:
-      description: URL of an attached media file.
-      example: https://media.example.net/thisfile.jpg
-      type: string
+    oob:
+      type: object
+      description: Reference a media file
+      xml:
+        name: x
+        namespace: jabber:x:oob
+      properties:
+        url:
+          type: string
+          description: URL of the attached media file
+          example: https://media.example.net/thisfile.jpg
+          format: uri
+        desc:
+          description: Optional description
+          type: string
 
     payload:
       description: A piece of arbitrary JSON with a type field attached