Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Running the tests:

The project references the pcre regular library.

If you were using the LuaJIT of OpenResty, it will use the built-in `ngx.re.find` automaticly.
If you were using the LuaJIT of OpenResty, it will use the built-in `ngx.re.find` automatically.
But if you are using Lua 5.2, 5.3 or LuaJIT 2.1 beta, you will need to install `lrexlib-pcre`.

In addition, the project also relies on the `net_url` library, which you need to install anyway.
Expand Down
2 changes: 1 addition & 1 deletion lib/jsonschema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ generate_validator = function(ctx, schema)
end

-- enum values
-- TODO: for big sets of hashable values (> 16 or so), it might be intersing to create a
-- TODO: for big sets of hashable values (> 16 or so), it might be interesting to create a
-- table beforehand
if schema.enum then
ctx:stmt('if not (')
Expand Down
6 changes: 3 additions & 3 deletions lib/jsonschema/store.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- This module is a store for all schemas unsed in a code context.
-- This module is a store for all schemas unused in a code context.
-- It is meant to deal with the id and $ref madness that JSON schema authors
-- managed to put together. Resolving JSON references involves full URI
-- parsing, absolute/relative URLs, scope management, id aliases, multipass
Expand Down Expand Up @@ -213,7 +213,7 @@ function store_mt:insert(schema)
map[id.fragment] = self:ref(s)
else
-- relative url (case 2)
-- FIXME: I'm sure it's broken bacasue resolution scopes could be
-- FIXME: I'm sure it's broken because resolution scopes could be
-- nested... but at the same time, who the hell would do this and it
-- passes the tests so ¯\_(ツ)_/¯
local resolved = base_id:resolve(id)
Expand Down Expand Up @@ -244,7 +244,7 @@ end

local function new(schema, resolver)
local self = setmetatable({
ctx_store = {}, -- used to store metadata aobut schema parts
ctx_store = {}, -- used to store metadata about schema parts
schemas = {},
resolver = resolver or default_resolver,
}, store_mt)
Expand Down
2 changes: 1 addition & 1 deletion spec/extra/format.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"schema": {"format": "hostname"},
"tests": [
{
"description": "invalid hostname, invalid charator",
"description": "invalid hostname, invalid character",
"data": "local host",
"valid": false
}
Expand Down
4 changes: 2 additions & 2 deletions spec/extra/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"valid": true
},
{
"description": "additional proprty",
"description": "additional property",
"data": { "foo": 42, "bar": false },
"valid": false
},
Expand All @@ -57,7 +57,7 @@
"valid": false
},
{
"description": "mising property",
"description": "missing property",
"data": { },
"valid": false
}
Expand Down
2 changes: 1 addition & 1 deletion t/draft4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ local blacklist = {
['ignores arrays'] = true
},
['exclusiveMinimum validation'] = {
-- droped in jsonschema draft6
-- dropped in jsonschema draft6
['above the minimum is still valid'] = true,
['boundary point is invalid'] = true,
},
Expand Down