util.jsonschema: Remove wrapper function
This was to silence some Teal warning that seems to have gone away.
--- a/teal-src/prosody/util/jsonschema.tl Sat Jun 17 17:17:44 2023 +0200
+++ b/teal-src/prosody/util/jsonschema.tl Sat Jun 17 17:19:40 2023 +0200
@@ -159,17 +159,10 @@
end
end
-local complex_validate : function ( json_schema_object, any, json_schema_object ) : boolean
-
local function validate (schema : schema_t, data : any, root : json_schema_object) : boolean
if schema is boolean then
return schema
- else
- return complex_validate(schema, data, root)
end
-end
-
-function complex_validate (schema : json_schema_object, data : any, root : json_schema_object) : boolean
if root == nil then
root = schema
--- a/util/jsonschema.lua Sat Jun 17 17:17:44 2023 +0200
+++ b/util/jsonschema.lua Sat Jun 17 17:19:40 2023 +0200
@@ -43,17 +43,10 @@
end
end
-local complex_validate
-
local function validate(schema, data, root)
if type(schema) == "boolean" then
return schema
- else
- return complex_validate(schema, data, root)
end
-end
-
-function complex_validate(schema, data, root)
if root == nil then
root = schema