diff options
author | Kim Alvefur <zash@zash.se> | 2023-06-17 17:19:40 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-06-17 17:19:40 +0200 |
commit | 597f3c7f0aa39c347dad671cf682742b4d40a914 (patch) | |
tree | 93bde63a03495633e4bd0dbc7974a8ba1bed8e58 | |
parent | f0242ae57c14ed1417a80e475784aaaded04dfe4 (diff) | |
download | prosody-597f3c7f0aa39c347dad671cf682742b4d40a914.tar.gz prosody-597f3c7f0aa39c347dad671cf682742b4d40a914.zip |
util.jsonschema: Remove wrapper function
This was to silence some Teal warning that seems to have gone away.
-rw-r--r-- | teal-src/prosody/util/jsonschema.tl | 7 | ||||
-rw-r--r-- | util/jsonschema.lua | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/teal-src/prosody/util/jsonschema.tl b/teal-src/prosody/util/jsonschema.tl index 5a1b0e92..baac58f3 100644 --- a/teal-src/prosody/util/jsonschema.tl +++ b/teal-src/prosody/util/jsonschema.tl @@ -159,17 +159,10 @@ local function simple_validate(schema : json_type_name | { json_type_name }, dat 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 diff --git a/util/jsonschema.lua b/util/jsonschema.lua index 96d6547d..eab2d817 100644 --- a/util/jsonschema.lua +++ b/util/jsonschema.lua @@ -43,17 +43,10 @@ local function simple_validate(schema, data) 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 |