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.
--- 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
--- a/mod_rest/res/schema-xmpp.json Sun Apr 25 16:20:32 2021 +0200
+++ b/mod_rest/res/schema-xmpp.json Sun Apr 25 16:38:20 2021 +0200
@@ -324,11 +324,15 @@
}
},
"oob" : {
+ "description" : "Reference a media file",
"properties" : {
"desc" : {
+ "description" : "Optional description",
"type" : "string"
},
"url" : {
+ "description" : "The URL of the attached media file",
+ "example" : "https://media.example.net/thisfile.jpg",
"format" : "uri",
"type" : "string"
}