Commit graph

4 commits

Author SHA1 Message Date
Kim Alvefur
c617f27a54 util.jsonschema: Ignore test case for JavaScript specific detail
Also touching on how arrays are indistinguishable from tables in Lua
2022-10-09 15:24:30 +02:00
Kim Alvefur
8f850047e3 util.jsonschema: Ignore some further test cases for URI references
Full-URI references are not implemented
2022-10-09 15:24:26 +02:00
Kim Alvefur
1e74554e20 util.jsonschema: Sort test cases to skip
Piped trough `sort -g`
2022-10-09 14:58:07 +02:00
Kim Alvefur
e700edc50f 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.
2022-07-08 14:38:23 +02:00