From ad5511c673806606b9c142c1b1d10bd6cb593625 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Fri, 26 Feb 2021 14:45:04 +1000 Subject: [PATCH] chore: fix spelling --- README.md | 2 +- lib/jsonschema.lua | 2 +- lib/jsonschema/store.lua | 6 +++--- spec/extra/format.json | 2 +- spec/extra/table.json | 4 ++-- t/draft4.lua | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f87b4ae..4b555ce 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lib/jsonschema.lua b/lib/jsonschema.lua index f3dffb4..9e0f768 100644 --- a/lib/jsonschema.lua +++ b/lib/jsonschema.lua @@ -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 (') diff --git a/lib/jsonschema/store.lua b/lib/jsonschema/store.lua index 316aaec..fd5e71d 100644 --- a/lib/jsonschema/store.lua +++ b/lib/jsonschema/store.lua @@ -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 @@ -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) @@ -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) diff --git a/spec/extra/format.json b/spec/extra/format.json index 0a39586..30c06d3 100644 --- a/spec/extra/format.json +++ b/spec/extra/format.json @@ -102,7 +102,7 @@ "schema": {"format": "hostname"}, "tests": [ { - "description": "invalid hostname, invalid charator", + "description": "invalid hostname, invalid character", "data": "local host", "valid": false } diff --git a/spec/extra/table.json b/spec/extra/table.json index 6345a4b..a50d3f5 100644 --- a/spec/extra/table.json +++ b/spec/extra/table.json @@ -47,7 +47,7 @@ "valid": true }, { - "description": "additional proprty", + "description": "additional property", "data": { "foo": 42, "bar": false }, "valid": false }, @@ -57,7 +57,7 @@ "valid": false }, { - "description": "mising property", + "description": "missing property", "data": { }, "valid": false } diff --git a/t/draft4.lua b/t/draft4.lua index 94bb2d0..90004f8 100644 --- a/t/draft4.lua +++ b/t/draft4.lua @@ -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, },