# HG changeset patch # User Kim Alvefur # Date 1619361500 -7200 # Node ID a9e997d5eb944b23459735c573bee2d2ddb9134f # Parent cfe196f88e968a0d3da908e9621b8148361fbf59 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. diff -r cfe196f88e96 -r a9e997d5eb94 mod_rest/res/openapi.yaml --- 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 diff -r cfe196f88e96 -r a9e997d5eb94 mod_rest/res/schema-xmpp.json --- 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" }