jsonschema icon indicating copy to clipboard operation
jsonschema copied to clipboard

Pure Lua JSON schema validator for Lua/LuaJIT

Results 21 jsonschema issues
Sort by recently updated
recently updated
newest added

In jsonschema we have `not` keyword, but how can I use it in Lua? For example, We have jsonschema: ``` "dependencies": { "field_2": { "not": { "required": ["field_3"] } },...

Example, worked in 0.8: ```lua jsonschema.generate_validator({ type = "object", properties = { ["$id"] = { type = "string" } } }) ``` Now (0.9.5) fails with: ``` .../lib/openresty/luajit/share/lua/5.1/jsonschema/store.lua:199: attempt to...

enhancement

In the following example, we combine "$ref" with another key, here "properties". **Expected result:** Validation returns "false" as modelVersion.major is > 2. **Observed result:** Validation returns "true" ```lua local schema...

checking

I found this code in jsonschema.lua ``` if schema.required and #schema.required == 0 then -- return false if the input data is not empty ctx:stmt(sformat('if %s ~= 1 then', datakind))...

checking

Currently it always returns true. I cannot help out with this right now, this issue is to document the shortcoming so other users are aware.

enhancement
help wanted

In the following example, "default" fields have wrong type. Yet, validator gives a positive result. ```lua local schema = [[ { "$schema": "https://json-schema.org/draft/2019-09/schema#", "type": "object", "$defs": { "parameter": { "type":...

wrong case: ``` local schema = { type = "object", oneOf = { { title = "work with consumer object", properties = { access_key = {type = "string", minLength =...

bug

* https://github.com/api7/jsonschema/commit/32e8c1f0a9910ebb59768d8e1f19a0af755cd8bd