I'm getting a "Lexical error" when attempting to validate a schema with a property that has something like a space or dash in its name.
Here is a simple example schema, that will cause the error:
{"title":"Validation Test","type":"object","properties":{"Some-Prop": { "type": "string" }}}
import validator from "@json-schema-tools/validator"
const schema = {"title":"Validation Test","type":"object","properties":{"Some-Prop": { "type": "string" }}}
const validity = validator(schema,{})
wills result in this error:
Error: Lexical error on line 1. Unrecognized text.
$.Some-Prop
------^