You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Please provide the ability to pass in your own Ajv instance.
Motivation
Currently, one can only pass in ajv options, and the plugin instantiates ajv.
But to use latest drafts of JSON Schema, one has to import a different Ajv class than the default export: https://ajv.js.org/json-schema.html#draft-2020-12
In Fastify request validation, this is possible with setCompileFactory(), but it won't work for response validation.
Prerequisites
🚀 Feature Proposal
Please provide the ability to pass in your own Ajv instance.
Motivation
Currently, one can only pass in
ajv
options, and the plugin instantiatesajv
.But to use latest drafts of JSON Schema, one has to import a different
Ajv
class than the default export: https://ajv.js.org/json-schema.html#draft-2020-12In Fastify request validation, this is possible with
setCompileFactory()
, but it won't work for response validation.Example
The text was updated successfully, but these errors were encountered: