Ajv: Error: strict mode: unknown keyword: "$schema"

Viewed 597

Using ajv v8.6.3 nodejs and typescript

Trying to parse JSON however I am getting this Error: strict mode: unknown keyword: "$schema"

anyone shed some light on this?

export const mySchema ={
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
        "names": {
            "items": {
                "type": "number"
            },
            "type": "array"
        }
    },
    "type": "object"
}


const ajv = new Ajv()

ajv.addMetaSchema(draft7MetaSchema)

ajv.compileParser(mySchema)
0 Answers
Related