Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to generate valdiator with $id property #67

Open
piotrp opened this issue Dec 19, 2021 · 1 comment
Open

Fails to generate valdiator with $id property #67

piotrp opened this issue Dec 19, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@piotrp
Copy link

piotrp commented Dec 19, 2021

Example, worked in 0.8:

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 concatenate field '$id' (a table value)

stack traceback:
        .../lib/openresty/luajit/share/lua/5.1/jsonschema/store.lua:199: in function 'walk'
        .../lib/openresty/luajit/share/lua/5.1/jsonschema/store.lua:235: in function 'walk'
        .../lib/openresty/luajit/share/lua/5.1/jsonschema/store.lua:240: in function 'new'
        /usr/lib/openresty/luajit/share/lua/5.1/jsonschema.lua:323: in function 'codectx'
        /usr/lib/openresty/luajit/share/lua/5.1/jsonschema.lua:1139: in function 'generate_main_validator_ctx'
        /usr/lib/openresty/luajit/share/lua/5.1/jsonschema.lua:1163: in function 'generate_validator'

I found this when checking validation against draft 7 metaschema from http://json-schema.org/draft-07/schema

@membphis
Copy link
Contributor

This is a todo feature, currently not supported.

welcome PR .

@membphis membphis added the enhancement New feature or request label Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants