diff mod_rest/res/schema-xmpp.json @ 4889:52522c71ad1a

mod_rest: Add XEP-0363 HTTP Upload to schemas
author Kim Alvefur <zash@zash.se>
date Wed, 09 Feb 2022 00:34:36 +0100
parents f69c5a443156
children 3dc8e329d233
line wrap: on
line diff
--- 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" : {