Changeset

4800:1e2f53fb2099

mod_rest: Fix mistaken way of specifying required fields in XEP-0215 map
author Kim Alvefur <zash@zash.se>
date Sun, 28 Nov 2021 21:26:52 +0100
parents 4799:18b12ad263f0
children 4801:b65955c0abd8
files mod_rest/res/openapi.yaml mod_rest/res/schema-xmpp.json
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/res/openapi.yaml	Sun Nov 28 20:10:07 2021 +0100
+++ b/mod_rest/res/openapi.yaml	Sun Nov 28 21:26:52 2021 +0100
@@ -965,13 +965,15 @@
             type: object
             xml:
               name: service
+            required:
+            - type
+            - host
             properties:
               transport:
                 xml:
                   attribute: true
                 type: string
               type:
-                required: true
                 xml:
                   attribute: true
                 type: string
@@ -980,7 +982,6 @@
                   attribute: true
                 type: integer
               host:
-                required: true
                 xml:
                   attribute: true
                 type: string
--- a/mod_rest/res/schema-xmpp.json	Sun Nov 28 20:10:07 2021 +0100
+++ b/mod_rest/res/schema-xmpp.json	Sun Nov 28 21:26:52 2021 +0100
@@ -234,7 +234,6 @@
                               }
                            },
                            "host" : {
-                              "required" : true,
                               "type" : "string",
                               "xml" : {
                                  "attribute" : true
@@ -271,7 +270,6 @@
                               }
                            },
                            "type" : {
-                              "required" : true,
                               "type" : "string",
                               "xml" : {
                                  "attribute" : true
@@ -284,6 +282,10 @@
                               }
                            }
                         },
+                        "required" : [
+                           "type",
+                           "host"
+                        ],
                         "type" : "object",
                         "xml" : {
                            "name" : "service"