Allow user to pass config to AJV
I've been attempting to migrate from my own openapi validation package to this one. It took some time, but it looks like I've got most things working now.
A notable exception is that I would like human-readable error messages by using better-ajv-errors. https://www.npmjs.com/package/better-ajv-errors. This requires the following to be passed to AJV:
const ajv = new Ajv({ jsonPointers: true });
I think the cleanest way to do this is to allow the user to pass AJV config to the AJV instance inside openapi-request-validator, openapi-response-validator, and possibly openapi-schema-validator. I'm not too bothered about the schema validator myself.
This would also allow the user to make AJV more strict if that's what their use case calls for. For example setting unknownFormats: true instead of 'ignore', or setting format: 'full' instead of 'fast'.
Edit: This is how it looks when I set jsonPointers: true in my node_modules:

+1 on this. Also it would be useful to access underlying Ajv instance to setup other plugins like official ajv-errors which is required to refer field names in error messages which isn't achievable with Ajv itself (see https://github.com/ajv-validator/ajv/issues/827 for details)
the other use case I've just faced is a need to pass multipleOfPrecision option. Without it AJV just isn't able to handle the multipleOf properly(https://github.com/ajv-validator/ajv/issues/84).
I doubt if hardcoding any specific multipleOfPrecision value inside the "openapi-response-validator" makes sense for everyone, so it seems reasonable to defer the decision to the user of the "openapi-response-validator".
feel free to submit a PR