# HG changeset patch # User Kim Alvefur # Date 1644363276 -3600 # Node ID 52522c71ad1adf55aaf7e0f6c33ef61f2af984d0 # Parent dc7c9ae15f436d93d27bb1673a5d1ddf6f87d3c3 mod_rest: Add XEP-0363 HTTP Upload to schemas diff -r dc7c9ae15f43 -r 52522c71ad1a mod_rest/res/openapi.yaml --- a/mod_rest/res/openapi.yaml Tue Feb 08 13:51:41 2022 +0100 +++ b/mod_rest/res/openapi.yaml Wed Feb 09 00:34:36 2022 +0100 @@ -338,6 +338,10 @@ $ref: '#/components/schemas/register' extdisco: $ref: '#/components/schemas/extdisco' + upload_request: + $ref: '#/components/schemas/upload_request' + upload_slot: + $ref: '#/components/schemas/upload_slot' error: $ref: '#/components/schemas/error' @@ -1081,6 +1085,72 @@ - username - password + upload_slot: + type: object + xml: + name: slot + namespace: urn:xmpp:http:upload:0 + properties: + put: + type: object + properties: + url: + type: string + format: uri + xml: + attribute: true + headers: + type: array + items: + type: object + required: + - name + - value + xml: + name: header + properties: + name: + type: string + enum: + - Authorization + - Cookie + - Expires + xml: + attribute: true + value: + type: string + xml: + text: true + get: + type: object + properties: + url: + type: string + format: uri + xml: + attribute: true + upload_request: + type: object + required: + - filename + - size + xml: + name: request + namespace: urn:xmpp:http:upload:0 + properties: + filename: + type: string + xml: + attribute: true + content-type: + xml: + attribute: true + name: content-type + size: + type: integer + xml: + attribute: true + error: description: Description of something gone wrong. See the Stanza Errors section in RFC 6120. type: object diff -r dc7c9ae15f43 -r 52522c71ad1a mod_rest/res/schema-xmpp.json --- a/mod_rest/res/schema-xmpp.json Tue Feb 08 13:51:41 2022 +0100 +++ b/mod_rest/res/schema-xmpp.json Wed Feb 09 00:34:36 2022 +0100 @@ -535,6 +535,102 @@ "type" : { "$ref" : "#/_common/type" }, + "upload_request" : { + "properties" : { + "content-type" : { + "xml" : { + "attribute" : true, + "name" : "content-type" + } + }, + "filename" : { + "type" : "string", + "xml" : { + "attribute" : true + } + }, + "size" : { + "type" : "integer", + "xml" : { + "attribute" : true + } + } + }, + "required" : [ + "filename", + "size" + ], + "type" : "object", + "xml" : { + "name" : "request", + "namespace" : "urn:xmpp:http:upload:0" + } + }, + "upload_slot" : { + "properties" : { + "get" : { + "properties" : { + "url" : { + "format" : "uri", + "type" : "string", + "xml" : { + "attribute" : true + } + } + }, + "type" : "object" + }, + "put" : { + "properties" : { + "headers" : { + "items" : { + "properties" : { + "name" : { + "enum" : [ + "Authorization", + "Cookie", + "Expires" + ], + "type" : "string", + "xml" : { + "attribute" : true + } + }, + "value" : { + "type" : "string", + "xml" : { + "text" : true + } + } + }, + "required" : [ + "name", + "value" + ], + "type" : "object", + "xml" : { + "name" : "header" + } + }, + "type" : "array" + }, + "url" : { + "format" : "uri", + "type" : "string", + "xml" : { + "attribute" : true + } + } + }, + "type" : "object" + } + }, + "type" : "object", + "xml" : { + "name" : "slot", + "namespace" : "urn:xmpp:http:upload:0" + } + }, "version" : { "description" : "Ask about software version information", "properties" : {