Validation error in JSON schema provided by user against the JSON Schema draft 2020-12?
I have integrated monaco editor on my website and I want users to input JSON data and validate it against JSON Schema draft 2020-12. For validating I am using ajv laibrary but I seems to break every single time I am trying to run it. I have tried validating by using the uri version
import Ajv2020 from "ajv/dist/2020";
provided in the docs it is giving error as schema must be object or boolean
as well as by having the schema in my local dir import * as schema from "~/_includes/draft/2020-12/schema.json";
which is giving error as strict mode: unknown keyword: "$dynamicAnchor"
but both the cases are giving error.


0 Replies