diff options
author | Kim Alvefur <zash@zash.se> | 2022-07-08 14:38:23 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-07-08 14:38:23 +0200 |
commit | e700edc50f3bd7f05d45bb4410396178811f3561 (patch) | |
tree | 2ea0dcae62e4dac4bd99ebf585f57314db13f4fa /core/moduleapi.lua | |
parent | 4f3ba05b4d16d02e7600ea707eac30a6a3a80fc8 (diff) | |
download | prosody-e700edc50f3bd7f05d45bb4410396178811f3561.tar.gz prosody-e700edc50f3bd7f05d45bb4410396178811f3561.zip |
util.jsonschema: Fix validation to not assume presence of "type" field
MattJ reported a curious issue where validation did not work as
expected. Primarily that the "type" field was expected to be mandatory,
and thus leaving it out would result in no checks being performed.
This was likely caused by misreading during initial development.
Spent some time testing against
https://github.com/json-schema-org/JSON-Schema-Test-Suite.git and
discovered a multitude of issues, far too many to bother splitting into
separate commits.
More than half of them fail. Many because of features not implemented,
which have been marked NYI. For example, some require deep comparisons
e.g. when objects or arrays are present in enums fields.
Some because of quirks with how Lua differs from JavaScript, e.g. no
distinct array or object types. Tests involving fractional floating
point numbers. We're definitely not going to follow references to remote
resources. Or deal with UTF-16 sillyness. One test asserted that 1.0 is
an integer, where Lua 5.3+ will disagree.
Diffstat (limited to 'core/moduleapi.lua')
0 files changed, 0 insertions, 0 deletions