Software /
code /
prosody
Diff
util/jsonschema.lua @ 11447:7ad137fe665b
util.jsonschema: Syntax tweak to not upset syntax highlighting
That whole condition stanza was shown as angry red, I think it's
something with 'enum' being a key word in Teal.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 09 Mar 2021 14:22:33 +0100 |
parent | 11446:58c534bac798 |
child | 11448:1d84b54ba0d7 |
line wrap: on
line diff
--- a/util/jsonschema.lua Tue Mar 09 02:43:50 2021 +0100 +++ b/util/jsonschema.lua Tue Mar 09 14:22:33 2021 +0100 @@ -118,8 +118,8 @@ return false end - if schema.enum ~= nil then - for _, v in ipairs(schema.enum) do + if schema["enum"] ~= nil then + for _, v in ipairs(schema["enum"]) do if v == data then return true end