Code Monkey home page Code Monkey logo

ljsonschema's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ljsonschema's Issues

main function has more than 200 local variables

Hi, any help with this? Thanks ;-)

lua: /usr/local/share/lua/5.1/jsonschema/init.lua:188: [string "jsonschema:anonymous"]:3686: main function has more than 200 local variables
stack traceback:
        [C]: in function 'error'
        /usr/local/share/lua/5.1/jsonschema/init.lua:188: in function </usr/local/share/lua/5.1/jsonschema/init.lua:168>
        (tail call): ?
        .///compiled/abstract/minetest_mod/generator.lua:995: in main chunk
        [C]: in function 'require'
        ./check.lua:2: in main chunk
        [C]: ?

how to cache the generated validator ?

adding this as an issue because I could not find another way to reach out.

-- Note: do cache the result of schema compilation as this is a quite
-- expensive process

I read the above in the examples given, but I am not able to figure out what to cache exactly. can you please share an example of caching the compiled schema

Full list of Error messages

In case there are more than 2 errors in the document, how can we get the complete list? The ljsonschema currently returns only 1 error.

String pattern not work

Hi, ljsonschma doesn't work expected when I try the regular expressions: regular expressions.

The error message is: property "OpenKey" validation failed: failed to match pattern "^(\([0-9]{3}\))?[0-9]{3}-[0-9]{4}$" with "555-1212"

Version between github and luarocks are different

I installed this library and run the example code in readme, but get faild.

lua: /usr/local/share/lua/5.1/jsonschema/init.lua:161: bad argument #1 to 'load' (function expected, got string)                                                                                                  
stack traceback:
        [C]: in function 'load'
        /usr/local/share/lua/5.1/jsonschema/init.lua:161: in function </usr/local/share/lua/5.1/jsonschema/init.lua:160>                                                                                          
        (tail call): ?
        a.lua:5: in main chunk
        [C]: ?

I also find some differences between the actual code I installed and github.
For example, local coro_yield = coroutine.yield is not on luarocks version.
But it's in github source code.

string pattern

I got this error message

property "private_token" validation failed: failed to match pattern "[a-fA-F0-9]{32}" with "6DA43D15DA6DC5BFD9D347EBAAAB72A9"

But I test on https://regex101.com/ actually it's passed.
Is this a bug? or I'm using the wrong way?

Incompatable with OpenResty

Running example in LUA 5.1 is good.
But when i'm trying to run example in OpenResty (with LuaJIT), it rises an error:

ERROR: attempt to yield across C-call boundary
stack traceback:
coroutine.wrap:21: in function coroutine.wrap:21
[C]: in function 'load'
./jsonschema/init.lua:169: in function 'generate_validator'
test.lua:5: in function 'file_gen'
init_worker_by_lua:45: in function <init_worker_by_lua:43>
[C]: in function 'xpcall'
init_worker_by_lua:52: in function <init_worker_by_lua:50>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.