Support for draft 2020-12
Looking through some other issues, it looks like schema version support is dependent on the AJV library. Poking through their docs, it looks like that library now supports 2020-12 (https://ajv.js.org/guide/schema-language.html#draft-2019-09-and-draft-2020-12), but it looks like it requires a different import:
const Ajv2020 = require("ajv/dist/2020")
const ajv = new Ajv2020()
Would it be possible to add this? Looking through the library, it looks like that would need to be changed somewhere around here: https://github.com/tomcollins/json-schema-static-docs/blob/master/lib/validator.js#L1-L5
Changing line 2 of that file to const Ajv = require("ajv/dist/2020"); made the library work with my schema, but I'm not sure if that breaks other things.
It hit me hard today… I tried my best to render a schema with spec 2020-12 and indeed I had to replace by 2019-09 to make it work. But it took me much time to understand why.
Note that I tried to use ajvOptions.schemas to add the schema, but it was saying that schema id already exists, while not able to validate my schema.
Hi @jat255 and @alexgarel. Apologies for the delay in picking this up. I've just release v0.26.0 with support for draft-2020-12 schema. There is an example for this in the README or via https://tomcollins.github.io/json-schema-static-docs/
Closing this issue.