Pass Ajv instance to Validator constructor
pstadler opened this issue · comments
Patrick Stadler commented
First of all, thank you for providing this middleware. I've been using it across multiple projects.
How about letting users pass an Ajv instance to Validator? In my case this would be an instance of the 2019-09 draft version[1].
const Ajv2019 = require('ajv/dist/2019')
const ajv = new Ajv2019()
const validator = new Validator(ajv)
[1] https://ajv.js.org/json-schema.html#draft-2019-09
Cheers
Patrick
Simon Plenderleith commented
Glad to hear you're finding this package helpful!
That's a nice idea — if you're able to open a PR for this I'd be very happy to review it.